feature_cop 0.1.1 → 0.1.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +7 -7
- data/lib/feature_cop/version.rb +1 -1
- data/lib/feature_cop.rb +3 -3
- metadata +2 -3
- data/LICENSE.txt +0 -21
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 23e13c27a95eb98d2e6575e2496cf0508a97b38c
|
4
|
+
data.tar.gz: ab18e2e7f822c9d0e4cf0f2be37c8eb01c27d704
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 1592e693b61d3d0a65940150caddff431a68545d8198cc5bddbd7bd3fc16ad0b08a543acf09de237a42e143c6fdf154711faf7c69577cf10f8c5cf1c7306de2f
|
7
|
+
data.tar.gz: 2f490d457210964d0b049b468781616a18d07255be97b54e32ba3abf80a17e54e6ad4c39e81262d6eeadaebc4398f2452a624a8a7508bdfc7ebc0f892a764cde
|
data/README.md
CHANGED
@@ -1,16 +1,16 @@
|
|
1
1
|
# FeatureCop
|
2
2
|
|
3
|
-
FeatureCop is a simple feature toggling system for Ruby. It provides progressive roll out of features. A common (and my opinion, bad) practice is for developers to use branching as feature control. Feature Branching leads to
|
3
|
+
FeatureCop is a simple feature toggling system for Ruby. It provides progressive roll out of features. A common (and my opinion, bad) practice is for developers to use branching as feature control. Feature Branching leads to large pull requests, messy merges, and long integration cycles. With continous integration and feature toggling everyone can make small, short lived branches off the mainline, continually merge code, and get code in production, even when it isn't ready for launch.
|
4
4
|
|
5
5
|
The following roll out strategies is available:
|
6
6
|
|
7
|
-
1. **disabled** - during development, a feature can completely disabled so it isn't seen or executed.
|
8
|
-
2. **whitelist_only** - features can be turned on for specific users or groups.
|
7
|
+
1. **disabled** - during development, a feature can be completely disabled so it isn't seen or executed.
|
8
|
+
2. **whitelist_only** - features can be turned on for specific users or groups.
|
9
9
|
3. **sample10** - feature is enabled for roughly 10% of users
|
10
|
-
4. **
|
10
|
+
4. **sample30** - feature is enabled for rougly 30% of users
|
11
11
|
5. **sample50** - feature is enabled for rougly 50% of users
|
12
|
-
6. **all_except_blacklist** - feature is enabled for everyone except
|
13
|
-
6. **enabled** - enabled for all customers. At this point it is recommended to remove the feature flag from the system
|
12
|
+
6. **all_except_blacklist** - feature is enabled for everyone except a specified list of customers. These customers could be enterprise clients that must be notified before enabling new features, etc.
|
13
|
+
6. **enabled** - enabled for all customers. At this point it is recommended to remove the feature flag from the system since the roll out is complete.
|
14
14
|
|
15
15
|
|
16
16
|
## Installation
|
@@ -50,7 +50,7 @@ else
|
|
50
50
|
end
|
51
51
|
```
|
52
52
|
|
53
|
-
You can also pass a string identifier to FeatureCop. Identifiers can be anything but are typicall a user_id or a group_id. Identifiers are used for the whitelist, sample10,
|
53
|
+
You can also pass a string identifier to FeatureCop. Identifiers can be anything but are typicall a user_id or a group_id. Identifiers are used for the whitelist, sample10, sample30, sample50, and blacklist feature types.
|
54
54
|
|
55
55
|
```ruby
|
56
56
|
|
data/lib/feature_cop/version.rb
CHANGED
data/lib/feature_cop.rb
CHANGED
@@ -44,12 +44,12 @@ module FeatureCop
|
|
44
44
|
identifier.bytes.sum % 10 == 0
|
45
45
|
end
|
46
46
|
|
47
|
-
def self.
|
48
|
-
identifier.bytes.sum %
|
47
|
+
def self.sample30(identifier)
|
48
|
+
identifier.bytes.sum % 3 == 0
|
49
49
|
end
|
50
50
|
|
51
51
|
def self.sample50(identifier)
|
52
|
-
identifier.bytes.sum
|
52
|
+
identifier.bytes.sum.odd?
|
53
53
|
end
|
54
54
|
|
55
55
|
def self.set_features
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: feature_cop
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Brett Allred
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-04-
|
11
|
+
date: 2016-04-30 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activesupport
|
@@ -78,7 +78,6 @@ files:
|
|
78
78
|
- CODE_OF_CONDUCT.md
|
79
79
|
- Gemfile
|
80
80
|
- LICENSE
|
81
|
-
- LICENSE.txt
|
82
81
|
- README.md
|
83
82
|
- Rakefile
|
84
83
|
- bin/console
|
data/LICENSE.txt
DELETED
@@ -1,21 +0,0 @@
|
|
1
|
-
The MIT License (MIT)
|
2
|
-
|
3
|
-
Copyright (c) 2016 Brett Allred
|
4
|
-
|
5
|
-
Permission is hereby granted, free of charge, to any person obtaining a copy
|
6
|
-
of this software and associated documentation files (the "Software"), to deal
|
7
|
-
in the Software without restriction, including without limitation the rights
|
8
|
-
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
9
|
-
copies of the Software, and to permit persons to whom the Software is
|
10
|
-
furnished to do so, subject to the following conditions:
|
11
|
-
|
12
|
-
The above copyright notice and this permission notice shall be included in
|
13
|
-
all copies or substantial portions of the Software.
|
14
|
-
|
15
|
-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
16
|
-
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
17
|
-
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
18
|
-
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
19
|
-
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
20
|
-
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
21
|
-
THE SOFTWARE.
|