feature_gate 0.0.2 → 0.0.3

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: 5e5aaa2b3b127c40a183bf56474c3d51e83b99ed
4
- data.tar.gz: 4e16d0d5be5d109c68ae4f1e5d2b60fb9ee18632
3
+ metadata.gz: 2bdc16f19784953a17913752f516888920634b15
4
+ data.tar.gz: 6be70883d7a7a10f51f73b2106669cd01ec617eb
5
5
  SHA512:
6
- metadata.gz: 5eef58aa1d1e0588e927c6271e094e28c05d0e2e0226ad47322101ebcea4315630d8f7658f268e12e35e276d6d985ece47e37c23b56aa3b13c9805e594b165a6
7
- data.tar.gz: 9fabce6f726498cc55f230fa1d864939e96490274bc21b0849a404e8a2bac90ee90d1196d434cce689fa7bc84dc471d7975580a49a72c9ca7517fae769fb9768
6
+ metadata.gz: cf3683156c5bf0b798778c78991c744f5820af40a8007dfdbbae2500e73997897702e83d6cf401a7d571ebbb5d25deb7339134636ac40e14f795d104f5b73166
7
+ data.tar.gz: e1269f254bbe3bd5edb2085ac2793818a9412d9ecbbaaf351ab7c44853b33a1f51ffadee31b15e213816d247320d662d3d0b18404909f5c23e632cf596214201
data/Gemfile ADDED
@@ -0,0 +1,3 @@
1
+ source "https://rubygems.org"
2
+
3
+ gemspec
data/Gemfile.lock ADDED
@@ -0,0 +1,93 @@
1
+ PATH
2
+ remote: .
3
+ specs:
4
+ feature_gate (0.0.3)
5
+ rails (~> 3.2.18)
6
+
7
+ GEM
8
+ remote: https://rubygems.org/
9
+ specs:
10
+ actionmailer (3.2.22.2)
11
+ actionpack (= 3.2.22.2)
12
+ mail (~> 2.5.4)
13
+ actionpack (3.2.22.2)
14
+ activemodel (= 3.2.22.2)
15
+ activesupport (= 3.2.22.2)
16
+ builder (~> 3.0.0)
17
+ erubis (~> 2.7.0)
18
+ journey (~> 1.0.4)
19
+ rack (~> 1.4.5)
20
+ rack-cache (~> 1.2)
21
+ rack-test (~> 0.6.1)
22
+ sprockets (~> 2.2.1)
23
+ activemodel (3.2.22.2)
24
+ activesupport (= 3.2.22.2)
25
+ builder (~> 3.0.0)
26
+ activerecord (3.2.22.2)
27
+ activemodel (= 3.2.22.2)
28
+ activesupport (= 3.2.22.2)
29
+ arel (~> 3.0.2)
30
+ tzinfo (~> 0.3.29)
31
+ activeresource (3.2.22.2)
32
+ activemodel (= 3.2.22.2)
33
+ activesupport (= 3.2.22.2)
34
+ activesupport (3.2.22.2)
35
+ i18n (~> 0.6, >= 0.6.4)
36
+ multi_json (~> 1.0)
37
+ arel (3.0.3)
38
+ builder (3.0.4)
39
+ erubis (2.7.0)
40
+ hike (1.2.3)
41
+ i18n (0.7.0)
42
+ journey (1.0.4)
43
+ json (1.8.3)
44
+ mail (2.5.4)
45
+ mime-types (~> 1.16)
46
+ treetop (~> 1.4.8)
47
+ mime-types (1.25.1)
48
+ multi_json (1.11.3)
49
+ polyglot (0.3.5)
50
+ rack (1.4.7)
51
+ rack-cache (1.6.1)
52
+ rack (>= 0.4)
53
+ rack-ssl (1.3.4)
54
+ rack
55
+ rack-test (0.6.3)
56
+ rack (>= 1.0)
57
+ rails (3.2.22.2)
58
+ actionmailer (= 3.2.22.2)
59
+ actionpack (= 3.2.22.2)
60
+ activerecord (= 3.2.22.2)
61
+ activeresource (= 3.2.22.2)
62
+ activesupport (= 3.2.22.2)
63
+ bundler (~> 1.0)
64
+ railties (= 3.2.22.2)
65
+ railties (3.2.22.2)
66
+ actionpack (= 3.2.22.2)
67
+ activesupport (= 3.2.22.2)
68
+ rack-ssl (~> 1.3.2)
69
+ rake (>= 0.8.7)
70
+ rdoc (~> 3.4)
71
+ thor (>= 0.14.6, < 2.0)
72
+ rake (11.1.2)
73
+ rdoc (3.12.2)
74
+ json (~> 1.4)
75
+ sprockets (2.2.3)
76
+ hike (~> 1.2)
77
+ multi_json (~> 1.0)
78
+ rack (~> 1.0)
79
+ tilt (~> 1.1, != 1.3.0)
80
+ sqlite3 (1.3.11)
81
+ thor (0.19.1)
82
+ tilt (1.4.1)
83
+ treetop (1.4.15)
84
+ polyglot
85
+ polyglot (>= 0.3.1)
86
+ tzinfo (0.3.49)
87
+
88
+ PLATFORMS
89
+ ruby
90
+
91
+ DEPENDENCIES
92
+ feature_gate!
93
+ sqlite3 (~> 1.3)
@@ -0,0 +1,8 @@
1
+ class FeatureGate
2
+ def self.gate(name)
3
+ gated_feature = GatedFeature.where(name: name).first_or_create
4
+ if !gated_feature.gated?
5
+ yield
6
+ end
7
+ end
8
+ end
data/feature_gate.gemspec CHANGED
@@ -1,8 +1,9 @@
1
1
  $:.push File.expand_path('../lib', __FILE__)
2
+ require 'feature_gate/version'
2
3
 
3
4
  Gem::Specification.new do |s|
4
5
  s.name = 'feature_gate'
5
- s.version = '0.0.2'
6
+ s.version = FeatureGate::VERSION.dup
6
7
  s.date = '2016-05-01'
7
8
  s.summary = 'A gem to toggle feature gates on and off'
8
9
  s.description = 'A gem to toggle feature gates on and off'
@@ -11,4 +12,8 @@ Gem::Specification.new do |s|
11
12
  s.files = `git ls-files`.split("\n")
12
13
  s.homepage = 'https://github.com/tiffling/feature_gate'
13
14
  s.license = 'MIT'
15
+ s.require_paths = ['lib']
16
+
17
+ s.add_dependency 'rails', '~> 3.2.18'
18
+ s.add_development_dependency('sqlite3', '~> 1.3')
14
19
  end
data/lib/feature_gate.rb CHANGED
@@ -1,7 +1,14 @@
1
- class FeatureGate
2
- def self.gate
3
- if true
4
- yield
5
- end
1
+ require 'active_support/dependencies'
2
+
3
+ module FeatureGate
4
+ # Our host application root path
5
+ # We set this when the engine is initialized
6
+ mattr_accessor :app_root
7
+
8
+ # Yield self on setup for nice config blocks
9
+ def self.setup
10
+ yield self
6
11
  end
7
12
  end
13
+
14
+ require 'feature_gate/engine'
@@ -0,0 +1,4 @@
1
+ module FeatureGate
2
+ class Engine < Rails::Engine
3
+ end
4
+ end
@@ -0,0 +1,3 @@
1
+ module FeatureGate
2
+ VERSION = '0.0.3'.freeze
3
+ end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: feature_gate
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.2
4
+ version: 0.0.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Tiffany Huang
@@ -9,7 +9,35 @@ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
11
  date: 2016-05-01 00:00:00.000000000 Z
12
- dependencies: []
12
+ dependencies:
13
+ - !ruby/object:Gem::Dependency
14
+ name: rails
15
+ requirement: !ruby/object:Gem::Requirement
16
+ requirements:
17
+ - - ~>
18
+ - !ruby/object:Gem::Version
19
+ version: 3.2.18
20
+ type: :runtime
21
+ prerelease: false
22
+ version_requirements: !ruby/object:Gem::Requirement
23
+ requirements:
24
+ - - ~>
25
+ - !ruby/object:Gem::Version
26
+ version: 3.2.18
27
+ - !ruby/object:Gem::Dependency
28
+ name: sqlite3
29
+ requirement: !ruby/object:Gem::Requirement
30
+ requirements:
31
+ - - ~>
32
+ - !ruby/object:Gem::Version
33
+ version: '1.3'
34
+ type: :development
35
+ prerelease: false
36
+ version_requirements: !ruby/object:Gem::Requirement
37
+ requirements:
38
+ - - ~>
39
+ - !ruby/object:Gem::Version
40
+ version: '1.3'
13
41
  description: A gem to toggle feature gates on and off
14
42
  email: little.huang@gmail.
15
43
  executables: []
@@ -17,11 +45,16 @@ extensions: []
17
45
  extra_rdoc_files: []
18
46
  files:
19
47
  - .gitignore
48
+ - Gemfile
49
+ - Gemfile.lock
20
50
  - LICENSE
21
51
  - README.md
52
+ - app/models/feature_gate.rb
22
53
  - app/models/gated_feature.rb
23
54
  - feature_gate.gemspec
24
55
  - lib/feature_gate.rb
56
+ - lib/feature_gate/engine.rb
57
+ - lib/feature_gate/version.rb
25
58
  - lib/generators/feature_gate/feature_gate_generator.rb
26
59
  - lib/generators/feature_gate/templates/migration.rb
27
60
  homepage: https://github.com/tiffling/feature_gate