The Ruby and Rails community linklog
Made a library? Written a blog post? Found a useful tutorial? Share it with the Ruby community here or just enjoy what everyone else has found!
Submit a post
Post Preview
Note: Only the first pargraph is shown on the front page and overly long paragraphs may be broken up.
New Rails Versions with 9 CVEs fixed
http://weblog.rubyonrails.org/2016/1/25/Rails-5-0-0-beta1-1-4-2-5-1-4-1-14-1-3-2-22-1-and-rails-html-sanitizer-1-0-3-have-been-released/ Unlike usual, the version number is NOT increased in patch level but AFTER it So look closely to the post
Writing a Secure Filename Sanitization Function
One part of good security is writing a proper whitelist or blacklist function when interacting with files from users. Find out how to do that properly!
RSpec performance testing matchers
Motivated by latest failures maintaing code speed, the rspec-benchmark aims to help you prevent code performance regressions. Having benchmarks folder is fine, but automation integrated with the test suite keeps your code even more honest when refactoring. Give it a try and let me have your thoughts!
Wye Tech News #8
A new issue of our weekly compilation of interesting news and articles about Ruby, Rails, JavaScript and web development related stuff that we found during the week.
Create An Bash Function To Open Latest Active Record Migration
Opening the latest activerecord migration with those timestamps is tricky. Make it easy with this Bash function. http://solidfoundationwebdev.com/blog/posts/create-an-bash-function-to-open-latest-active-record-migration
Best practices to confident coding
“It works” — the client says after 5 or 6 clicks on the software you have created, deep breath and relax shoulders right?, next?: payment or some arrangement, after?: improvement, fixing some details… https://medium.com/@ccverak/getting-confidence-a-software-developer-perspective-1b7fee3bd643#.11yvybh76
Engine-based Rails Apps: Pros & Cons
A rundown of the pros & cons we encountered building a Rails app as a series of engines, rather than a monolith.
Another post about services in Rails and Faat-generator!
Hello, everyone! I released a new version of my gem-generator Faat!. And wrote a little article about how to use services in Ruby on Rails, and why it is important! And an example of how to use my gem-generator Faat!
cdnget - utility to download files from CDN
I released cdnget ver 0.1, a small utility to download files (*.js, *.css) from public CDN (CDNJS, jsDelivr, Google). See https://github.com/kwatch/cdnget for details.
Lotus is now Hanami
We decided to change the name to the project, here’s why. The name is a tribute to Matz and Ruby origins.
Custom templates path for controller
2 ways to specify custom templates path per controller http://undefined-reference.org/2016/01/23/custom_templates_path_for_controller.html
Cells-Hamlit: The Fastest View Engine Around.
Hamlit is a new, fast implementation of Haml. The Cells-hamlit gem allows speeding up your views in Cells. Check out our benchmarks with Cells and Haml, Hamlit and Slim.
Create worldmap colored by your stats
Simple gem for creating colored world map according to some statistics or custom rules: Worldize. Inspired by R’s rworldmap package.
Should I create a model if it will only have 1 row?
It can seem like overkill to create a database table and a corresponding ActiveRecord model if you know for a fact that your table will only have one row. Check out this post I wrote which looks into some options. Hope you enjoy!
Beat Spec File Name Blunders
Have you ever written a spec and forgotten to give its file name the required _spec.rb suffix? That spec will rarely (if ever) be run and you may never find out… https://eliotsykes.com/spec-enforcer
22 Vim Plugins every (Ruby) Developer should use
Vim is still my favorite editor, so i made a list of 22 Vim Plugins every (Ruby) Developer should use. Enjoy!
Pragmatic Tokenizer
Pragmatic Tokenizer is a multilingual tokenizer to split a string into tokens. Looking for developers with knowledge in languages outside of English to help add specs or add stop word / abbreviation lists for languages with poor coverage.
Keep Your Rails App Healthy
Are you responsible for maintaining Rails applications in production? Ask yourself these 9 questions and develop a plan to handle all possible scenarios, including emergencies.
Social sharing images with ShareMeow
ProductHunt released a useful little Sinatra app for generating images to share on social media to embed more content. Check out the screencast on ShareMeow.
The Art of Uniform Interface
Learn how to eliminate parametric coupling in your code : The Art of Uniform Interface
MightyString version 1.0.0 has arrived!
Some VERY handy methods made available for String instances. https://github.com/danielpclark/MightyString
What's new in Ruby 2.3 Enumerable
The recent release of Ruby 2.3 added a couple new instance methods to the Enumerable module. We’ll examine how to use Enumerable#grep_v and #chunk_while and what makes them different from their counterparts https://rossta.net/blog/whats-new-in-ruby-2-3-enumerable.html
From legacy to DDD: Start with publishing events
When you start your journey with DDD, it’s quite easy to apply DDD in a fresh app. It’s a bit more complicated for existing, legacy apps. This blog post shows how you can start applying DDD by publishing events.