rollout_control 0.0.3 → 0.1.0

Sign up to get free protection for your applications and to get access to all the features.
File without changes
@@ -48,21 +48,21 @@ class RolloutControlTest < ActionDispatch::IntegrationTest
48
48
 
49
49
  test "update feature percentage" do
50
50
  rollout.activate(:kittens)
51
- patch '/rollout/features/kittens', { percentage: '65' }
51
+ patch '/rollout/features/kittens', params: { percentage: '65' }
52
52
  assert_response :success
53
53
  assert_equal 65, rollout.get(:kittens).percentage
54
54
  end
55
55
 
56
56
  test "add group to feature" do
57
57
  rollout.deactivate(:extra_sharp_knives)
58
- post 'rollout/features/extra_sharp_knives/groups', group: 'experienced_chefs'
58
+ post '/rollout/features/extra_sharp_knives/groups', params: { group: 'experienced_chefs' }
59
59
  assert_equal 0, rollout.get(:extra_sharp_knives).percentage
60
60
  assert_equal [:experienced_chefs], rollout.get(:extra_sharp_knives).groups
61
61
  end
62
62
 
63
63
  test "attempt to add group to feature without a group name" do
64
64
  rollout.deactivate(:extra_sharp_knives)
65
- post 'rollout/features/extra_sharp_knives/groups'
65
+ post '/rollout/features/extra_sharp_knives/groups'
66
66
  assert_response 400
67
67
  assert_equal [], rollout.get(:extra_sharp_knives).groups
68
68
  end
@@ -70,14 +70,14 @@ class RolloutControlTest < ActionDispatch::IntegrationTest
70
70
  test "remove group from feature" do
71
71
  rollout.deactivate(:extra_sharp_knives)
72
72
  rollout.activate_group(:extra_sharp_knives, :experienced_chefs)
73
- delete 'rollout/features/extra_sharp_knives/groups/experienced_chefs'
73
+ delete '/rollout/features/extra_sharp_knives/groups/experienced_chefs'
74
74
  assert_equal 0, rollout.get(:extra_sharp_knives).percentage
75
75
  assert_equal [], rollout.get(:extra_sharp_knives).groups
76
76
  end
77
77
 
78
78
  test "add user to feature" do
79
79
  rollout.deactivate(:potato_gun)
80
- post 'rollout/features/potato_gun/users', user_id: 45
80
+ post '/rollout/features/potato_gun/users', params: { user_id: 45 }
81
81
  assert_equal 0, rollout.get(:potato_gun).percentage
82
82
  assert_equal ['45'], rollout.get(:potato_gun).users
83
83
  assert rollout.active?(:potato_gun, user(45))
@@ -85,7 +85,7 @@ class RolloutControlTest < ActionDispatch::IntegrationTest
85
85
 
86
86
  test "attempt to activate user to feature without a user id" do
87
87
  rollout.deactivate(:potato_gun)
88
- post 'rollout/features/potato_gun/users'
88
+ post '/rollout/features/potato_gun/users'
89
89
  assert_response 400
90
90
  assert_equal [], rollout.get(:potato_gun).users
91
91
  end
@@ -93,7 +93,7 @@ class RolloutControlTest < ActionDispatch::IntegrationTest
93
93
  test "remove user from feature" do
94
94
  rollout.deactivate(:potato_gun)
95
95
  rollout.activate_user(:potato_gun, user(45))
96
- delete 'rollout/features/potato_gun/users/45'
96
+ delete '/rollout/features/potato_gun/users/45'
97
97
  assert_equal 0, rollout.get(:potato_gun).percentage
98
98
  assert_equal [], rollout.get(:potato_gun).groups
99
99
  refute rollout.active?(:potato_gun, user(45))
@@ -108,7 +108,7 @@ class RolloutControlTest < ActionDispatch::IntegrationTest
108
108
 
109
109
  test "can login with configured username and password" do
110
110
  with_protected_app do
111
- get '/rollout/features', {}, env_with_basic_auth
111
+ get '/rollout/features', headers: env_with_basic_auth
112
112
  end
113
113
  assert_response :success
114
114
  end
@@ -117,7 +117,7 @@ class RolloutControlTest < ActionDispatch::IntegrationTest
117
117
  with_protected_app do
118
118
  RolloutControl.basic_auth_username = ''
119
119
  RolloutControl.basic_auth_password = ''
120
- get '/rollout/features', {}, env_with_basic_auth
120
+ get '/rollout/features', headers: env_with_basic_auth
121
121
  end
122
122
  assert_response :unauthorized
123
123
  end
metadata CHANGED
@@ -1,43 +1,43 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rollout_control
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.3
4
+ version: 0.1.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Aaron Royer
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-11-13 00:00:00.000000000 Z
11
+ date: 2017-07-18 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails
15
15
  requirement: !ruby/object:Gem::Requirement
16
16
  requirements:
17
- - - "~>"
17
+ - - ">="
18
18
  - !ruby/object:Gem::Version
19
- version: '4.0'
19
+ version: '0'
20
20
  type: :runtime
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
- - - "~>"
24
+ - - ">="
25
25
  - !ruby/object:Gem::Version
26
- version: '4.0'
26
+ version: '0'
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: rollout
29
29
  requirement: !ruby/object:Gem::Requirement
30
30
  requirements:
31
- - - "~>"
31
+ - - ">="
32
32
  - !ruby/object:Gem::Version
33
- version: '2.0'
33
+ version: '0'
34
34
  type: :runtime
35
35
  prerelease: false
36
36
  version_requirements: !ruby/object:Gem::Requirement
37
37
  requirements:
38
- - - "~>"
38
+ - - ">="
39
39
  - !ruby/object:Gem::Version
40
- version: '2.0'
40
+ version: '0'
41
41
  - !ruby/object:Gem::Dependency
42
42
  name: fakeredis
43
43
  requirement: !ruby/object:Gem::Requirement
@@ -66,6 +66,20 @@ dependencies:
66
66
  - - ">="
67
67
  - !ruby/object:Gem::Version
68
68
  version: '0'
69
+ - !ruby/object:Gem::Dependency
70
+ name: sqlite3
71
+ requirement: !ruby/object:Gem::Requirement
72
+ requirements:
73
+ - - ">="
74
+ - !ruby/object:Gem::Version
75
+ version: '0'
76
+ type: :development
77
+ prerelease: false
78
+ version_requirements: !ruby/object:Gem::Requirement
79
+ requirements:
80
+ - - ">="
81
+ - !ruby/object:Gem::Version
82
+ version: '0'
69
83
  description: rollout API as a Rails engine
70
84
  email:
71
85
  - aaronroyer@gmail.com
@@ -84,7 +98,6 @@ files:
84
98
  - lib/rollout_control/engine.rb
85
99
  - lib/rollout_control/version.rb
86
100
  - lib/tasks/rollout_control_tasks.rake
87
- - test/controllers/rollout_control/features_controller_test.rb
88
101
  - test/dummy/README.rdoc
89
102
  - test/dummy/Rakefile
90
103
  - test/dummy/app/assets/javascripts/application.js
@@ -98,6 +111,7 @@ files:
98
111
  - test/dummy/config.ru
99
112
  - test/dummy/config/application.rb
100
113
  - test/dummy/config/boot.rb
114
+ - test/dummy/config/database.yml
101
115
  - test/dummy/config/environment.rb
102
116
  - test/dummy/config/environments/development.rb
103
117
  - test/dummy/config/environments/production.rb
@@ -118,6 +132,7 @@ files:
118
132
  - test/dummy/public/422.html
119
133
  - test/dummy/public/500.html
120
134
  - test/dummy/public/favicon.ico
135
+ - test/dummy/rollout_control
121
136
  - test/integration/rollout_control/rollout_control_test.rb
122
137
  - test/test_helper.rb
123
138
  homepage: https://github.com/hired/rollout_control
@@ -140,12 +155,11 @@ required_rubygems_version: !ruby/object:Gem::Requirement
140
155
  version: '0'
141
156
  requirements: []
142
157
  rubyforge_project:
143
- rubygems_version: 2.2.2
158
+ rubygems_version: 2.6.11
144
159
  signing_key:
145
160
  specification_version: 4
146
161
  summary: Allows controlling rollout remotely with clients such as chat bots
147
162
  test_files:
148
- - test/controllers/rollout_control/features_controller_test.rb
149
163
  - test/dummy/app/assets/javascripts/application.js
150
164
  - test/dummy/app/assets/stylesheets/application.css
151
165
  - test/dummy/app/controllers/application_controller.rb
@@ -156,6 +170,7 @@ test_files:
156
170
  - test/dummy/bin/rake
157
171
  - test/dummy/config/application.rb
158
172
  - test/dummy/config/boot.rb
173
+ - test/dummy/config/database.yml
159
174
  - test/dummy/config/environment.rb
160
175
  - test/dummy/config/environments/development.rb
161
176
  - test/dummy/config/environments/production.rb
@@ -179,5 +194,6 @@ test_files:
179
194
  - test/dummy/public/favicon.ico
180
195
  - test/dummy/Rakefile
181
196
  - test/dummy/README.rdoc
197
+ - test/dummy/rollout_control
182
198
  - test/integration/rollout_control/rollout_control_test.rb
183
199
  - test/test_helper.rb
@@ -1,8 +0,0 @@
1
- require 'test_helper'
2
-
3
- module RolloutControl
4
- class FeaturesControllerTest < ActionController::TestCase
5
- test "wat" do
6
- end
7
- end
8
- end