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.
A Ruby Refactor: Exploring Dependency Injection Options
I wrote a new post titled A Ruby Refactor: Exploring Dependency Injection Options. Hope you enjoy!
First impression about ROM (Ruby Object Mapper)
Here I listed my experience with DataMapper 2 which wasn’t released and ROM (inheritor of DataMapper 2). We already started using it and I guess our experience may be interesting for other developers as well.
Keep method_missing and respond_to_missing? in sync with hook_lying_syncer!
One of the big gotchas of Ruby metaprogramming is the need to keep method_missing and respond_to_missing? in sync. I’ve just published the hook_lying_syncer gem (code on Github) to help with this. See the README on Github for details.
Where Does Your Code Go?
After you finish the Rails tutorials and start your own app, things get confusing. Like where does your non-CRUD, general logic go? How does grabbing followers from Twitter fit into MVC? Ask two people, and you get four answers. So where do you put your code, and still keep things simple?
Preferring Value Objects Or Setters And Arguments
I recently wrote a post where I show some code displaying the contrast between using value objects and setter methods.
Baruco meets FutureJS: Announcing Full Stack Fest 2015!
After the continued success of three editions of Baruco and one of FutureJS, we are already working on a new twist for 2015, and we are proud to announce it today: Full Stack Fest.
Opinionated guide to service objects
I just decided to write a blog post about Service Objects, which is a pretty controversial topic these days. Hope there will be a lot of comments and stormy discussion :)
Planet Pluto Update v1.1.0 / Modul-mania - pluto-models, pluto-update, pluto-tasks, etc.
I’ve uploaded a new pluto version, that is, v1.1.0. What’s pluto? A free planet site generator for building web pages from published web feeds e.g. Planet Ruby, Planet JavaScript, etc.
What’s news? The pluto gem is now split up into five gems. The lineup includes: pluto, pluto-models, pluto-update, pluto-merge, pluto-tasks The idea is to make it easier to use what you need and make it easier to change to your needs. All planet temlates (e.g. hacker, news, digest, etc.) moved to its own GitHub org, that is, planet-templates and you can now install planet templates w/ npm too e.g. $ npm install planet-top. Happy planet. Cheers.
Production Rails Deployment with Nginx and Unicorn
Our new tutorial talks about how to set up production Rails deployment with Nginx and Unicorn. [more inside]
-to cardinal gem- made for learn about ruby
I just launched ToCardinal gem and I really would like that you give me some feedback to improve it. I have two purposes, contribute to community and learn about this. So I’ll appreciate your comments.
Capability Reporting with Service Worker
Some people, when confronted with a problem, think: “I know, I’ll use UA/device detection!” Now they have two problems… Service Worker solves this problem: instead of guessing on the server, we can (finally) teach the client to report the necessary values!
Charts for your rails models with MetricsGraphics.js and NVD3
models_stats gem - it’s graphics for your rails models with MetricsGraphics.js and NVD3. It may show count(or average, or sum, or another sql agregate function) of models for each day with grouping, conditions. It uses Redis for store statistics.
Necromancer v0.3.0 release
New necromancer includes more array conversions and ability to configure global options such as strict mode.
Get insights of your PostgreSQL database with PgHero
PgHero is a ruby gem that gives you insights of your PostgreSQL database: cache hit rate, which queries are too slow, which tables need indexes, and more. Here’s how it looks on a production RoR app.
New version for proxy_pac_rb
I just released a new version of proxy_pac_rb. It uses now thor for commandline parsing and supports a new command to compress an existing proxy.pac.
I made a Tic-tac-toe for the Terminal in Ruby
I recently found about Curses, framework for making Terminal applications, and ruby/curses. I was really interested in how the Terminal works and how can you make a Terminal application (without any framework), which I intend to write a blog post about. Here I wanted to demonstrate how Curses can be used in Ruby. [more inside]
slideshow (S9) RubyGem Update - Adds npm Template Pack Support - $ npm install slideshow-impress.js
I’ve updated the slideshow (S9) machinery. Now you can use npm to install slideshow template packs (e.g. s5, s6, slidy, deck.js, etc.). For example to install the slideshow-impress.js pack type: $ npm install slideshow-impress.js No magic here. The npm package manager will download and copy the package to your working folder in the node_modules/ folder. That’s it. Now the template pack is ready to use with Slide Show (S9) e.g. try $ slideshow new -t impress.js and so on. More details at the Slide Show (S9) project site. Cheers.
Sugarcane 0.0.3 works on OSX
Just realized sugarcane never worked on OSX because I wrote it while on Linux. It uses ncurses-ruby instead of ncursesw now. [more inside]
Applying SitePrism.Vcr to stub API calls triggered by events in SitePrism sections
Recently I have had to stub API responses in our tests when an user uses pagination. We have the pagination similar to the pagination of Facebook: you scroll down and you receive new items in the list. It was challenging, because SitePrism.Vcr only allows you to link VCR cassettes with elements and pages. [more inside]
Disable dangerous rake tasks in production
Here’s a nifty rake task to disable dangerous rake tasks in production, like rake db:schema:load. Developed after we killed our production database by mistake :-)
Bower integration with Rails without third party gems
Generally integrating bower with Rails require using rails-assets gem wrappers, or bower-rails gems. Recently we stumbled upon sprockets inbuilt ability to detect bower packages, and integrate those packages into asset pipeline. You can read more about it here: Cake walk: Using bower with rails
Upgrade to rails 4!
Are you planning to finally bump your app to the rails 4.0? Check out my article, it will help you!
Rack/Rails middleware that will add rel="nofollow" to all your links
I wrote a post about a simple middleware that can help you ensure, that you don’t have any nofollow links that you don’t want. You can read about it here: Rack/Rails middleware that will add rel=”nofollow” to all your links