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
@@ -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=true&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:01 GMT
25
+ etag:
26
+ - "\"7771a307c8a2bc95dff054cd3bfcbf9c\""
27
+ server:
28
+ - WEBrick/1.3.1 (Ruby/2.1.0/2013-12-25)
29
+ x-request-id:
30
+ - 71c04dae-f0c0-419d-9fb3-6e96cb4507ae
31
+ x-runtime:
32
+ - '0.055344'
33
+ content-length:
34
+ - '125'
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\":true,\"name\":\"mutable-test-app\",\"redirect_url\":null}"
40
+ http_version:
41
+ recorded_at: Fri, 28 Feb 2014 17:18:01 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:01 GMT
62
+ etag:
63
+ - "\"7771a307c8a2bc95dff054cd3bfcbf9c\""
64
+ server:
65
+ - WEBrick/1.3.1 (Ruby/2.1.0/2013-12-25)
66
+ x-request-id:
67
+ - 72a5d8bd-0787-4f88-a111-bd549ed35ee5
68
+ x-runtime:
69
+ - '0.014298'
70
+ content-length:
71
+ - '125'
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\":true,\"name\":\"mutable-test-app\",\"redirect_url\":null}"
77
+ http_version:
78
+ recorded_at: Fri, 28 Feb 2014 17:18:01 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=false&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:02 GMT
101
+ etag:
102
+ - "\"5dcd96cc7b45b270738601bce30d703f\""
103
+ server:
104
+ - WEBrick/1.3.1 (Ruby/2.1.0/2013-12-25)
105
+ x-request-id:
106
+ - 31eaf3e7-0c3d-4c6f-a688-28bc15155d85
107
+ x-runtime:
108
+ - '0.024638'
109
+ content-length:
110
+ - '126'
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\":false,\"name\":\"mutable-test-app\",\"redirect_url\":null}"
116
+ http_version:
117
+ recorded_at: Fri, 28 Feb 2014 17:18:02 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:02 GMT
138
+ etag:
139
+ - "\"5dcd96cc7b45b270738601bce30d703f\""
140
+ server:
141
+ - WEBrick/1.3.1 (Ruby/2.1.0/2013-12-25)
142
+ x-request-id:
143
+ - e703acfa-2011-4d52-8657-201c8ad14cca
144
+ x-runtime:
145
+ - '0.007352'
146
+ content-length:
147
+ - '126'
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\":false,\"name\":\"mutable-test-app\",\"redirect_url\":null}"
153
+ http_version:
154
+ recorded_at: Fri, 28 Feb 2014 17:18:02 GMT
155
+ recorded_with: VCR 2.8.0
@@ -0,0 +1,155 @@
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:18:02 GMT
25
+ etag:
26
+ - "\"bbc66f5c6fff2775354263608d971d3a\""
27
+ server:
28
+ - WEBrick/1.3.1 (Ruby/2.1.0/2013-12-25)
29
+ x-request-id:
30
+ - b3101e6d-9ea3-47f4-b8c2-c20a4a4f735a
31
+ x-runtime:
32
+ - '0.035975'
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:18:02 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:03 GMT
62
+ etag:
63
+ - "\"56afa4fe0c249466945b8b5763f2a93a\""
64
+ server:
65
+ - WEBrick/1.3.1 (Ruby/2.1.0/2013-12-25)
66
+ x-request-id:
67
+ - 7b7aa478-6291-4dfa-8a80-e6d086c7645a
68
+ x-runtime:
69
+ - '0.012695'
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:18:03 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:18:03 GMT
101
+ etag:
102
+ - "\"23e8cc0c8abfb81d69429dfc9203ea60\""
103
+ server:
104
+ - WEBrick/1.3.1 (Ruby/2.1.0/2013-12-25)
105
+ x-request-id:
106
+ - 6f3c6d86-e70c-480c-aec9-33ba6e13a0eb
107
+ x-runtime:
108
+ - '0.061535'
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:18:03 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:03 GMT
138
+ etag:
139
+ - "\"5dcd96cc7b45b270738601bce30d703f\""
140
+ server:
141
+ - WEBrick/1.3.1 (Ruby/2.1.0/2013-12-25)
142
+ x-request-id:
143
+ - 2519a960-3a64-44df-b851-2bc855f6b166
144
+ x-runtime:
145
+ - '0.056913'
146
+ content-length:
147
+ - '126'
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\":false,\"name\":\"mutable-test-app\",\"redirect_url\":null}"
153
+ http_version:
154
+ recorded_at: Fri, 28 Feb 2014 17:18:03 GMT
155
+ 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%5Bredirect_url%5D&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:04 GMT
25
+ etag:
26
+ - "\"5dcd96cc7b45b270738601bce30d703f\""
27
+ server:
28
+ - WEBrick/1.3.1 (Ruby/2.1.0/2013-12-25)
29
+ x-request-id:
30
+ - 1da5d81d-a01b-4b70-96c2-c7d6ed375382
31
+ x-runtime:
32
+ - '0.017138'
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:04 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:04 GMT
62
+ etag:
63
+ - "\"5dcd96cc7b45b270738601bce30d703f\""
64
+ server:
65
+ - WEBrick/1.3.1 (Ruby/2.1.0/2013-12-25)
66
+ x-request-id:
67
+ - f01f5c5a-5c83-4d7a-a2ee-a6cc43c64b48
68
+ x-runtime:
69
+ - '0.069831'
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:04 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%5Bredirect_url%5D=http%3A%2F%2Fexample.com&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:04 GMT
101
+ etag:
102
+ - "\"e095bacd98a20e55860f5d335f67baee\""
103
+ server:
104
+ - WEBrick/1.3.1 (Ruby/2.1.0/2013-12-25)
105
+ x-request-id:
106
+ - 25693407-f3b6-4f59-8baa-a2debffc2e9b
107
+ x-runtime:
108
+ - '0.068925'
109
+ content-length:
110
+ - '142'
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\":false,\"name\":\"mutable-test-app\",\"redirect_url\":\"http://example.com\"}"
116
+ http_version:
117
+ recorded_at: Fri, 28 Feb 2014 17:18:04 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:05 GMT
138
+ etag:
139
+ - "\"e095bacd98a20e55860f5d335f67baee\""
140
+ server:
141
+ - WEBrick/1.3.1 (Ruby/2.1.0/2013-12-25)
142
+ x-request-id:
143
+ - 75114466-f0e3-4231-8334-e060c37bca95
144
+ x-runtime:
145
+ - '0.032777'
146
+ content-length:
147
+ - '142'
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\":false,\"name\":\"mutable-test-app\",\"redirect_url\":\"http://example.com\"}"
153
+ http_version:
154
+ recorded_at: Fri, 28 Feb 2014 17:18:05 GMT
155
+ 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%5Bredirect_url%5D=http%3A%2F%2Fexample.com&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:05 GMT
25
+ etag:
26
+ - "\"e095bacd98a20e55860f5d335f67baee\""
27
+ server:
28
+ - WEBrick/1.3.1 (Ruby/2.1.0/2013-12-25)
29
+ x-request-id:
30
+ - 387804d2-6ec8-4e7a-a240-e95accdeead3
31
+ x-runtime:
32
+ - '0.157111'
33
+ content-length:
34
+ - '142'
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\":\"http://example.com\"}"
40
+ http_version:
41
+ recorded_at: Fri, 28 Feb 2014 17:18:05 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:05 GMT
62
+ etag:
63
+ - "\"e095bacd98a20e55860f5d335f67baee\""
64
+ server:
65
+ - WEBrick/1.3.1 (Ruby/2.1.0/2013-12-25)
66
+ x-request-id:
67
+ - c2043d3c-8cea-414e-9ea2-389fc30e68df
68
+ x-runtime:
69
+ - '0.051087'
70
+ content-length:
71
+ - '142'
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\":\"http://example.com\"}"
77
+ http_version:
78
+ recorded_at: Fri, 28 Feb 2014 17:18:06 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%5Bredirect_url%5D&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:06 GMT
101
+ etag:
102
+ - "\"5dcd96cc7b45b270738601bce30d703f\""
103
+ server:
104
+ - WEBrick/1.3.1 (Ruby/2.1.0/2013-12-25)
105
+ x-request-id:
106
+ - 13e13b1f-c11c-4c7c-b00d-03d99522aa5e
107
+ x-runtime:
108
+ - '0.078110'
109
+ content-length:
110
+ - '126'
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\":false,\"name\":\"mutable-test-app\",\"redirect_url\":null}"
116
+ http_version:
117
+ recorded_at: Fri, 28 Feb 2014 17:18:06 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:06 GMT
138
+ etag:
139
+ - "\"5dcd96cc7b45b270738601bce30d703f\""
140
+ server:
141
+ - WEBrick/1.3.1 (Ruby/2.1.0/2013-12-25)
142
+ x-request-id:
143
+ - 67d6a331-585f-4fea-a576-5ccd986d2e18
144
+ x-runtime:
145
+ - '0.040286'
146
+ content-length:
147
+ - '126'
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\":false,\"name\":\"mutable-test-app\",\"redirect_url\":null}"
153
+ http_version:
154
+ recorded_at: Fri, 28 Feb 2014 17:18:06 GMT
155
+ recorded_with: VCR 2.8.0
@@ -0,0 +1,38 @@
1
+ ---
2
+ http_interactions:
3
+ - request:
4
+ method: get
5
+ uri: https://floodgate-api-staging.herokuapp.com/api/v1/apps/foo/status?api_token=bar
6
+ body:
7
+ encoding: US-ASCII
8
+ string: ''
9
+ headers:
10
+ User-Agent:
11
+ - FloodgateAgent
12
+ response:
13
+ status:
14
+ code: 401
15
+ message:
16
+ headers:
17
+ cache-control:
18
+ - no-cache
19
+ content-type:
20
+ - application/json
21
+ date:
22
+ - Fri, 28 Feb 2014 17:18:06 GMT
23
+ server:
24
+ - WEBrick/1.3.1 (Ruby/2.1.0/2013-12-25)
25
+ x-request-id:
26
+ - 621cd65a-a973-4301-9879-8ab579cce5a8
27
+ x-runtime:
28
+ - '0.010765'
29
+ content-length:
30
+ - '28'
31
+ connection:
32
+ - Close
33
+ body:
34
+ encoding: UTF-8
35
+ string: "{\"error\":\"401 Unauthorized\"}"
36
+ http_version:
37
+ recorded_at: Fri, 28 Feb 2014 17:18:06 GMT
38
+ recorded_with: VCR 2.8.0
@@ -0,0 +1,40 @@
1
+ ---
2
+ http_interactions:
3
+ - request:
4
+ method: get
5
+ uri: https://floodgate-api-staging.herokuapp.com/api/v1/apps/fa5d63bcf3d6b557eee782c9e61e4002/status?api_token=da2f2d06c102eea0f1971c2c90936ee3
6
+ body:
7
+ encoding: US-ASCII
8
+ string: ''
9
+ headers:
10
+ User-Agent:
11
+ - FloodgateAgent
12
+ response:
13
+ status:
14
+ code: 200
15
+ message:
16
+ headers:
17
+ cache-control:
18
+ - max-age=0, private, must-revalidate
19
+ content-type:
20
+ - application/json
21
+ date:
22
+ - Fri, 28 Feb 2014 17:18:07 GMT
23
+ etag:
24
+ - "\"dee747427e4c4ad6746155406732f396\""
25
+ server:
26
+ - WEBrick/1.3.1 (Ruby/2.1.0/2013-12-25)
27
+ x-request-id:
28
+ - 555eecac-3da8-4fb0-ac94-c9d0ad6f4e56
29
+ x-runtime:
30
+ - '0.016831'
31
+ content-length:
32
+ - '112'
33
+ connection:
34
+ - Close
35
+ body:
36
+ encoding: UTF-8
37
+ string: "{\"allowed_ip_addresses\":[],\"filter_traffic\":true,\"name\":\"floodgate-gem-filter-traffic-true\",\"redirect_url\":null}"
38
+ http_version:
39
+ recorded_at: Fri, 28 Feb 2014 17:18:07 GMT
40
+ recorded_with: VCR 2.8.0