brightbox-cli 1.0.0.rc1 → 1.0.0.rc2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (36) hide show
  1. data/Gemfile.lock +1 -1
  2. data/Rakefile +0 -6
  3. data/lib/brightbox-cli/commands/accounts-accept-invite.rb +1 -0
  4. data/lib/brightbox-cli/commands/accounts-default.rb +1 -1
  5. data/lib/brightbox-cli/gli_global_hooks.rb +2 -1
  6. data/lib/brightbox-cli/version.rb +1 -1
  7. data/spec/cassettes/Brightbox_BBConfig/_find_or_set_default_account/when_client_is_not_authenticated/does_not_raise_an_error.yml +258 -193
  8. data/spec/cassettes/Brightbox_BBConfig/_find_or_set_default_account/when_client_may_access_one_account/updates_the_setting.yml +258 -195
  9. data/spec/cassettes/Firewall_policies/update/when_the_policy_does_not_exist/prints_error_to_STDERR.yml +153 -0
  10. data/spec/cassettes/brightbox_config/client_add/when_adding_a_new_client/does_not_error.yml +229 -160
  11. data/spec/cassettes/brightbox_config/client_add/when_adding_a_new_client/sets_up_the_config.yml +229 -162
  12. data/spec/cassettes/brightbox_config/client_add/when_new_client_is_first_and_only_client/does_not_change_the_default_client.yml +229 -162
  13. data/spec/cassettes/brightbox_config/client_add/when_new_client_is_first_and_only_client/does_not_error.yml +229 -162
  14. data/spec/cassettes/brightbox_config/client_add/when_new_client_is_first_and_only_client/sets_this_as_the_default_client.yml +229 -162
  15. data/spec/cassettes/brightbox_config/client_add/when_new_client_is_first_and_only_client/sets_up_the_config.yml +229 -162
  16. data/spec/commands/accounts/list_spec.rb +1 -1
  17. data/spec/commands/config/user_add_spec.rb +1 -1
  18. data/spec/spec_helper.rb +4 -0
  19. data/spec/support/vcr.rb +2 -2
  20. data/spec/unit/brightbox/bb_config/add_section_spec.rb +1 -1
  21. data/spec/unit/brightbox/bb_config/renew_tokens_spec.rb +1 -1
  22. data/spec/unit/brightbox/firewall_policy/create_spec.rb +1 -1
  23. data/spec/unit/brightbox/firewall_policy/destroy_spec.rb +1 -1
  24. data/spec/unit/brightbox/firewall_rule/create_spec.rb +1 -1
  25. data/spec/unit/brightbox/firewall_rule/destroy_spec.rb +1 -1
  26. data/spec/unit/brightbox/firewall_rule/find_spec.rb +1 -1
  27. data/spec/unit/brightbox/firewall_rule/from_policy_spec.rb +1 -1
  28. data/spec/unit/brightbox/server/destroy_spec.rb +1 -1
  29. data/spec/unit/brightbox/server/find_or_call_spec.rb +1 -1
  30. data/spec/unit/brightbox/server/shutdown_spec.rb +1 -1
  31. data/spec/unit/brightbox/server/start_spec.rb +1 -1
  32. data/spec/unit/brightbox/server/stop_spec.rb +1 -1
  33. data/spec/unit/brightbox/server/update_spec.rb +1 -1
  34. data/spec/unit/brightbox/server_group/find_spec.rb +1 -1
  35. metadata +5 -4
  36. data/lib/brightbox-cli/command_generator.rb +0 -53
@@ -0,0 +1,153 @@
1
+ ---
2
+ http_interactions:
3
+ - request:
4
+ method: put
5
+ uri: http://api.brightbox.dev/1.0/firewall_policies/fwp-12345
6
+ body:
7
+ encoding: UTF-8
8
+ string: ! '{"name":"missing"}'
9
+ headers:
10
+ User-Agent:
11
+ - fog/1.15.0
12
+ Authorization:
13
+ - OAuth a25417dd9a167843ed50b7fbd3338feccbdd10c3
14
+ Content-Type:
15
+ - application/json
16
+ response:
17
+ status:
18
+ code: 401
19
+ message:
20
+ headers:
21
+ !binary "V1dXLUF1dGhlbnRpY2F0ZQ==":
22
+ - !binary |-
23
+ T0F1dGggZXJyb3I9ImludmFsaWRfdG9rZW4i
24
+ !binary "Q29udGVudC1UeXBl":
25
+ - !binary |-
26
+ YXBwbGljYXRpb24vanNvbjsgY2hhcnNldD11dGYtOA==
27
+ !binary "WC1VQS1Db21wYXRpYmxl":
28
+ - !binary |-
29
+ SUU9RWRnZQ==
30
+ !binary "Q2FjaGUtQ29udHJvbA==":
31
+ - !binary |-
32
+ bm8tY2FjaGU=
33
+ !binary "WC1SZXF1ZXN0LUlk":
34
+ - !binary |-
35
+ NTE5NzQxMmE3MGFlNTM1YjRmMDczNzFjMmM3N2ViZjA=
36
+ !binary "WC1SdW50aW1l":
37
+ - !binary |-
38
+ MC40ODcyMDM=
39
+ !binary "RGF0ZQ==":
40
+ - !binary |-
41
+ RnJpLCAyNyBTZXAgMjAxMyAxNToxODoxOCBHTVQ=
42
+ !binary "Q29ubmVjdGlvbg==":
43
+ - !binary |-
44
+ Y2xvc2U=
45
+ body:
46
+ encoding: US-ASCII
47
+ string: ! '{"error":"invalid_token","error_description":"The OAuth token can
48
+ not be found"}'
49
+ http_version:
50
+ recorded_at: Fri, 27 Sep 2013 15:18:18 GMT
51
+ - request:
52
+ method: post
53
+ uri: http://api.brightbox.dev/token
54
+ body:
55
+ encoding: UTF-8
56
+ string: ! '{"grant_type":"none","client_id":"cli-12345"}'
57
+ headers:
58
+ User-Agent:
59
+ - fog/1.15.0
60
+ Authorization:
61
+ - Basic Y2xpLTEyMzQ1OnF5Nnh4bnZ5NG8wdGd2NQ==
62
+ Content-Type:
63
+ - application/json
64
+ response:
65
+ status:
66
+ code: 200
67
+ message:
68
+ headers:
69
+ !binary "WC1GcmFtZS1PcHRpb25z":
70
+ - !binary |-
71
+ c2FtZW9yaWdpbg==
72
+ !binary "WC1YU1MtUHJvdGVjdGlvbg==":
73
+ - !binary |-
74
+ MTsgbW9kZT1ibG9jaw==
75
+ !binary "Q29udGVudC1UeXBl":
76
+ - !binary |-
77
+ YXBwbGljYXRpb24vanNvbjtjaGFyc2V0PXV0Zi04
78
+ !binary "Q2FjaGUtQ29udHJvbA==":
79
+ - !binary |-
80
+ bm8tc3RvcmU=
81
+ !binary "Q29udGVudC1MZW5ndGg=":
82
+ - !binary |-
83
+ Nzc=
84
+ !binary "WC1VQS1Db21wYXRpYmxl":
85
+ - !binary |-
86
+ SUU9RWRnZQ==
87
+ !binary "RVRhZw==":
88
+ - !binary |-
89
+ ImExMGE1Y2YxODJlZjM2YzFiNGJjMmI0N2ZkNjMxNGI4Ig==
90
+ !binary "WC1SZXF1ZXN0LUlk":
91
+ - !binary |-
92
+ NDQwOGUzMjhlOTI3ZTFiOGJmODdiMDVhNjMxZTYyZmI=
93
+ !binary "WC1SdW50aW1l":
94
+ - !binary |-
95
+ MC4xMzE2MzY=
96
+ !binary "RGF0ZQ==":
97
+ - !binary |-
98
+ RnJpLCAyNyBTZXAgMjAxMyAxNToxODoxOCBHTVQ=
99
+ !binary "Q29ubmVjdGlvbg==":
100
+ - !binary |-
101
+ a2VlcC1hbGl2ZQ==
102
+ body:
103
+ encoding: US-ASCII
104
+ string: ! '{"access_token":"f46816c4911694d051ec6a779103e42ab72d3fc7","expires_in":7200}'
105
+ http_version:
106
+ recorded_at: Fri, 27 Sep 2013 15:18:18 GMT
107
+ - request:
108
+ method: put
109
+ uri: http://api.brightbox.dev/1.0/firewall_policies/fwp-12345
110
+ body:
111
+ encoding: ASCII-8BIT
112
+ string: !binary |-
113
+ eyJuYW1lIjoibWlzc2luZyJ9
114
+ headers:
115
+ User-Agent:
116
+ - fog/1.15.0
117
+ Authorization:
118
+ - OAuth f46816c4911694d051ec6a779103e42ab72d3fc7
119
+ Content-Type:
120
+ - application/json
121
+ response:
122
+ status:
123
+ code: 422
124
+ message:
125
+ headers:
126
+ !binary "Q29udGVudC1UeXBl":
127
+ - !binary |-
128
+ YXBwbGljYXRpb24vanNvbjsgY2hhcnNldD11dGYtOA==
129
+ !binary "WC1VQS1Db21wYXRpYmxl":
130
+ - !binary |-
131
+ SUU9RWRnZQ==
132
+ !binary "Q2FjaGUtQ29udHJvbA==":
133
+ - !binary |-
134
+ bm8tY2FjaGU=
135
+ !binary "WC1SZXF1ZXN0LUlk":
136
+ - !binary |-
137
+ NTg0MGYxYTE2ODJhYmUxNjIwMTc4Y2IxYTYzNmI5YzM=
138
+ !binary "WC1SdW50aW1l":
139
+ - !binary |-
140
+ MS43NjcxODY=
141
+ !binary "RGF0ZQ==":
142
+ - !binary |-
143
+ RnJpLCAyNyBTZXAgMjAxMyAxNToxODoxOSBHTVQ=
144
+ !binary "Q29ubmVjdGlvbg==":
145
+ - !binary |-
146
+ Y2xvc2U=
147
+ body:
148
+ encoding: US-ASCII
149
+ string: ! '{"error_name":"unprocessable_entity","errors":["default firewall
150
+ policy can not be renamed"]}'
151
+ http_version:
152
+ recorded_at: Fri, 27 Sep 2013 15:18:19 GMT
153
+ recorded_with: VCR 2.5.0
@@ -1,217 +1,286 @@
1
- ---
2
- http_interactions:
3
- - request:
1
+ ---
2
+ recorded_with: VCR 2.5.0
3
+ http_interactions:
4
+ - request:
4
5
  method: post
5
6
  uri: http://api.brightbox.dev/token
6
- body:
7
- encoding: UTF-8
8
- string: '{"grant_type":"none","client_id":"cli-12345"}'
9
- headers:
10
- User-Agent:
7
+ body:
8
+ string: "{\"grant_type\":\"none\",\"client_id\":\"cli-12345\"}"
9
+ headers:
10
+ User-Agent:
11
11
  - fog/1.15.0
12
- Authorization:
13
- - Basic Y2xpLTEyMzQ1OnF5Nnh4bnZ5NG8wdGd2NQ==
14
- Content-Type:
12
+ Content-Type:
15
13
  - application/json
16
- response:
17
- status:
14
+ Authorization:
15
+ - Basic Y2xpLTEyMzQ1OnF5Nnh4bnZ5NG8wdGd2NQ==
16
+ response:
17
+ status:
18
18
  code: 200
19
19
  message:
20
- headers:
21
- X-Frame-Options:
20
+ headers:
21
+ X-Frame-Options:
22
22
  - sameorigin
23
- X-XSS-Protection:
24
- - 1; mode=block
25
- Content-Type:
26
- - application/json;charset=utf-8
27
- Cache-Control:
28
- - no-store
29
- Content-Length:
30
- - '77'
31
- X-UA-Compatible:
23
+ Date:
24
+ - Fri, 06 Sep 2013 15:58:56 GMT
25
+ X-UA-Compatible:
32
26
  - IE=Edge
33
- ETag:
34
- - '"ea1fa016942cf0f01a331ab9d8a56423"'
35
- X-Request-Id:
27
+ X-Request-Id:
36
28
  - 957ed6ed3b92609b2d50aa892f032215
37
- X-Runtime:
38
- - '0.118069'
39
- Date:
40
- - Fri, 06 Sep 2013 15:58:56 GMT
41
- Connection:
29
+ Content-Type:
30
+ - application/json;charset=utf-8
31
+ X-Runtime:
32
+ - "0.118069"
33
+ Content-Length:
34
+ - "77"
35
+ ETag:
36
+ - "\"ea1fa016942cf0f01a331ab9d8a56423\""
37
+ X-XSS-Protection:
38
+ - 1; mode=block
39
+ Connection:
42
40
  - keep-alive
43
- body:
44
- encoding: UTF-8
45
- string: '{"access_token":"a25417dd9a167843ed50b7fbd3338feccbdd10c3","expires_in":7200}'
41
+ Cache-Control:
42
+ - no-store
43
+ body:
44
+ string: "{\"access_token\":\"a25417dd9a167843ed50b7fbd3338feccbdd10c3\",\"expires_in\":7200}"
46
45
  http_version:
47
46
  recorded_at: Fri, 06 Sep 2013 15:58:56 GMT
48
- - request:
47
+ - request:
49
48
  method: post
50
49
  uri: http://api.brightbox.dev/token
51
- body:
52
- encoding: UTF-8
53
- string: '{"grant_type":"none","client_id":"cli-12345"}'
54
- headers:
55
- User-Agent:
50
+ body:
51
+ string: "{\"grant_type\":\"none\",\"client_id\":\"cli-12345\"}"
52
+ headers:
53
+ User-Agent:
56
54
  - fog/1.15.0
57
- Authorization:
58
- - Basic Y2xpLTEyMzQ1OnF5Nnh4bnZ5NG8wdGd2NQ==
59
- Content-Type:
55
+ Content-Type:
60
56
  - application/json
61
- response:
62
- status:
57
+ Authorization:
58
+ - Basic Y2xpLTEyMzQ1OnF5Nnh4bnZ5NG8wdGd2NQ==
59
+ response:
60
+ status:
63
61
  code: 200
64
62
  message:
65
- headers:
66
- X-Frame-Options:
63
+ headers:
64
+ X-Frame-Options:
67
65
  - sameorigin
68
- X-XSS-Protection:
69
- - 1; mode=block
70
- Content-Type:
71
- - application/json;charset=utf-8
72
- Cache-Control:
73
- - no-store
74
- Content-Length:
75
- - '77'
76
- X-UA-Compatible:
66
+ Date:
67
+ - Fri, 06 Sep 2013 15:58:56 GMT
68
+ X-UA-Compatible:
77
69
  - IE=Edge
78
- ETag:
79
- - '"c70fc5795566d2cf3e4760ac04d7376b"'
80
- X-Request-Id:
70
+ X-Request-Id:
81
71
  - ddf4135199e7c0fea3eb951389226536
82
- X-Runtime:
83
- - '0.110470'
84
- Date:
85
- - Fri, 06 Sep 2013 15:58:56 GMT
86
- Connection:
72
+ Content-Type:
73
+ - application/json;charset=utf-8
74
+ X-Runtime:
75
+ - "0.110470"
76
+ Content-Length:
77
+ - "77"
78
+ ETag:
79
+ - "\"c70fc5795566d2cf3e4760ac04d7376b\""
80
+ X-XSS-Protection:
81
+ - 1; mode=block
82
+ Connection:
87
83
  - keep-alive
88
- body:
89
- encoding: UTF-8
90
- string: '{"access_token":"0ab4badeb10018d07c1f6c33690ee011f36b4183","expires_in":7200}'
84
+ Cache-Control:
85
+ - no-store
86
+ body:
87
+ string: "{\"access_token\":\"0ab4badeb10018d07c1f6c33690ee011f36b4183\",\"expires_in\":7200}"
91
88
  http_version:
92
89
  recorded_at: Fri, 06 Sep 2013 15:58:56 GMT
93
- - request:
90
+ - request:
94
91
  method: get
95
92
  uri: http://api.brightbox.dev/1.0/account
96
- body:
97
- encoding: US-ASCII
98
- string: ''
99
- headers:
100
- User-Agent:
93
+ body:
94
+ string: ""
95
+ headers:
96
+ User-Agent:
101
97
  - fog/1.15.0
102
- Authorization:
103
- - OAuth 0ab4badeb10018d07c1f6c33690ee011f36b4183
104
- Content-Type:
98
+ Content-Type:
105
99
  - application/json
106
- response:
107
- status:
100
+ Authorization:
101
+ - OAuth 0ab4badeb10018d07c1f6c33690ee011f36b4183
102
+ response:
103
+ status:
108
104
  code: 200
109
105
  message:
110
- headers:
111
- Content-Type:
112
- - application/json; charset=utf-8
113
- X-UA-Compatible:
106
+ headers:
107
+ Date:
108
+ - Fri, 06 Sep 2013 15:58:57 GMT
109
+ X-UA-Compatible:
114
110
  - IE=Edge
115
- ETag:
116
- - '"a9e93d5f3268805675b0c5c935311a85"'
117
- Cache-Control:
118
- - max-age=0, private, must-revalidate
119
- X-Request-Id:
111
+ X-Request-Id:
120
112
  - fdd87c5e95c32b98cd0d0852658529e8
121
- X-Runtime:
122
- - '0.197430'
123
- Date:
124
- - Fri, 06 Sep 2013 15:58:57 GMT
125
- Connection:
113
+ Content-Type:
114
+ - application/json; charset=utf-8
115
+ X-Runtime:
116
+ - "0.197430"
117
+ ETag:
118
+ - "\"a9e93d5f3268805675b0c5c935311a85\""
119
+ Connection:
126
120
  - close
127
- body:
128
- encoding: UTF-8
129
- string: '{"id":"acc-12345","resource_type":"account","url":"https://api.gb1.brightbox.com/1.0/accounts/acc-12345","name":"Aurnqfvgsbeyiprni","status":"active","address_1":"Kaycee
130
- Throughway","address_2":"","city":"South Hellenport","county":"","postcode":"60364-9886","country_code":"GB","country_name":"United
131
- Kingdom","vat_registration_number":"","telephone_number":"+444238318140","telephone_verified":false,"verified_telephone":null,"verified_at":null,"verified_ip":null,"created_at":"2013-09-04T07:53:13Z","ram_limit":32768,"ram_used":0,"cloud_ips_limit":20,"cloud_ips_used":1,"load_balancers_limit":5,"load_balancers_used":0,"valid_credit_card":false,"library_ftp_host":"ftp.library.gb1.brightbox.com","library_ftp_user":"acc-12345","library_ftp_password":null,"clients":[{"id":"cli-12345","resource_type":"api_client","url":"https://api.gb1.brightbox.com/1.0/api_clients/cli-12345","name":null,"description":null,"revoked_at":null}],"images":[],"servers":[],"load_balancers":[],"cloud_ips":[{"id":"cip-12345","resource_type":"cloud_ip","url":"https://api.gb1.brightbox.com/1.0/cloud_ips/cip-12345","status":"unmapped","public_ip":"56.67.59.219","reverse_dns":"cip-12345-67-59-219.gb1.brightbox.com","name":null}],"server_groups":[{"id":"grp-12345","resource_type":"server_group","url":"https://api.gb1.brightbox.com/1.0/server_groups/grp-12345","name":"default","description":"All
132
- new servers are added to this group unless specified otherwise.","created_at":"2013-09-04T07:53:13Z","default":true}],"firewall_policies":[{"id":"fwp-12345","resource_type":"firewall_policy","url":"https://api.gb1.brightbox.com/1.0/firewall_policies/fwp-12345","default":true,"name":"default","created_at":"2013-09-04T07:53:14Z","description":"Applied
133
- to the default server group."}],"owner":{"id":"usr-12345","resource_type":"user","url":"https://api.gb1.brightbox.com/1.0/users/usr-12345","name":"Dylan
134
- Fay DDS","email_address":"jason.null@brightbox.com"},"users":[],"zones":[{"id":"zon-12345","resource_type":"zone","url":"https://api.gb1.brightbox.com/1.0/zones/zon-12345","handle":"gb1-a"},{"id":"zon-12345","resource_type":"zone","url":"https://api.gb1.brightbox.com/1.0/zones/zon-12345","handle":"gb1-b"}]}'
121
+ Cache-Control:
122
+ - max-age=0, private, must-revalidate
123
+ body:
124
+ string: "{\"id\":\"acc-12345\",\"resource_type\":\"account\",\"url\":\"https://api.gb1.brightbox.com/1.0/accounts/acc-12345\",\"name\":\"Aurnqfvgsbeyiprni\",\"status\":\"active\",\"address_1\":\"Kaycee Throughway\",\"address_2\":\"\",\"city\":\"South Hellenport\",\"county\":\"\",\"postcode\":\"60364-9886\",\"country_code\":\"GB\",\"country_name\":\"United Kingdom\",\"vat_registration_number\":\"\",\"telephone_number\":\"+444238318140\",\"telephone_verified\":false,\"verified_telephone\":null,\"verified_at\":null,\"verified_ip\":null,\"created_at\":\"2013-09-04T07:53:13Z\",\"ram_limit\":32768,\"ram_used\":0,\"cloud_ips_limit\":20,\"cloud_ips_used\":1,\"load_balancers_limit\":5,\"load_balancers_used\":0,\"valid_credit_card\":false,\"library_ftp_host\":\"ftp.library.gb1.brightbox.com\",\"library_ftp_user\":\"acc-12345\",\"library_ftp_password\":null,\"clients\":[{\"id\":\"cli-12345\",\"resource_type\":\"api_client\",\"url\":\"https://api.gb1.brightbox.com/1.0/api_clients/cli-12345\",\"name\":null,\"description\":null,\"revoked_at\":null}],\"images\":[],\"servers\":[],\"load_balancers\":[],\"cloud_ips\":[{\"id\":\"cip-12345\",\"resource_type\":\"cloud_ip\",\"url\":\"https://api.gb1.brightbox.com/1.0/cloud_ips/cip-12345\",\"status\":\"unmapped\",\"public_ip\":\"56.67.59.219\",\"reverse_dns\":\"cip-12345-67-59-219.gb1.brightbox.com\",\"name\":null}],\"server_groups\":[{\"id\":\"grp-12345\",\"resource_type\":\"server_group\",\"url\":\"https://api.gb1.brightbox.com/1.0/server_groups/grp-12345\",\"name\":\"default\",\"description\":\"All new servers are added to this group unless specified otherwise.\",\"created_at\":\"2013-09-04T07:53:13Z\",\"default\":true}],\"firewall_policies\":[{\"id\":\"fwp-12345\",\"resource_type\":\"firewall_policy\",\"url\":\"https://api.gb1.brightbox.com/1.0/firewall_policies/fwp-12345\",\"default\":true,\"name\":\"default\",\"created_at\":\"2013-09-04T07:53:14Z\",\"description\":\"Applied to the default server group.\"}],\"owner\":{\"id\":\"usr-12345\",\"resource_type\":\"user\",\"url\":\"https://api.gb1.brightbox.com/1.0/users/usr-12345\",\"name\":\"Dylan Fay DDS\",\"email_address\":\"jason.null@brightbox.com\"},\"users\":[],\"zones\":[{\"id\":\"zon-12345\",\"resource_type\":\"zone\",\"url\":\"https://api.gb1.brightbox.com/1.0/zones/zon-12345\",\"handle\":\"gb1-a\"},{\"id\":\"zon-12345\",\"resource_type\":\"zone\",\"url\":\"https://api.gb1.brightbox.com/1.0/zones/zon-12345\",\"handle\":\"gb1-b\"}]}"
135
125
  http_version:
136
126
  recorded_at: Fri, 06 Sep 2013 15:58:57 GMT
137
- - request:
127
+ - request:
138
128
  method: get
139
129
  uri: http://api.brightbox.dev/1.0/accounts
140
- body:
141
- encoding: US-ASCII
142
- string: ''
143
- headers:
144
- User-Agent:
130
+ body:
131
+ string: ""
132
+ headers:
133
+ User-Agent:
145
134
  - fog/1.15.0
146
- Authorization:
147
- - OAuth a25417dd9a167843ed50b7fbd3338feccbdd10c3
148
- Content-Type:
135
+ Content-Type:
149
136
  - application/json
150
- response:
151
- status:
137
+ Authorization:
138
+ - OAuth a25417dd9a167843ed50b7fbd3338feccbdd10c3
139
+ response:
140
+ status:
152
141
  code: 401
153
142
  message:
154
- headers:
155
- WWW-Authenticate:
156
- - OAuth error="invalid_token"
157
- Content-Type:
158
- - application/json; charset=utf-8
159
- X-UA-Compatible:
143
+ headers:
144
+ Date:
145
+ - Tue, 17 Sep 2013 17:07:35 GMT
146
+ X-UA-Compatible:
160
147
  - IE=Edge
161
- Cache-Control:
162
- - no-cache
163
- X-Request-Id:
148
+ X-Request-Id:
164
149
  - c56090c98625f474b4b46e86a1a00d2b
165
- X-Runtime:
166
- - '0.019527'
167
- Date:
168
- - Tue, 17 Sep 2013 17:07:35 GMT
169
- Connection:
150
+ Content-Type:
151
+ - application/json; charset=utf-8
152
+ X-Runtime:
153
+ - "0.019527"
154
+ WWW-Authenticate:
155
+ - OAuth error="invalid_token"
156
+ Connection:
170
157
  - close
171
- body:
172
- encoding: UTF-8
173
- string: '{"error":"invalid_token","error_description":"The OAuth token can not
174
- be found"}'
158
+ Cache-Control:
159
+ - no-cache
160
+ body:
161
+ string: "{\"error\":\"invalid_token\",\"error_description\":\"The OAuth token can not be found\"}"
175
162
  http_version:
176
163
  recorded_at: Tue, 17 Sep 2013 17:07:35 GMT
177
- - request:
164
+ - request:
178
165
  method: get
179
166
  uri: http://api.brightbox.dev/1.0/accounts
180
- body:
181
- encoding: US-ASCII
182
- string: ''
183
- headers:
184
- User-Agent:
167
+ body:
168
+ string: ""
169
+ headers:
170
+ User-Agent:
185
171
  - fog/1.15.0
186
- Authorization:
187
- - OAuth 0ab4badeb10018d07c1f6c33690ee011f36b4183
188
- Content-Type:
172
+ Content-Type:
189
173
  - application/json
190
- response:
191
- status:
174
+ Authorization:
175
+ - OAuth 0ab4badeb10018d07c1f6c33690ee011f36b4183
176
+ response:
177
+ status:
192
178
  code: 401
193
179
  message:
194
- headers:
195
- WWW-Authenticate:
196
- - OAuth error="invalid_token"
197
- Content-Type:
198
- - application/json; charset=utf-8
199
- X-UA-Compatible:
180
+ headers:
181
+ Date:
182
+ - Tue, 17 Sep 2013 17:07:35 GMT
183
+ X-UA-Compatible:
200
184
  - IE=Edge
201
- Cache-Control:
202
- - no-cache
203
- X-Request-Id:
185
+ X-Request-Id:
204
186
  - f6772e7100709ff8d3eecc0b889a7ec8
205
- X-Runtime:
206
- - '0.033641'
207
- Date:
208
- - Tue, 17 Sep 2013 17:07:35 GMT
209
- Connection:
187
+ Content-Type:
188
+ - application/json; charset=utf-8
189
+ X-Runtime:
190
+ - "0.033641"
191
+ WWW-Authenticate:
192
+ - OAuth error="invalid_token"
193
+ Connection:
210
194
  - close
211
- body:
212
- encoding: UTF-8
213
- string: '{"error":"invalid_token","error_description":"The OAuth token can not
214
- be found"}'
195
+ Cache-Control:
196
+ - no-cache
197
+ body:
198
+ string: "{\"error\":\"invalid_token\",\"error_description\":\"The OAuth token can not be found\"}"
215
199
  http_version:
216
200
  recorded_at: Tue, 17 Sep 2013 17:07:35 GMT
217
- recorded_with: VCR 2.5.0
201
+ - request:
202
+ method: post
203
+ uri: http://api.brightbox.dev/token
204
+ body:
205
+ string: "{\"client_id\":\"cli-12345\",\"grant_type\":\"none\"}"
206
+ headers:
207
+ User-Agent:
208
+ - fog/1.15.0
209
+ Content-Type:
210
+ - application/json
211
+ Authorization:
212
+ - Basic Y2xpLTEyMzQ1OnF5Nnh4bnZ5NG8wdGd2NQ==
213
+ response:
214
+ status:
215
+ code: 200
216
+ message:
217
+ headers:
218
+ X-Frame-Options:
219
+ - sameorigin
220
+ Date:
221
+ - Fri, 27 Sep 2013 15:26:07 GMT
222
+ X-UA-Compatible:
223
+ - IE=Edge
224
+ X-Request-Id:
225
+ - 6bd27a8182798ebce089e3fc997e5369
226
+ Content-Type:
227
+ - application/json;charset=utf-8
228
+ X-Runtime:
229
+ - "0.217147"
230
+ Content-Length:
231
+ - "77"
232
+ ETag:
233
+ - "\"0627ccb11cf8edd78bd775ff81df22a6\""
234
+ X-XSS-Protection:
235
+ - 1; mode=block
236
+ Connection:
237
+ - keep-alive
238
+ Cache-Control:
239
+ - no-store
240
+ body:
241
+ string: "{\"access_token\":\"bcf25863276a83f678be3335d88fb2637ed4cd4d\",\"expires_in\":7200}"
242
+ http_version:
243
+ recorded_at: Fri, 27 Sep 2013 15:26:07 GMT
244
+ - request:
245
+ method: post
246
+ uri: http://api.brightbox.dev/token
247
+ body:
248
+ string: "{\"client_id\":\"cli-12345\",\"grant_type\":\"none\"}"
249
+ headers:
250
+ User-Agent:
251
+ - fog/1.15.0
252
+ Content-Type:
253
+ - application/json
254
+ Authorization:
255
+ - Basic Y2xpLTEyMzQ1OnF5Nnh4bnZ5NG8wdGd2NQ==
256
+ response:
257
+ status:
258
+ code: 200
259
+ message:
260
+ headers:
261
+ X-Frame-Options:
262
+ - sameorigin
263
+ Date:
264
+ - Fri, 27 Sep 2013 15:26:07 GMT
265
+ X-UA-Compatible:
266
+ - IE=Edge
267
+ X-Request-Id:
268
+ - ce17d96e70b3689bc544a6f80dc81d02
269
+ Content-Type:
270
+ - application/json;charset=utf-8
271
+ X-Runtime:
272
+ - "0.115950"
273
+ Content-Length:
274
+ - "77"
275
+ ETag:
276
+ - "\"77db38d3f94f934a9746a87a588dac2c\""
277
+ X-XSS-Protection:
278
+ - 1; mode=block
279
+ Connection:
280
+ - keep-alive
281
+ Cache-Control:
282
+ - no-store
283
+ body:
284
+ string: "{\"access_token\":\"1093b0189e17cdc250ba0ea2f18343343854f687\",\"expires_in\":7200}"
285
+ http_version:
286
+ recorded_at: Fri, 27 Sep 2013 15:26:07 GMT