rollout_rest_api 0.0.1 → 2.0.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -13,8 +13,9 @@ GEM
13
13
  rack-test (0.6.1)
14
14
  rack (>= 1.0)
15
15
  rake (0.9.2.2)
16
- redis (2.2.2)
17
- rollout (1.1.0)
16
+ redis (3.0.2)
17
+ rollout (2.0.0b)
18
+ redis
18
19
  rspec (2.8.0)
19
20
  rspec-core (~> 2.8.0)
20
21
  rspec-expectations (~> 2.8.0)
@@ -24,9 +25,9 @@ GEM
24
25
  diff-lcs (~> 1.1.2)
25
26
  rspec-mocks (2.8.0)
26
27
  sinatra (1.3.2)
27
- rack (>= 1.3.6, ~> 1.3)
28
+ rack (~> 1.3, >= 1.3.6)
28
29
  rack-protection (~> 1.2)
29
- tilt (>= 1.3.3, ~> 1.3)
30
+ tilt (~> 1.3, >= 1.3.3)
30
31
  tilt (1.3.3)
31
32
  yajl-ruby (0.8.3)
32
33
 
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.0.1
1
+ 2.0.0
@@ -8,7 +8,7 @@ class RolloutRestAPI < Sinatra::Base
8
8
  end
9
9
 
10
10
  get "/:feature.json" do
11
- Yajl::Encoder.encode(rollout.info(params[:feature]))
11
+ Yajl::Encoder.encode(rollout.get(params[:feature]).to_hash)
12
12
  end
13
13
 
14
14
  put "/:feature/groups" do
@@ -36,7 +36,7 @@ class RolloutRestAPI < Sinatra::Base
36
36
  end
37
37
 
38
38
  delete "/:feature" do
39
- rollout.deactivate_all(params[:feature])
39
+ rollout.deactivate(params[:feature])
40
40
  "ok"
41
41
  end
42
42
 
@@ -5,11 +5,11 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = "rollout_rest_api"
8
- s.version = "0.0.1"
8
+ s.version = "2.0.0"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["James Golick"]
12
- s.date = "2012-02-20"
12
+ s.date = "2012-11-10"
13
13
  s.description = ""
14
14
  s.email = "jamesgolick@gmail.com"
15
15
  s.extra_rdoc_files = [
@@ -21,13 +21,13 @@ describe "RolloutRestApi" do
21
21
  get "/chat.json"
22
22
 
23
23
  last_response.should be_ok
24
- last_response.body.should == Yajl::Encoder.encode(@rollout.info(:chat))
24
+ last_response.body.should == Yajl::Encoder.encode(@rollout.get(:chat).to_hash)
25
25
  end
26
26
 
27
27
  it "adds a group" do
28
28
  put "/chat/groups", :group => "caretakers"
29
29
  last_response.should be_ok
30
- @rollout.info(:chat)[:groups].should include(:caretakers)
30
+ @rollout.get(:chat).groups.should include(:caretakers)
31
31
  end
32
32
 
33
33
  it "removes a group" do
@@ -36,13 +36,13 @@ describe "RolloutRestApi" do
36
36
 
37
37
  delete "/chat/groups", :group => "caretakers"
38
38
  last_response.should be_ok
39
- @rollout.info(:chat)[:groups].should == [:greeters]
39
+ @rollout.get(:chat).groups.should == [:greeters]
40
40
  end
41
41
 
42
42
  it "adds a user" do
43
43
  put "/chat/users", :user => 129315
44
44
  last_response.should be_ok
45
- @rollout.info(:chat)[:users].should include(129315)
45
+ @rollout.get(:chat).users.should include(129315)
46
46
  end
47
47
 
48
48
  it "removes a user" do
@@ -51,13 +51,13 @@ describe "RolloutRestApi" do
51
51
 
52
52
  delete "/chat/users", :user => 129315
53
53
  last_response.should be_ok
54
- @rollout.info(:chat)[:users].should == [1]
54
+ @rollout.get(:chat).users.should == [1]
55
55
  end
56
56
 
57
57
  it "sets the percentage" do
58
58
  put "/chat/percentage", :percentage => 22
59
59
  last_response.should be_ok
60
- @rollout.info(:chat)[:percentage].should == 22
60
+ @rollout.get(:chat).percentage.should == 22
61
61
  end
62
62
 
63
63
  it "deactivate_alls" do
@@ -67,6 +67,6 @@ describe "RolloutRestApi" do
67
67
 
68
68
  delete "/chat"
69
69
  last_response.should be_ok
70
- @rollout.info(:chat).should == {:groups => [], :users => [], :percentage => 0}
70
+ @rollout.get(:chat).to_hash.should == {:groups => [], :users => [], :percentage => 0}
71
71
  end
72
72
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rollout_rest_api
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.1
4
+ version: 2.0.0
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,11 +9,11 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2012-02-20 00:00:00.000000000 Z
12
+ date: 2012-11-10 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: sinatra
16
- requirement: &70320390852300 !ruby/object:Gem::Requirement
16
+ requirement: &70106524615480 !ruby/object:Gem::Requirement
17
17
  none: false
18
18
  requirements:
19
19
  - - ! '>='
@@ -21,10 +21,10 @@ dependencies:
21
21
  version: '0'
22
22
  type: :runtime
23
23
  prerelease: false
24
- version_requirements: *70320390852300
24
+ version_requirements: *70106524615480
25
25
  - !ruby/object:Gem::Dependency
26
26
  name: yajl-ruby
27
- requirement: &70320390850660 !ruby/object:Gem::Requirement
27
+ requirement: &70106524615000 !ruby/object:Gem::Requirement
28
28
  none: false
29
29
  requirements:
30
30
  - - ! '>='
@@ -32,10 +32,10 @@ dependencies:
32
32
  version: '0'
33
33
  type: :runtime
34
34
  prerelease: false
35
- version_requirements: *70320390850660
35
+ version_requirements: *70106524615000
36
36
  - !ruby/object:Gem::Dependency
37
37
  name: rollout
38
- requirement: &70320390848900 !ruby/object:Gem::Requirement
38
+ requirement: &70106524614440 !ruby/object:Gem::Requirement
39
39
  none: false
40
40
  requirements:
41
41
  - - ! '>='
@@ -43,10 +43,10 @@ dependencies:
43
43
  version: '0'
44
44
  type: :runtime
45
45
  prerelease: false
46
- version_requirements: *70320390848900
46
+ version_requirements: *70106524614440
47
47
  - !ruby/object:Gem::Dependency
48
48
  name: redis
49
- requirement: &70320390864060 !ruby/object:Gem::Requirement
49
+ requirement: &70106524613880 !ruby/object:Gem::Requirement
50
50
  none: false
51
51
  requirements:
52
52
  - - ! '>='
@@ -54,10 +54,10 @@ dependencies:
54
54
  version: '0'
55
55
  type: :runtime
56
56
  prerelease: false
57
- version_requirements: *70320390864060
57
+ version_requirements: *70106524613880
58
58
  - !ruby/object:Gem::Dependency
59
59
  name: rspec
60
- requirement: &70320390862840 !ruby/object:Gem::Requirement
60
+ requirement: &70106524613160 !ruby/object:Gem::Requirement
61
61
  none: false
62
62
  requirements:
63
63
  - - ~>
@@ -65,10 +65,10 @@ dependencies:
65
65
  version: 2.8.0
66
66
  type: :development
67
67
  prerelease: false
68
- version_requirements: *70320390862840
68
+ version_requirements: *70106524613160
69
69
  - !ruby/object:Gem::Dependency
70
70
  name: bundler
71
- requirement: &70320390862080 !ruby/object:Gem::Requirement
71
+ requirement: &70106524612040 !ruby/object:Gem::Requirement
72
72
  none: false
73
73
  requirements:
74
74
  - - ~>
@@ -76,10 +76,10 @@ dependencies:
76
76
  version: 1.0.0
77
77
  type: :development
78
78
  prerelease: false
79
- version_requirements: *70320390862080
79
+ version_requirements: *70106524612040
80
80
  - !ruby/object:Gem::Dependency
81
81
  name: jeweler
82
- requirement: &70320390859820 !ruby/object:Gem::Requirement
82
+ requirement: &70106524611560 !ruby/object:Gem::Requirement
83
83
  none: false
84
84
  requirements:
85
85
  - - ~>
@@ -87,10 +87,10 @@ dependencies:
87
87
  version: 1.6.4
88
88
  type: :development
89
89
  prerelease: false
90
- version_requirements: *70320390859820
90
+ version_requirements: *70106524611560
91
91
  - !ruby/object:Gem::Dependency
92
92
  name: rack-test
93
- requirement: &70320390858660 !ruby/object:Gem::Requirement
93
+ requirement: &70106524610960 !ruby/object:Gem::Requirement
94
94
  none: false
95
95
  requirements:
96
96
  - - ! '>='
@@ -98,7 +98,7 @@ dependencies:
98
98
  version: '0'
99
99
  type: :development
100
100
  prerelease: false
101
- version_requirements: *70320390858660
101
+ version_requirements: *70106524610960
102
102
  description: ''
103
103
  email: jamesgolick@gmail.com
104
104
  executables: []
@@ -134,7 +134,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
134
134
  version: '0'
135
135
  segments:
136
136
  - 0
137
- hash: -3075717740029724387
137
+ hash: -3380617777432256788
138
138
  required_rubygems_version: !ruby/object:Gem::Requirement
139
139
  none: false
140
140
  requirements: