Switches lets you turn on and off parts of your code from the commandline. There's a defaults.yml and a current.yml in the background. For example: app/models/user.rb after_create :subscribe_email if Switches.campaign_monitor? >> Switches.campaign_monitor? # => false $ rake switches:on[campaign_monitor] >> Switches.campaign_monitor? # => true $ rake switches:reset # goes back to default.yml $ rake switches:diff # shows diff b/w current.yml and default.yml $ rake s:d # alias for switches:diff $ rake s:c # alias for switches:list_current etc. It's inspired by ActiveSupport's StringInquirer (e.g. Rails.development?) and traditional compile-time assertions.

Required Ruby Version

None

Authors

Seamus Abshere

Versions

  1. 0.1.7
    1. source

      1. 0.1.7 source March 30, 2010 (11 KB)
  2. 0.1.6
    1. source

      1. 0.1.6 source November 19, 2009 (10.5 KB)
  3. 0.1.5
    1. source

      1. 0.1.5 source November 19, 2009 (11 KB)
  4. 0.1.4
    1. source

      1. 0.1.4 source November 18, 2009 (11 KB)
  5. 0.1.3
    1. source

      1. 0.1.3 source November 05, 2009 (10.5 KB)
Show all versions (8 total)

SHA 256 checksum