traitsjs.org

traits.js is a minimal, standards-compliant trait composition library for Javascript.

This is called "cherry-picking". git cherry-pick commit-sha1 Note that since branches are nothing but commit pointers, cherry...

gnuu.org

YARD 0.6 adds the ability to serve documentation for gems as well as the current project with yard server. Just...

ruportbook.com

Ruport’s acts_as_reportable module provides support for using ActiveRecord for data collection. You can use it to get...

github.com

An alternative to this technique is using VCR. VCR allows you to record and replay real HTTP responses, saving you...

bitbucket.org

String manipulation extensions for the Underscore.js javascript library.

github.com

home_run is an implementation of ruby’s Date/DateTime classes in C, with much better performance (20-200x) than...

github.com

A fake filesystem. Use it in your tests.

github.com

Ancestry is a gem/plugin that allows the records of a Ruby on Rails ActiveRecord model to be organised as a...

makandra dev

This may be awkward to set up, but will work once you're done. Fun facts:

Dir.glob(File.join RAILS_ROOT, 'app', 'models', '*.rb').collect{ |path| path[/.+\/(.+).rb/,1] }.collect(&:camelize).collect(&:constantize)

When a paperclip attachment gains a new style and you have many attachments, reprocessing can take ages. This is because...

Until May 2011 our gems have been created with Jeweler, which is a helper library to package code into a...

With defaults, RCov doesn't work the way you how you would like it to. To create a nice test...

To test concurrent code, you will need to run multiple threads. Unfortunately, when you use blocking system calls (e.g. locks...

For arrays of objects, uniq does not work as expected, since it uses strict equality. So [[1], [1]].uniq() == [[1...

To parse XML-documents, I recommend the gem nokogiri. A few hints: xml = Nokogiri::XML(" foo bar ") parses an xml...

sudo gem install gettext --no-ri --no-rdoc sudo gem install fast_gettext --no-ri --no-rdoc script/plugin install git://...

install apache sudo apt-get install ruby1.8-dev sudo gem install passenger sudo passenger-install-apache2-module follow the instructions

When you need to patch an existing gem, one way is to "vendor" the gem by copying it into the...

ActsAsSolr::Post.execute(Solr::Request::Delete.new(:query => "#{Location.solr_configuration[:type_field]}:#{ModelClass}")) ActsAsSolr::Post.execute(Solr::Request::Commit.new)

makandra dev

To call a class method (or static method) from an instance method: class.method() To call a class method from a...

This can happen during development when classes without automatic reloading are pointing to classes with automatic reloading. E.g. some class...

To run a single test file: rake test:units TEST=test/unit/post_test.rb rake test:functionals TEST=test/functional/posts_controller_test.rb rake test:integration TEST...