flipper 0.7.2 → 0.7.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: ead277793aee2dece9038ca1cdd59ac0607a5cc4
4
- data.tar.gz: c10127accd784df6b64e54442568e29bd4ddadde
3
+ metadata.gz: 33833a9ba8f6584f1e9edb8dc1f14a2a9caf33d8
4
+ data.tar.gz: 9f403d9bac096bc8c63d4005ee5558bf260a216d
5
5
  SHA512:
6
- metadata.gz: 11dea621bb4989d05bf945de1c006e81029259e1996690aecc9327a879877f73d81813cb12c0f0afd47ecf53a93e6dfc235c6f370c9be0a149d0077f5ecf63c0
7
- data.tar.gz: 55d930c0fb9031ed9470311805b613e831d610c70d0664338fa0a0e9f008785fa82302380f4dd0dbc3a37d8e019128343769faf5d8d20c4adbb3459370f6f04a
6
+ metadata.gz: 9bc12eb4d1c7238a3823779afe58bb0624e28f5be6550d79d84019a1c9b00593f3029a310e198f1645db27891c6a35cfe7785944f21d4d872f387a2b83988181
7
+ data.tar.gz: aa6f0db920cdea34f93e85dbae44e99632a68d45bb4154fd06d40c42dc94adfbd153c9df5e2784dc2db271b703ab67427036bcc6b56ab1c2595a652342370ef4
data/Gemfile CHANGED
@@ -12,7 +12,11 @@ gem 'shotgun', '~> 0.9'
12
12
  gem 'statsd-ruby', '~> 1.2.1'
13
13
  gem 'rspec', '~> 3.0'
14
14
  gem 'rack-test', '~> 0.6.3'
15
- gem 'activesupport', '~> 4.2.0'
15
+ gem 'sqlite3', '~> 1.3.11'
16
+ gem 'rails', "~> #{ENV["RAILS_VERSION"] || '4.2.5'}"
17
+
18
+ # for active support tests in test/ and only needed for ruby 2.2.x
19
+ gem 'test-unit', '~> 3.0'
16
20
 
17
21
  group(:guard) do
18
22
  gem 'guard', '~> 2.12.5'
data/Rakefile CHANGED
@@ -36,3 +36,9 @@ namespace :spec do
36
36
  end
37
37
 
38
38
  task :default => :spec
39
+
40
+ task :test do
41
+ sh "bundle exec ruby -Itest test/generators/flipper/active_record_generator_test.rb"
42
+ end
43
+
44
+ task :default => :test
@@ -65,7 +65,7 @@ shared_examples_for 'a flipper adapter' do
65
65
  expect(subject.enable(feature, actors_gate, flipper.actors(25))).to eq(true)
66
66
  expect(subject.enable(feature, time_gate, flipper.time(45))).to eq(true)
67
67
 
68
- expect(subject.disable(feature, boolean_gate, flipper.boolean)).to eq(true)
68
+ expect(subject.disable(feature, boolean_gate, flipper.boolean(false))).to eq(true)
69
69
 
70
70
  expect(subject.get(feature)).to eq({
71
71
  :boolean => nil,
@@ -1,3 +1,3 @@
1
1
  module Flipper
2
- VERSION = "0.7.2"
2
+ VERSION = "0.7.3"
3
3
  end
@@ -0,0 +1,22 @@
1
+ class CreateFlipperTables < ActiveRecord::Migration
2
+ def self.up
3
+ create_table :flipper_features do |t|
4
+ t.string :key, null: false
5
+ t.timestamps null: false
6
+ end
7
+ add_index :flipper_features, :key, unique: true
8
+
9
+ create_table :flipper_gates do |t|
10
+ t.string :feature_key, null: false
11
+ t.string :key, null: false
12
+ t.string :value
13
+ t.timestamps null: false
14
+ end
15
+ add_index :flipper_gates, [:feature_key, :key, :value], unique: true
16
+ end
17
+
18
+ def self.down
19
+ drop_table :flipper_gates
20
+ drop_table :flipper_features
21
+ end
22
+ end
@@ -0,0 +1,13 @@
1
+ $:.unshift(File.expand_path('../../lib', __FILE__))
2
+
3
+ require 'rubygems'
4
+ require 'bundler'
5
+ Bundler.setup(:default)
6
+ require 'rails'
7
+ require 'rails/test_help'
8
+
9
+ begin
10
+ ActiveSupport::TestCase.test_order = :random
11
+ rescue NoMethodError => boom
12
+ # no biggie, means we are on older version of AS that doesn't have this option
13
+ end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: flipper
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.7.2
4
+ version: 0.7.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - John Nunemaker
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-12-06 00:00:00.000000000 Z
11
+ date: 2015-12-23 00:00:00.000000000 Z
12
12
  dependencies: []
13
13
  description: Feature flipper is the act of enabling/disabling features in your application,
14
14
  ideally without re-deploying or changing anything in your code base. Flipper makes
@@ -80,6 +80,7 @@ files:
80
80
  - lib/flipper/types/percentage_of_actors.rb
81
81
  - lib/flipper/types/percentage_of_time.rb
82
82
  - lib/flipper/version.rb
83
+ - lib/generators/flipper/templates/migration.rb
83
84
  - spec/flipper/adapters/instrumented_spec.rb
84
85
  - spec/flipper/adapters/memoizable_spec.rb
85
86
  - spec/flipper/adapters/memory_spec.rb
@@ -113,6 +114,7 @@ files:
113
114
  - spec/integration_spec.rb
114
115
  - spec/support/fake_udp_socket.rb
115
116
  - spec/support/spec_helpers.rb
117
+ - test/helper.rb
116
118
  homepage: https://github.com/jnunemaker/flipper
117
119
  licenses:
118
120
  - MIT
@@ -133,7 +135,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
133
135
  version: '0'
134
136
  requirements: []
135
137
  rubyforge_project:
136
- rubygems_version: 2.2.2
138
+ rubygems_version: 2.4.5.1
137
139
  signing_key:
138
140
  specification_version: 4
139
141
  summary: Feature flipper for ANYTHING
@@ -171,3 +173,4 @@ test_files:
171
173
  - spec/integration_spec.rb
172
174
  - spec/support/fake_udp_socket.rb
173
175
  - spec/support/spec_helpers.rb
176
+ - test/helper.rb