floodgate 0.0.12 → 0.0.13

Sign up to get free protection for your applications and to get access to all the features.
Files changed (21) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +76 -10
  3. data/floodgate.gemspec +1 -0
  4. data/lib/floodgate/config.rb +4 -4
  5. data/lib/floodgate/version.rb +1 -1
  6. data/lib/tasks/floodgate_tasks.rake +5 -1
  7. data/spec/cassettes/Floodgate_Client/_add_ip_address/when_an_ip_address_is_specified/adds_it_to_the_list_of_allowed_ip_addresses.yml +194 -0
  8. data/spec/cassettes/Floodgate_Client/_allowed_ip_addresses/returns_the_allowed_ip_addresses.yml +118 -0
  9. data/spec/cassettes/Floodgate_Client/_close/changes_filter_traffic_from_false_to_true.yml +155 -0
  10. data/spec/cassettes/Floodgate_Client/_open/changes_filter_traffic_from_true_to_false.yml +155 -0
  11. data/spec/cassettes/Floodgate_Client/_remove_ip_address/when_an_ip_address_is_specified/removes_it_from_the_list_of_allowed_ip_addresses.yml +155 -0
  12. data/spec/cassettes/Floodgate_Client/_set_redirect_url/when_a_redirect_url_is_specified/changes_the_redirect_url.yml +155 -0
  13. data/spec/cassettes/Floodgate_Client/_set_redirect_url/when_nil_is_specified/clears_the_redirect_url.yml +155 -0
  14. data/spec/cassettes/Floodgate_Client/_status/when_the_credentials_are_not_valid/returns_the_default_status.yml +38 -0
  15. data/spec/cassettes/Floodgate_Client/_status/when_the_credentials_are_valid/and_traffic_filtering_is_enabled/filter_traffic_is_true.yml +40 -0
  16. data/spec/cassettes/Floodgate_Client/_status/when_the_credentials_are_valid/and_traffic_filtering_is_not_enabled/filter_traffic_is_false.yml +40 -0
  17. data/spec/lib/floodgate/client_spec.rb +5 -4
  18. data/spec/lib/floodgate/config_spec.rb +3 -19
  19. data/spec/lib/floodgate/control_spec.rb +4 -2
  20. data/spec/support/vcr.rb +8 -0
  21. metadata +37 -1
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 02d0a31c5adc8fc0c05a7adfc8851e847f203534
4
- data.tar.gz: 48cd70c1585d07a4ded3756439512ce71b31088c
3
+ metadata.gz: c358c66d74cbc183c5b78dc6674ec6034d133f91
4
+ data.tar.gz: a1214a49004c9700d3abe387669d11307cdf94d5
5
5
  SHA512:
6
- metadata.gz: 5c3a580540a16329b822ca4a99998beeaa44881730fe05a7ffe87233b4946e2625ff41ca516620f5064eead86b2627e7ba773cf85a0b55ce6dfb02a5a03e4623
7
- data.tar.gz: 1a97ae00ddeaf916ce97908f3b267f99fdc7a39f2b9b3a4e079d77fbab33128acdbd217efdbf0b4c18623b70b96e6ae4558a99200c772abdb7b3b037b2f2af60
6
+ metadata.gz: 1987cbbedb2f9dd1b67cd403ea96cadf9bcab0379e8d51f007858f650598013b09f9f15c884ce389f781a87de249d7751682909b0fabdc2ee58634a468900657
7
+ data.tar.gz: 0167490f609bc5e11b8129aa601aa40bbe7b8a23600a15e41bfdc7d9b58740e203736aa9c1640e211357384a74e235b86a79380d01584e47fd5d5c37ee49f1eb
data/README.md CHANGED
@@ -1,24 +1,90 @@
1
- # Floodgate
1
+ # [Floodgate]()
2
2
 
3
- TODO: Write a gem description
3
+ ## What is it?
4
4
 
5
- ## Installation
5
+ You've spent the last few weeks improving significant portions of your application and you're ready to deploy. The maintenance page goes up, the code is pushed, and doubt creeps in as to whether things are actually working. Did you remember to update those third party keys? Is that very clever code your co-worker wrote working as expected? Is there anything different about your production environment that's going to cause things to fail?
6
6
 
7
- Add this line to your application's Gemfile:
7
+ As developers we'd all prefer to live in a world where we're continuously deploying all of our test-driven code all the time. In reality, the process typically looks a little broken. Imagine being able to spend a few minutes with your app smoke testing to make sure everything works. With Floodgate in place you are able to provide access to developers, testers, and the product owner to click through and see things work the way they are supposed to before releasing your product to all of your customers.
8
+
9
+ ## Getting Started
10
+
11
+ Install Floodgate as a gem.
12
+
13
+ gem install floodgate
14
+
15
+ or by adding it to your Gemfile.
8
16
 
9
17
  gem 'floodgate'
10
18
 
11
- And then execute:
19
+ Then create an account at [Floodgate.io](http://floodgate.io). Once you receive your welcome email you can configure the middleware with one-line.
20
+
21
+ config.middleware.use Floodgate::Control, [YOUR_APP_ID], [YOUR_API_TOKEN]
22
+
23
+ Now that you've configured the floodgate you can check its status.
24
+
25
+ $ rake floodgate:status
26
+ allowed_ip_addresses: []
27
+ filter_traffic: false
28
+ name: your-app-name
29
+ redirect_url:
30
+
31
+ The floodgate is open by default and no traffic is filtered. You can close the floodgate with the following rake task.
32
+
33
+ $ rake floodgate:close
34
+
35
+ When using Heroku you will also need to restart your dyno for changes to take effect.
36
+
37
+ $ heroku restart
38
+
39
+ Checking its status we can see that we are now filtering traffic.
40
+
41
+ $ rake floodgate:status
42
+ allowed_ip_addresses: []
43
+ filter_traffic: true
44
+ name: your-app-name
45
+ redirect_url:
46
+
47
+ Visitors to the configured site will now receive a status 503 Service Unavailable. That seems less than ideal. Let's redirect them to a status page to let them know to try back in a few minutes.
48
+
49
+ $ rake floodgate:set_redirect_url redirect_url=http://bit.ly/1kw8F6q
50
+
51
+ Now its status includes the redirect URL
52
+
53
+ $ rake floodgate:status
54
+ allowed_ip_addresses: []
55
+ filter_traffic: true
56
+ name: your-app-name
57
+ redirect_url: http://bit.ly/1kw8F6q
58
+
59
+ When we visit the site (remember to restart Heroku if needed) we are now whisked away to the redirect URl. This is configured as a temporary redirect to minimize the impact from search engine spiders and other crawlers.
60
+
61
+ But, wait! How do we get in to smoke test? You'll need to determine what your IP address is as interpreted by the outside world. We suggest a service like [http://whatismyipaddress.com/]().
62
+
63
+ $ rake floodgate:ip_address:add ip_address=24.240.74.8
64
+
65
+ Checking its status we see now have an allowed IP address.
66
+
67
+ $ rake floodgate:status
68
+ allowed_ip_addresses: ["24.240.74.8"]
69
+ filter_traffic: true
70
+ name: your-app-name
71
+ redirect_url: http://bit.ly/1kw8F6q
12
72
 
13
- $ bundle
73
+ If we go back to the configured site (restart heroku if needed) and reload … We're in! We can smoke test and make sure things work as expected and when we're done let the rest of the internet in with the following command.
14
74
 
15
- Or install it yourself as:
75
+ $ rake floodgate:open
76
+ $ rake floodgate:status
77
+ allowed_ip_addresses: ["24.240.74.8"]
78
+ filter_traffic: false
79
+ name: your-app-name
80
+ redirect_url: http://bit.ly/1kw8F6q
16
81
 
17
- $ gem install floodgate
82
+ Restart Heroku and everyone can now access the application again, hooray!
18
83
 
19
- ## Usage
84
+ ### Support
20
85
 
21
- TODO: Write usage instructions here
86
+ * [Github Wiki](https://github.com/adorableio/floodgate/wiki)
87
+ * [Github Issues](https://github.com/adorableio/floodgate/wiki)
22
88
 
23
89
  ## Contributing
24
90
 
data/floodgate.gemspec CHANGED
@@ -26,4 +26,5 @@ Gem::Specification.new do |spec|
26
26
  spec.add_development_dependency 'rake'
27
27
  spec.add_development_dependency 'rspec', '~> 2.14'
28
28
  spec.add_development_dependency 'simplecov', '~> 0.8'
29
+ spec.add_development_dependency 'vcr', '~> 2.8'
29
30
  end
@@ -14,11 +14,11 @@ module Floodgate
14
14
  :redirect_url
15
15
 
16
16
  def initialize
17
- json = Client.status
17
+ status = Client.status
18
18
 
19
- @filter_traffic = json['filter_traffic']
20
- @redirect_url = json['redirect_url']
21
- @allowed_ip_addresses = json['allowed_ip_addresses'] || []
19
+ @filter_traffic = status.filter_traffic
20
+ @redirect_url = status.redirect_url
21
+ @allowed_ip_addresses = status.allowed_ip_addresses
22
22
  end
23
23
 
24
24
  def potential_client_addresses(env)
@@ -1,3 +1,3 @@
1
1
  module Floodgate
2
- VERSION = "0.0.12"
2
+ VERSION = "0.0.13"
3
3
  end
@@ -1,7 +1,11 @@
1
1
  namespace :floodgate do
2
2
  desc 'Display the floodgate status'
3
3
  task :status => :environment do
4
- puts Floodgate::Client.status
4
+ status = Floodgate::Client.status
5
+
6
+ status.each_pair do |key, value|
7
+ puts "#{key}: #{value}"
8
+ end
5
9
  end
6
10
 
7
11
  desc 'Close the floodgate'
@@ -0,0 +1,194 @@
1
+ ---
2
+ http_interactions:
3
+ - request:
4
+ method: delete
5
+ uri: https://floodgate-api-staging.herokuapp.com/api/v1/apps/9d2852cff163507330242460c0ca5eec/ip_addresses
6
+ body:
7
+ encoding: US-ASCII
8
+ string: ip_address%5Bip_address%5D=1.1.1.1&api_token=f28b5848e158f96e96168aa37f0002f2
9
+ headers:
10
+ User-Agent:
11
+ - FloodgateAgent
12
+ Content-Type:
13
+ - application/x-www-form-urlencoded
14
+ response:
15
+ status:
16
+ code: 200
17
+ message:
18
+ headers:
19
+ cache-control:
20
+ - max-age=0, private, must-revalidate
21
+ content-type:
22
+ - application/json
23
+ date:
24
+ - Fri, 28 Feb 2014 17:17:57 GMT
25
+ etag:
26
+ - "\"d751713988987e9331980363e24189ce\""
27
+ server:
28
+ - WEBrick/1.3.1 (Ruby/2.1.0/2013-12-25)
29
+ x-request-id:
30
+ - a3e29587-c822-447e-8a97-57e2defb1ea7
31
+ x-runtime:
32
+ - '0.011259'
33
+ content-length:
34
+ - '2'
35
+ connection:
36
+ - Close
37
+ body:
38
+ encoding: UTF-8
39
+ string: "[]"
40
+ http_version:
41
+ recorded_at: Fri, 28 Feb 2014 17:17:57 GMT
42
+ - request:
43
+ method: get
44
+ uri: https://floodgate-api-staging.herokuapp.com/api/v1/apps/9d2852cff163507330242460c0ca5eec/status?api_token=f28b5848e158f96e96168aa37f0002f2
45
+ body:
46
+ encoding: US-ASCII
47
+ string: ''
48
+ headers:
49
+ User-Agent:
50
+ - FloodgateAgent
51
+ response:
52
+ status:
53
+ code: 200
54
+ message:
55
+ headers:
56
+ cache-control:
57
+ - max-age=0, private, must-revalidate
58
+ content-type:
59
+ - application/json
60
+ date:
61
+ - Fri, 28 Feb 2014 17:17:57 GMT
62
+ etag:
63
+ - "\"5dcd96cc7b45b270738601bce30d703f\""
64
+ server:
65
+ - WEBrick/1.3.1 (Ruby/2.1.0/2013-12-25)
66
+ x-request-id:
67
+ - 6c095f06-5c8c-4677-808a-378319b33c50
68
+ x-runtime:
69
+ - '0.017555'
70
+ content-length:
71
+ - '126'
72
+ connection:
73
+ - Close
74
+ body:
75
+ encoding: UTF-8
76
+ string: "{\"allowed_ip_addresses\":[\"9.109.14.25\",\"164.249.198.56\"],\"filter_traffic\":false,\"name\":\"mutable-test-app\",\"redirect_url\":null}"
77
+ http_version:
78
+ recorded_at: Fri, 28 Feb 2014 17:17:57 GMT
79
+ - request:
80
+ method: post
81
+ uri: https://floodgate-api-staging.herokuapp.com/api/v1/apps/9d2852cff163507330242460c0ca5eec/ip_addresses
82
+ body:
83
+ encoding: US-ASCII
84
+ string: ip_address%5Bip_address%5D=1.1.1.1&api_token=f28b5848e158f96e96168aa37f0002f2
85
+ headers:
86
+ User-Agent:
87
+ - FloodgateAgent
88
+ Content-Type:
89
+ - application/x-www-form-urlencoded
90
+ response:
91
+ status:
92
+ code: 201
93
+ message:
94
+ headers:
95
+ cache-control:
96
+ - max-age=0, private, must-revalidate
97
+ content-type:
98
+ - application/json
99
+ date:
100
+ - Fri, 28 Feb 2014 17:17:58 GMT
101
+ etag:
102
+ - "\"bbc66f5c6fff2775354263608d971d3a\""
103
+ server:
104
+ - WEBrick/1.3.1 (Ruby/2.1.0/2013-12-25)
105
+ x-request-id:
106
+ - 557239db-4638-4007-a4f7-ba334e05a10f
107
+ x-runtime:
108
+ - '0.048389'
109
+ content-length:
110
+ - '24'
111
+ connection:
112
+ - Close
113
+ body:
114
+ encoding: UTF-8
115
+ string: "{\"ip_address\":\"1.1.1.1\"}"
116
+ http_version:
117
+ recorded_at: Fri, 28 Feb 2014 17:17:58 GMT
118
+ - request:
119
+ method: get
120
+ uri: https://floodgate-api-staging.herokuapp.com/api/v1/apps/9d2852cff163507330242460c0ca5eec/status?api_token=f28b5848e158f96e96168aa37f0002f2
121
+ body:
122
+ encoding: US-ASCII
123
+ string: ''
124
+ headers:
125
+ User-Agent:
126
+ - FloodgateAgent
127
+ response:
128
+ status:
129
+ code: 200
130
+ message:
131
+ headers:
132
+ cache-control:
133
+ - max-age=0, private, must-revalidate
134
+ content-type:
135
+ - application/json
136
+ date:
137
+ - Fri, 28 Feb 2014 17:17:58 GMT
138
+ etag:
139
+ - "\"56afa4fe0c249466945b8b5763f2a93a\""
140
+ server:
141
+ - WEBrick/1.3.1 (Ruby/2.1.0/2013-12-25)
142
+ x-request-id:
143
+ - e968943f-a74d-435b-8a9e-9bfc549019dd
144
+ x-runtime:
145
+ - '0.019461'
146
+ content-length:
147
+ - '136'
148
+ connection:
149
+ - Close
150
+ body:
151
+ encoding: UTF-8
152
+ string: "{\"allowed_ip_addresses\":[\"9.109.14.25\",\"164.249.198.56\",\"1.1.1.1\"],\"filter_traffic\":false,\"name\":\"mutable-test-app\",\"redirect_url\":null}"
153
+ http_version:
154
+ recorded_at: Fri, 28 Feb 2014 17:17:58 GMT
155
+ - request:
156
+ method: delete
157
+ uri: https://floodgate-api-staging.herokuapp.com/api/v1/apps/9d2852cff163507330242460c0ca5eec/ip_addresses
158
+ body:
159
+ encoding: US-ASCII
160
+ string: ip_address%5Bip_address%5D=1.1.1.1&api_token=f28b5848e158f96e96168aa37f0002f2
161
+ headers:
162
+ User-Agent:
163
+ - FloodgateAgent
164
+ Content-Type:
165
+ - application/x-www-form-urlencoded
166
+ response:
167
+ status:
168
+ code: 200
169
+ message:
170
+ headers:
171
+ cache-control:
172
+ - max-age=0, private, must-revalidate
173
+ content-type:
174
+ - application/json
175
+ date:
176
+ - Fri, 28 Feb 2014 17:17:58 GMT
177
+ etag:
178
+ - "\"23e8cc0c8abfb81d69429dfc9203ea60\""
179
+ server:
180
+ - WEBrick/1.3.1 (Ruby/2.1.0/2013-12-25)
181
+ x-request-id:
182
+ - 0e96f804-e649-4ed0-8c2f-071d037ba489
183
+ x-runtime:
184
+ - '0.047728'
185
+ content-length:
186
+ - '43'
187
+ connection:
188
+ - Close
189
+ body:
190
+ encoding: UTF-8
191
+ string: "{\"ip_addresses\":[{\"ip_address\":\"1.1.1.1\"}]}"
192
+ http_version:
193
+ recorded_at: Fri, 28 Feb 2014 17:17:58 GMT
194
+ recorded_with: VCR 2.8.0
@@ -0,0 +1,118 @@
1
+ ---
2
+ http_interactions:
3
+ - request:
4
+ method: post
5
+ uri: https://floodgate-api-staging.herokuapp.com/api/v1/apps/9d2852cff163507330242460c0ca5eec/ip_addresses
6
+ body:
7
+ encoding: US-ASCII
8
+ string: ip_address%5Bip_address%5D=1.1.1.1&api_token=f28b5848e158f96e96168aa37f0002f2
9
+ headers:
10
+ User-Agent:
11
+ - FloodgateAgent
12
+ Content-Type:
13
+ - application/x-www-form-urlencoded
14
+ response:
15
+ status:
16
+ code: 201
17
+ message:
18
+ headers:
19
+ cache-control:
20
+ - max-age=0, private, must-revalidate
21
+ content-type:
22
+ - application/json
23
+ date:
24
+ - Fri, 28 Feb 2014 17:17:59 GMT
25
+ etag:
26
+ - "\"bbc66f5c6fff2775354263608d971d3a\""
27
+ server:
28
+ - WEBrick/1.3.1 (Ruby/2.1.0/2013-12-25)
29
+ x-request-id:
30
+ - 13093d13-9100-4ef4-a217-76ba4df90fa7
31
+ x-runtime:
32
+ - '0.027374'
33
+ content-length:
34
+ - '24'
35
+ connection:
36
+ - Close
37
+ body:
38
+ encoding: UTF-8
39
+ string: "{\"ip_address\":\"1.1.1.1\"}"
40
+ http_version:
41
+ recorded_at: Fri, 28 Feb 2014 17:17:59 GMT
42
+ - request:
43
+ method: get
44
+ uri: https://floodgate-api-staging.herokuapp.com/api/v1/apps/9d2852cff163507330242460c0ca5eec/status?api_token=f28b5848e158f96e96168aa37f0002f2
45
+ body:
46
+ encoding: US-ASCII
47
+ string: ''
48
+ headers:
49
+ User-Agent:
50
+ - FloodgateAgent
51
+ response:
52
+ status:
53
+ code: 200
54
+ message:
55
+ headers:
56
+ cache-control:
57
+ - max-age=0, private, must-revalidate
58
+ content-type:
59
+ - application/json
60
+ date:
61
+ - Fri, 28 Feb 2014 17:17:59 GMT
62
+ etag:
63
+ - "\"56afa4fe0c249466945b8b5763f2a93a\""
64
+ server:
65
+ - WEBrick/1.3.1 (Ruby/2.1.0/2013-12-25)
66
+ x-request-id:
67
+ - ad59bc45-9011-4a2c-8ce4-4e0e6960325c
68
+ x-runtime:
69
+ - '0.050096'
70
+ content-length:
71
+ - '136'
72
+ connection:
73
+ - Close
74
+ body:
75
+ encoding: UTF-8
76
+ string: "{\"allowed_ip_addresses\":[\"9.109.14.25\",\"164.249.198.56\",\"1.1.1.1\"],\"filter_traffic\":false,\"name\":\"mutable-test-app\",\"redirect_url\":null}"
77
+ http_version:
78
+ recorded_at: Fri, 28 Feb 2014 17:17:59 GMT
79
+ - request:
80
+ method: delete
81
+ uri: https://floodgate-api-staging.herokuapp.com/api/v1/apps/9d2852cff163507330242460c0ca5eec/ip_addresses
82
+ body:
83
+ encoding: US-ASCII
84
+ string: ip_address%5Bip_address%5D=1.1.1.1&api_token=f28b5848e158f96e96168aa37f0002f2
85
+ headers:
86
+ User-Agent:
87
+ - FloodgateAgent
88
+ Content-Type:
89
+ - application/x-www-form-urlencoded
90
+ response:
91
+ status:
92
+ code: 200
93
+ message:
94
+ headers:
95
+ cache-control:
96
+ - max-age=0, private, must-revalidate
97
+ content-type:
98
+ - application/json
99
+ date:
100
+ - Fri, 28 Feb 2014 17:17:59 GMT
101
+ etag:
102
+ - "\"23e8cc0c8abfb81d69429dfc9203ea60\""
103
+ server:
104
+ - WEBrick/1.3.1 (Ruby/2.1.0/2013-12-25)
105
+ x-request-id:
106
+ - ecd1c836-9334-4ece-8780-273ed97ae795
107
+ x-runtime:
108
+ - '0.073713'
109
+ content-length:
110
+ - '43'
111
+ connection:
112
+ - Close
113
+ body:
114
+ encoding: UTF-8
115
+ string: "{\"ip_addresses\":[{\"ip_address\":\"1.1.1.1\"}]}"
116
+ http_version:
117
+ recorded_at: Fri, 28 Feb 2014 17:17:59 GMT
118
+ recorded_with: VCR 2.8.0
@@ -0,0 +1,155 @@
1
+ ---
2
+ http_interactions:
3
+ - request:
4
+ method: put
5
+ uri: https://floodgate-api-staging.herokuapp.com/api/v1/apps/9d2852cff163507330242460c0ca5eec
6
+ body:
7
+ encoding: US-ASCII
8
+ string: app%5Bfilter_traffic%5D=false&api_token=f28b5848e158f96e96168aa37f0002f2
9
+ headers:
10
+ User-Agent:
11
+ - FloodgateAgent
12
+ Content-Type:
13
+ - application/x-www-form-urlencoded
14
+ response:
15
+ status:
16
+ code: 200
17
+ message:
18
+ headers:
19
+ cache-control:
20
+ - max-age=0, private, must-revalidate
21
+ content-type:
22
+ - application/json
23
+ date:
24
+ - Fri, 28 Feb 2014 17:18:00 GMT
25
+ etag:
26
+ - "\"5dcd96cc7b45b270738601bce30d703f\""
27
+ server:
28
+ - WEBrick/1.3.1 (Ruby/2.1.0/2013-12-25)
29
+ x-request-id:
30
+ - 1cb24af2-c391-4aa0-8cb1-58fe5d939816
31
+ x-runtime:
32
+ - '0.018282'
33
+ content-length:
34
+ - '126'
35
+ connection:
36
+ - Close
37
+ body:
38
+ encoding: UTF-8
39
+ string: "{\"allowed_ip_addresses\":[\"9.109.14.25\",\"164.249.198.56\"],\"filter_traffic\":false,\"name\":\"mutable-test-app\",\"redirect_url\":null}"
40
+ http_version:
41
+ recorded_at: Fri, 28 Feb 2014 17:18:00 GMT
42
+ - request:
43
+ method: get
44
+ uri: https://floodgate-api-staging.herokuapp.com/api/v1/apps/9d2852cff163507330242460c0ca5eec/status?api_token=f28b5848e158f96e96168aa37f0002f2
45
+ body:
46
+ encoding: US-ASCII
47
+ string: ''
48
+ headers:
49
+ User-Agent:
50
+ - FloodgateAgent
51
+ response:
52
+ status:
53
+ code: 200
54
+ message:
55
+ headers:
56
+ cache-control:
57
+ - max-age=0, private, must-revalidate
58
+ content-type:
59
+ - application/json
60
+ date:
61
+ - Fri, 28 Feb 2014 17:18:00 GMT
62
+ etag:
63
+ - "\"5dcd96cc7b45b270738601bce30d703f\""
64
+ server:
65
+ - WEBrick/1.3.1 (Ruby/2.1.0/2013-12-25)
66
+ x-request-id:
67
+ - 4c9287f0-97bc-4923-8769-86e52dcc2a18
68
+ x-runtime:
69
+ - '0.015105'
70
+ content-length:
71
+ - '126'
72
+ connection:
73
+ - Close
74
+ body:
75
+ encoding: UTF-8
76
+ string: "{\"allowed_ip_addresses\":[\"9.109.14.25\",\"164.249.198.56\"],\"filter_traffic\":false,\"name\":\"mutable-test-app\",\"redirect_url\":null}"
77
+ http_version:
78
+ recorded_at: Fri, 28 Feb 2014 17:18:00 GMT
79
+ - request:
80
+ method: put
81
+ uri: https://floodgate-api-staging.herokuapp.com/api/v1/apps/9d2852cff163507330242460c0ca5eec
82
+ body:
83
+ encoding: US-ASCII
84
+ string: app%5Bfilter_traffic%5D=true&api_token=f28b5848e158f96e96168aa37f0002f2
85
+ headers:
86
+ User-Agent:
87
+ - FloodgateAgent
88
+ Content-Type:
89
+ - application/x-www-form-urlencoded
90
+ response:
91
+ status:
92
+ code: 200
93
+ message:
94
+ headers:
95
+ cache-control:
96
+ - max-age=0, private, must-revalidate
97
+ content-type:
98
+ - application/json
99
+ date:
100
+ - Fri, 28 Feb 2014 17:18:00 GMT
101
+ etag:
102
+ - "\"7771a307c8a2bc95dff054cd3bfcbf9c\""
103
+ server:
104
+ - WEBrick/1.3.1 (Ruby/2.1.0/2013-12-25)
105
+ x-request-id:
106
+ - 1ad9e603-5f0e-4abe-8e1d-35488ad4d91b
107
+ x-runtime:
108
+ - '0.045982'
109
+ content-length:
110
+ - '125'
111
+ connection:
112
+ - Close
113
+ body:
114
+ encoding: UTF-8
115
+ string: "{\"allowed_ip_addresses\":[\"9.109.14.25\",\"164.249.198.56\"],\"filter_traffic\":true,\"name\":\"mutable-test-app\",\"redirect_url\":null}"
116
+ http_version:
117
+ recorded_at: Fri, 28 Feb 2014 17:18:00 GMT
118
+ - request:
119
+ method: get
120
+ uri: https://floodgate-api-staging.herokuapp.com/api/v1/apps/9d2852cff163507330242460c0ca5eec/status?api_token=f28b5848e158f96e96168aa37f0002f2
121
+ body:
122
+ encoding: US-ASCII
123
+ string: ''
124
+ headers:
125
+ User-Agent:
126
+ - FloodgateAgent
127
+ response:
128
+ status:
129
+ code: 200
130
+ message:
131
+ headers:
132
+ cache-control:
133
+ - max-age=0, private, must-revalidate
134
+ content-type:
135
+ - application/json
136
+ date:
137
+ - Fri, 28 Feb 2014 17:18:01 GMT
138
+ etag:
139
+ - "\"7771a307c8a2bc95dff054cd3bfcbf9c\""
140
+ server:
141
+ - WEBrick/1.3.1 (Ruby/2.1.0/2013-12-25)
142
+ x-request-id:
143
+ - a6b786d9-a572-46d7-956a-9d0b2d62c038
144
+ x-runtime:
145
+ - '0.016004'
146
+ content-length:
147
+ - '125'
148
+ connection:
149
+ - Close
150
+ body:
151
+ encoding: UTF-8
152
+ string: "{\"allowed_ip_addresses\":[\"9.109.14.25\",\"164.249.198.56\"],\"filter_traffic\":true,\"name\":\"mutable-test-app\",\"redirect_url\":null}"
153
+ http_version:
154
+ recorded_at: Fri, 28 Feb 2014 17:18:01 GMT
155
+ recorded_with: VCR 2.8.0