Port of Merb's dependency system to a Rails plugin
Switch branches/tags
Nothing to show
Pull request Compare This branch is even with ddollar:master.
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
lib
spec
tasks
FAQ.markdown
MIT-LICENSE
README.markdown
Rakefile
TODO.markdown
init.rb

README.markdown

Dependencies

A port of Merb's dependency system to a Rails plugin.

Usage

  1. Install the plugin

     script/plugin install git://github.com/ddollar/dependencies.git
    
  2. Add the following line to your config/environment.rb

     config.plugins = [:dependencies, :all]
    
  3. Add the following line to your .gitignore

     gems
    
  4. Create a config/dependencies.rb file that looks like:

     dependency 'gem'
     dependency 'gem', '1.0.1'
     dependency 'gem', :require_as => 'Gem'
     dependency 'gem', :only => %w(test staging)
     dependency 'gem', :except => 'production'
    
     with_options(:only => 'test') do |test|
       test.dependency 'tester-gem'
     end
    
  5. Remove or comment out any config.gem lines from config/environment.rb or config/environments/*.rb

  6. Install the gems into your project and keep them up to date using:

     rake dependencies:sync
    
  7. Alternatively you can use the following rake task to read your existing config.gem declarations and output a file suitable for this plugin. This task will appropriately handle any gems that you are currently loading on a per-environment basis as well.

     rake dependencies:import
    

About

Initial idea and Rubygems extension code from Merb

Rewritten for Rails by David Dollar (@ddollar)

Documentation, testing, ideas by Steven Soroka (@ssoroka)