Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Newer
Older
100644 90 lines (64 sloc) 2.952 kB
264a0d2 @jnunemaker Correct remaining flipper ui mentions
authored
1 ![flipper logo](https://raw.githubusercontent.com/jnunemaker/flipper/master/lib/flipper/ui/public/images/logo.png)
8257cc6 @jnunemaker Initial commit
authored
2
785bacb @jnunemaker Dolphin up the readme.
authored
3 <pre>
bbbeb40 @chastell Fix README image and ASCII logos
chastell authored
4 __
785bacb @jnunemaker Dolphin up the readme.
authored
5 _.-~ )
6 _..--~~~~,' ,-/ _
7 .-'. . . .' ,-',' ,' )
8 ,'. . . _ ,--~,-'__..-' ,'
9 ,'. . . (@)' ---~~~~ ,'
10 /. . . . '~~ ,-'
11 /. . . . . ,-'
12 ; . . . . - . ,'
13 : . . . . _ /
14 . . . . . `-.:
15 . . . ./ - . )
16 . . . | _____..---.._/ _____
17 ~---~~~~----~~~~ ~~
18 </pre>
19
491afa8 @jnunemaker Readme updates.
authored
20 Feature flipping is the act of enabling or disabling features or parts of your application, ideally without re-deploying or changing anything in your code base.
21
9323793 @jnunemaker Updated readme.
authored
22 The goal of this gem is to make turning features on or off so easy that everyone does it. Whatever your data store, throughput, or experience, feature flipping should be easy and have minimal impact on your application.
491afa8 @jnunemaker Readme updates.
authored
23
d8c39a8 @jnunemaker Move installation to the top.
authored
24 ## Installation
25
26 Add this line to your application's Gemfile:
27
28 gem 'flipper'
29
30 And then execute:
31
32 $ bundle
33
34 Or install it yourself with:
35
36 $ gem install flipper
37
f7f94ce @jnunemaker Switch to examples/docs in readme
authored
38 ## Examples
a6f744d @jnunemaker Example in readme.
authored
39
3a75f48 @chastell README code quoting fixes
chastell authored
40 The goal of the API for flipper was to have everything revolve around features and what ways they can be enabled. Start with top level and dig into a feature, then dig in further and enable that feature for a given type of access, as opposed to thinking about how the feature will be accessed first (ie: `stats.enable` vs `activate_group(:stats, ...)`).
491afa8 @jnunemaker Readme updates.
authored
41
02a0b7a @jnunemaker Readme formatting
authored
42 ```ruby
c0d59b6 @jnunemaker Update readme to new dsl and add types
authored
43 require 'flipper'
02a0b7a @jnunemaker Readme formatting
authored
44
c0d59b6 @jnunemaker Update readme to new dsl and add types
authored
45 # pick an adapter
0de8b1f @jnunemaker Update readme.
authored
46 require 'flipper/adapters/memory'
32ea402 @jnunemaker Hash not needed
authored
47 adapter = Flipper::Adapters::Memory.new
02a0b7a @jnunemaker Readme formatting
authored
48
c0d59b6 @jnunemaker Update readme to new dsl and add types
authored
49 # get a handy dsl instance
50 flipper = Flipper.new(adapter)
51
52 # grab a feature
53 search = flipper[:search]
54
491afa8 @jnunemaker Readme updates.
authored
55 # check if that feature is enabled
56 if search.enabled?
57 puts 'Search away!'
58 else
59 puts 'No search for you!'
02a0b7a @jnunemaker Readme formatting
authored
60 end
61
62 puts 'Enabling Search...'
63 search.enable
64 ```
de91a5f @jnunemaker Bundle gem files
authored
65
5623244 @jnunemaker Add links to dsl and feature
authored
66 Of course there are more [examples for you to peruse](examples/). You could also check out the [DSL](lib/flipper/dsl.rb) and [Feature](lib/flipper/feature.rb) classes for code/docs.
c0d59b6 @jnunemaker Update readme to new dsl and add types
authored
67
f7f94ce @jnunemaker Switch to examples/docs in readme
authored
68 ## Docs
c0d59b6 @jnunemaker Update readme to new dsl and add types
authored
69
ca038b8 @jnunemaker Add descriptions for the read more links
authored
70 * [Gates](docs/Gates.md) - Boolean, Groups, Actors, % of Actors, and % of Time
71 * [Adapters](docs/Adapters.md) - Mongo, Redis, Cassandra, Active Record...
b8bfebc @jnunemaker Add as notifs to readme
authored
72 * [Instrumentation](docs/Instrumentation.md) - ActiveSupport::Notifications, Statsd and Metriks
ca038b8 @jnunemaker Add descriptions for the read more links
authored
73 * [Optimization](docs/Optimization.md) - Memoization middleware
74 * [Web Interface](docs/ui/README.md) - Point and click...
f873216 @jnunemaker Add caveats markdown file
authored
75 * [Caveats](docs/Caveats.md) - Flipper beware! (see what I did there)
32854a6 @jnunemaker Update web ui in readme
authored
76
de91a5f @jnunemaker Bundle gem files
authored
77 ## Contributing
78
79 1. Fork it
80 2. Create your feature branch (`git checkout -b my-new-feature`)
81 3. Commit your changes (`git commit -am 'Added some feature'`)
82 4. Push to the branch (`git push origin my-new-feature`)
83 5. Create new Pull Request
8618b75 @jnunemaker Move coming soon to bottom of readme.
authored
84
5e8a430 @jnunemaker Add script/release and notes in readme
authored
85 ## Releasing
86
87 1. Update the version to be whatever it should be and commit.
88 2. `script/release`
89 3. Profit.
Something went wrong with that request. Please try again.