Categories: None [Edit]
switches
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.
Total
Ranking: 39,221 of 187,591
Downloads: 30,401
Daily
Ranking: 130,231 of 187,571
Downloads: 5
Downloads Trends
Ranking Trends
Num of Versions Trends
Popular Versions (Major)
Popular Versions (Major.Minor)
Depended by
| Rank | Downloads | Name |
|---|
Depends on
| Rank | Downloads | Name |
|---|---|---|
| 7 | 1,212,119,821 | activesupport |
| 28 | 925,037,502 | rspec |
Owners
| # | Gravatar | Handle |
|---|---|---|
| 1 | seamusabshere |