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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 9e1f95a32775c436171633f817e7e76822c29286
4
- data.tar.gz: 60e06e3dd10ed4ca78b65818ace9589589bd982d
3
+ metadata.gz: 23e13c27a95eb98d2e6575e2496cf0508a97b38c
4
+ data.tar.gz: ab18e2e7f822c9d0e4cf0f2be37c8eb01c27d704
5
5
  SHA512:
6
- metadata.gz: a5813436e352897917ae79feab51cea416782fd8a5c8756702eb869db5c04fcb3a3d853c869972ee182639e4d26dd4717e6eab6802f3e028f1bf0b53cd48a93a
7
- data.tar.gz: 9731ccc6a042b404048ef56ad720035421aa6f41a060c533de60632de81ef99ddbe50cf83e69cdab8c79a60c3fe6e236e98ffab84c28848db3d1640bae2f1ce5
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 humongous pull requests, messy merges, and long integrations. 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.
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. For example, QA users can be whitelisted, then a small group of customers, etc.
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. **sample25** - feature is enabled for rougly 25% of users
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 for 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 as the roll out is complete.
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, sample25, sample50, and blacklist feature types.
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
 
@@ -1,3 +1,3 @@
1
1
  module FeatureCop
2
- VERSION = "0.1.1"
2
+ VERSION = "0.1.2"
3
3
  end
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.sample25(identifier)
48
- identifier.bytes.sum % 4 == 0
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 % 2 == 0
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.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-28 00:00:00.000000000 Z
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.