rsbe-client 0.5.0
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.
- checksums.yaml +7 -0
- data/.gitignore +21 -0
- data/.rspec +3 -0
- data/GETTING-STARTED.md +17 -0
- data/Gemfile +4 -0
- data/LICENSE.txt +22 -0
- data/README.md +73 -0
- data/Rakefile +11 -0
- data/TODO.md +38 -0
- data/lib/rsbe/client.rb +50 -0
- data/lib/rsbe/client/base.rb +140 -0
- data/lib/rsbe/client/collection.rb +84 -0
- data/lib/rsbe/client/connection.rb +24 -0
- data/lib/rsbe/client/method_not_implemented_error.rb +6 -0
- data/lib/rsbe/client/not_found_error.rb +6 -0
- data/lib/rsbe/client/partner.rb +82 -0
- data/lib/rsbe/client/provider.rb +47 -0
- data/lib/rsbe/client/se.rb +97 -0
- data/lib/rsbe/client/search.rb +80 -0
- data/lib/rsbe/client/search_results.rb +41 -0
- data/lib/rsbe/client/unrecognized_resource_error.rb +6 -0
- data/lib/rsbe/client/version.rb +5 -0
- data/lib/rsbe/client/wrong_origin_error.rb +6 -0
- data/rsbe-client.gemspec +30 -0
- data/spec/fixtures/partners/partners_all.json +1 -0
- data/spec/fixtures/partners/partners_none.json +1 -0
- data/spec/rsbe/client/base_spec.rb +10 -0
- data/spec/rsbe/client/collection_spec.rb +186 -0
- data/spec/rsbe/client/connection_spec.rb +20 -0
- data/spec/rsbe/client/partner_spec.rb +185 -0
- data/spec/rsbe/client/provider_spec.rb +122 -0
- data/spec/rsbe/client/se_spec.rb +273 -0
- data/spec/rsbe/client/search_results_spec.rb +140 -0
- data/spec/rsbe/client/search_spec.rb +74 -0
- data/spec/rsbe/client_spec.rb +52 -0
- data/spec/spec_helper.rb +43 -0
- data/spec/vcr_cassettes/client/find_collection.yml +53 -0
- data/spec/vcr_cassettes/client/find_partner.yml +52 -0
- data/spec/vcr_cassettes/client/find_provider.yml +52 -0
- data/spec/vcr_cassettes/client/find_se.yml +53 -0
- data/spec/vcr_cassettes/collection/find-existing.yml +53 -0
- data/spec/vcr_cassettes/collection/find-non_existent.yml +50 -0
- data/spec/vcr_cassettes/collection/lazy-eval-dne.yml +285 -0
- data/spec/vcr_cassettes/collection/lazy-eval-exists.yml +53 -0
- data/spec/vcr_cassettes/collection/save-create-known-id.yml +103 -0
- data/spec/vcr_cassettes/collection/save-create-unknown-id.yml +56 -0
- data/spec/vcr_cassettes/collection/save-invalid.yml +143 -0
- data/spec/vcr_cassettes/collection/save-update-valid.yml +99 -0
- data/spec/vcr_cassettes/partner/all.yml +300 -0
- data/spec/vcr_cassettes/partner/dne-with-id.yml +238 -0
- data/spec/vcr_cassettes/partner/find-existing.yml +52 -0
- data/spec/vcr_cassettes/partner/find-non_existent.yml +50 -0
- data/spec/vcr_cassettes/partner/lazy-eval-exists.yml +53 -0
- data/spec/vcr_cassettes/partner/save-create-known-id.yml +101 -0
- data/spec/vcr_cassettes/partner/save-create-unknown-id.yml +54 -0
- data/spec/vcr_cassettes/partner/save-invalid.yml +177 -0
- data/spec/vcr_cassettes/partner/save-unknown-id.yml +54 -0
- data/spec/vcr_cassettes/partner/save-update-valid.yml +98 -0
- data/spec/vcr_cassettes/partner/with-collections.yml +203 -0
- data/spec/vcr_cassettes/partner/without-collections.yml +101 -0
- data/spec/vcr_cassettes/provider/all.yml +248 -0
- data/spec/vcr_cassettes/provider/find-existing.yml +52 -0
- data/spec/vcr_cassettes/provider/find-non_existent.yml +50 -0
- data/spec/vcr_cassettes/provider/save-create-known-id.yml +101 -0
- data/spec/vcr_cassettes/provider/save-create-unknown-id.yml +54 -0
- data/spec/vcr_cassettes/provider/save-invalid.yml +178 -0
- data/spec/vcr_cassettes/provider/save-update-valid.yml +144 -0
- data/spec/vcr_cassettes/se/find-existing.yml +53 -0
- data/spec/vcr_cassettes/se/find-non_existent.yml +50 -0
- data/spec/vcr_cassettes/se/lazy-eval-exists.yml +52 -0
- data/spec/vcr_cassettes/se/save-create-known-id.yml +146 -0
- data/spec/vcr_cassettes/se/save-create-unknown-id.yml +56 -0
- data/spec/vcr_cassettes/se/save-invalid.yml +305 -0
- data/spec/vcr_cassettes/se/save-update-valid.yml +99 -0
- data/spec/vcr_cassettes/se/search-malformed-uuid.yml +54 -0
- data/spec/vcr_cassettes/se/search-with-existing-se.yml +52 -0
- data/spec/vcr_cassettes/se/search-with-missing-se.yml +52 -0
- data/spec/vcr_cassettes/search/search-with-existing-se.yml +52 -0
- data/spec/vcr_cassettes/search_results/no-results.yml +52 -0
- data/spec/vcr_cassettes/search_results/search-by-digi_id.yml +101 -0
- data/spec/vcr_cassettes/search_results/search-by-step.yml +201 -0
- metadata +307 -0
@@ -0,0 +1,52 @@
|
|
1
|
+
describe Rsbe::Client do
|
2
|
+
PARTNER_URL = 'http://localhost:3000/api/v0/partners/977e659b-886a-4626-8799-8979426ad2b3'
|
3
|
+
COLLECTION_URL = 'http://localhost:3000/api/v0/colls/ea85c776-a79b-4603-b307-d6760a400281'
|
4
|
+
PROVIDER_URL = 'http://localhost:3000/api/v0/providers/51213be7-c8de-4e06-8cc2-06bfc82cdd68'
|
5
|
+
SE_URL = 'http://localhost:3000/api/v0/ses/acf51ef2-8bf3-4f05-9042-0bfCB6860560'
|
6
|
+
NO_OBJECT_URL = 'http://localhost:3000/api/v0/fluffy_bunnies/4bf6daf0-e065-46e2-af30-3f74b1f7478e' # does not exist
|
7
|
+
|
8
|
+
describe '.find' do
|
9
|
+
context 'when object exists' do
|
10
|
+
context 'and URL points to a Partner', vcr: { cassette_name: 'client/find_partner' } do
|
11
|
+
subject { Rsbe::Client.find(PARTNER_URL) }
|
12
|
+
it { should be_a(Rsbe::Client::Partner) }
|
13
|
+
its(:id) { should == '977e659b-886a-4626-8799-8979426ad2b3' }
|
14
|
+
its(:code) { should == 'foo' }
|
15
|
+
end
|
16
|
+
|
17
|
+
context 'and URL points to a Collection', vcr: { cassette_name: 'client/find_collection' } do
|
18
|
+
subject { Rsbe::Client.find(COLLECTION_URL) }
|
19
|
+
it { should be_a(Rsbe::Client::Collection) }
|
20
|
+
its(:id) { should == 'ea85c776-a79b-4603-b307-d6760a400281' }
|
21
|
+
its(:code) { should == 'quux' }
|
22
|
+
end
|
23
|
+
|
24
|
+
context 'and URL points to a Provider', vcr: { cassette_name: 'client/find_provider' } do
|
25
|
+
subject { Rsbe::Client.find(PROVIDER_URL) }
|
26
|
+
it { should be_a(Rsbe::Client::Provider) }
|
27
|
+
its(:id) { should == '51213be7-c8de-4e06-8cc2-06bfc82cdd68' }
|
28
|
+
its(:name) { should == 'Calpurnia' }
|
29
|
+
end
|
30
|
+
|
31
|
+
context 'and URL points to an Se', vcr: { cassette_name: 'client/find_se' } do
|
32
|
+
subject { Rsbe::Client.find(SE_URL) }
|
33
|
+
it { should be_a(Rsbe::Client::Se) }
|
34
|
+
its(:id) { should == 'acf51ef2-8bf3-4f05-9042-0bfcb6860560' }
|
35
|
+
its(:digi_id) { should == 'foo_quux_cuid01234' }
|
36
|
+
end
|
37
|
+
end
|
38
|
+
|
39
|
+
context 'when URL does not match an existing rsbe resource' do
|
40
|
+
it 'should raise an exception' do
|
41
|
+
expect { Rsbe::Client.find(NO_OBJECT_URL) }.to raise_error Rsbe::Client::UnrecognizedResourceError
|
42
|
+
end
|
43
|
+
end
|
44
|
+
|
45
|
+
context 'when URL origin does not match the current connection configuration' do
|
46
|
+
it 'should raise an exception' do
|
47
|
+
expect { Rsbe::Client.find('some-bogus-url') }.to raise_error Rsbe::Client::WrongOriginError
|
48
|
+
end
|
49
|
+
end
|
50
|
+
end
|
51
|
+
end
|
52
|
+
|
data/spec/spec_helper.rb
ADDED
@@ -0,0 +1,43 @@
|
|
1
|
+
require_relative '../lib/rsbe/client'
|
2
|
+
require 'rspec/its'
|
3
|
+
require 'vcr'
|
4
|
+
require 'webmock'
|
5
|
+
require 'faraday'
|
6
|
+
require 'pry'
|
7
|
+
|
8
|
+
RSpec.configure do |config|
|
9
|
+
# protect against hitting production service
|
10
|
+
ENV['RSBE_USER'] = nil
|
11
|
+
ENV['RSBE_PASSWORD'] = nil
|
12
|
+
ENV['RSBE_HOST'] = nil
|
13
|
+
|
14
|
+
config.filter_run :focus
|
15
|
+
config.run_all_when_everything_filtered = true
|
16
|
+
|
17
|
+
if config.files_to_run.one?
|
18
|
+
config.default_formatter = 'doc'
|
19
|
+
end
|
20
|
+
|
21
|
+
config.order = :random
|
22
|
+
|
23
|
+
Kernel.srand config.seed
|
24
|
+
|
25
|
+
config.expect_with :rspec do |expectations|
|
26
|
+
expectations.syntax = :expect
|
27
|
+
end
|
28
|
+
|
29
|
+
config.mock_with :rspec do |mocks|
|
30
|
+
mocks.syntax = :expect
|
31
|
+
mocks.verify_partial_doubles = true
|
32
|
+
end
|
33
|
+
end
|
34
|
+
|
35
|
+
VCR.configure do |c|
|
36
|
+
c.default_cassette_options = { allow_playback_repeats: true, record: :new_episodes }
|
37
|
+
c.cassette_library_dir = 'spec/vcr_cassettes'
|
38
|
+
c.configure_rspec_metadata!
|
39
|
+
c.hook_into :webmock
|
40
|
+
c.allow_http_connections_when_no_cassette = true
|
41
|
+
c.filter_sensitive_data('user') { ENV['RSBE_USER'] }
|
42
|
+
c.filter_sensitive_data('password') { ENV['RSBE_PASSWORD'] }
|
43
|
+
end
|
@@ -0,0 +1,53 @@
|
|
1
|
+
---
|
2
|
+
http_interactions:
|
3
|
+
- request:
|
4
|
+
method: get
|
5
|
+
uri: http://foo:bar@localhost:3000/api/v0/colls/ea85c776-a79b-4603-b307-d6760a400281
|
6
|
+
body:
|
7
|
+
encoding: US-ASCII
|
8
|
+
string: ''
|
9
|
+
headers:
|
10
|
+
User-Agent:
|
11
|
+
- Faraday v0.9.2
|
12
|
+
Accept-Encoding:
|
13
|
+
- gzip;q=1.0,deflate;q=0.6,identity;q=0.3
|
14
|
+
Accept:
|
15
|
+
- '*/*'
|
16
|
+
response:
|
17
|
+
status:
|
18
|
+
code: 200
|
19
|
+
message: OK
|
20
|
+
headers:
|
21
|
+
X-Frame-Options:
|
22
|
+
- SAMEORIGIN
|
23
|
+
X-Xss-Protection:
|
24
|
+
- 1; mode=block
|
25
|
+
X-Content-Type-Options:
|
26
|
+
- nosniff
|
27
|
+
X-Ua-Compatible:
|
28
|
+
- chrome=1
|
29
|
+
Content-Type:
|
30
|
+
- application/json; charset=utf-8
|
31
|
+
X-Meta-Request-Version:
|
32
|
+
- 0.2.9
|
33
|
+
Etag:
|
34
|
+
- '"b5aa3a331c5cd9b6a585a1f93c8f4649"'
|
35
|
+
Cache-Control:
|
36
|
+
- max-age=0, private, must-revalidate
|
37
|
+
Set-Cookie:
|
38
|
+
- request_method=GET; path=/
|
39
|
+
X-Request-Id:
|
40
|
+
- 38bbfb13-f0ae-4e6f-bd39-f7fa36e445f0
|
41
|
+
X-Runtime:
|
42
|
+
- '0.050442'
|
43
|
+
Connection:
|
44
|
+
- close
|
45
|
+
Server:
|
46
|
+
- thin 1.6.2 codename Doc Brown
|
47
|
+
body:
|
48
|
+
encoding: UTF-8
|
49
|
+
string: '{"id":"ea85c776-a79b-4603-b307-d6760a400281","partner_id":"977e659b-886a-4626-8799-8979426ad2b3","code":"quux","name":"quasar
|
50
|
+
collection","coll_type":"origin","created_at":"2016-11-30T18:49:35.618Z","updated_at":"2016-11-30T18:49:35.618Z","quota":500,"ready_for_content":true,"partner_url":"http://localhost:3000/api/v0/partners/977e659b-886a-4626-8799-8979426ad2b3","ses_url":"http://localhost:3000/api/v0/colls/ea85c776-a79b-4603-b307-d6760a400281/ses","lock_version":0,"rel_path":"quux"}'
|
51
|
+
http_version:
|
52
|
+
recorded_at: Fri, 20 Jan 2017 23:39:52 GMT
|
53
|
+
recorded_with: VCR 2.9.3
|
@@ -0,0 +1,52 @@
|
|
1
|
+
---
|
2
|
+
http_interactions:
|
3
|
+
- request:
|
4
|
+
method: get
|
5
|
+
uri: http://foo:bar@localhost:3000/api/v0/partners/977e659b-886a-4626-8799-8979426ad2b3
|
6
|
+
body:
|
7
|
+
encoding: US-ASCII
|
8
|
+
string: ''
|
9
|
+
headers:
|
10
|
+
User-Agent:
|
11
|
+
- Faraday v0.9.2
|
12
|
+
Accept-Encoding:
|
13
|
+
- gzip;q=1.0,deflate;q=0.6,identity;q=0.3
|
14
|
+
Accept:
|
15
|
+
- '*/*'
|
16
|
+
response:
|
17
|
+
status:
|
18
|
+
code: 200
|
19
|
+
message: OK
|
20
|
+
headers:
|
21
|
+
X-Frame-Options:
|
22
|
+
- SAMEORIGIN
|
23
|
+
X-Xss-Protection:
|
24
|
+
- 1; mode=block
|
25
|
+
X-Content-Type-Options:
|
26
|
+
- nosniff
|
27
|
+
X-Ua-Compatible:
|
28
|
+
- chrome=1
|
29
|
+
Content-Type:
|
30
|
+
- application/json; charset=utf-8
|
31
|
+
X-Meta-Request-Version:
|
32
|
+
- 0.2.9
|
33
|
+
Etag:
|
34
|
+
- '"ff81f65dd8e65e9d2f398b6fba5ed705"'
|
35
|
+
Cache-Control:
|
36
|
+
- max-age=0, private, must-revalidate
|
37
|
+
Set-Cookie:
|
38
|
+
- request_method=GET; path=/
|
39
|
+
X-Request-Id:
|
40
|
+
- 7b0d91bf-b93b-4eda-a7ed-dce73b7fd0d9
|
41
|
+
X-Runtime:
|
42
|
+
- '0.008744'
|
43
|
+
Connection:
|
44
|
+
- close
|
45
|
+
Server:
|
46
|
+
- thin 1.6.2 codename Doc Brown
|
47
|
+
body:
|
48
|
+
encoding: UTF-8
|
49
|
+
string: '{"id":"977e659b-886a-4626-8799-8979426ad2b3","code":"foo","name":null,"created_at":"2016-11-30T15:02:52.698Z","updated_at":"2016-11-30T15:02:52.698Z","partners_url":"http://localhost:3000/api/v0/partners","colls_url":"http://localhost:3000/api/v0/partners/977e659b-886a-4626-8799-8979426ad2b3/colls","lock_version":0,"rel_path":"f/o/o"}'
|
50
|
+
http_version:
|
51
|
+
recorded_at: Fri, 20 Jan 2017 23:38:15 GMT
|
52
|
+
recorded_with: VCR 2.9.3
|
@@ -0,0 +1,52 @@
|
|
1
|
+
---
|
2
|
+
http_interactions:
|
3
|
+
- request:
|
4
|
+
method: get
|
5
|
+
uri: http://foo:bar@localhost:3000/api/v0/providers/51213be7-c8de-4e06-8cc2-06bfc82cdd68
|
6
|
+
body:
|
7
|
+
encoding: US-ASCII
|
8
|
+
string: ''
|
9
|
+
headers:
|
10
|
+
User-Agent:
|
11
|
+
- Faraday v0.9.2
|
12
|
+
Accept-Encoding:
|
13
|
+
- gzip;q=1.0,deflate;q=0.6,identity;q=0.3
|
14
|
+
Accept:
|
15
|
+
- '*/*'
|
16
|
+
response:
|
17
|
+
status:
|
18
|
+
code: 200
|
19
|
+
message: OK
|
20
|
+
headers:
|
21
|
+
X-Frame-Options:
|
22
|
+
- SAMEORIGIN
|
23
|
+
X-Xss-Protection:
|
24
|
+
- 1; mode=block
|
25
|
+
X-Content-Type-Options:
|
26
|
+
- nosniff
|
27
|
+
X-Ua-Compatible:
|
28
|
+
- chrome=1
|
29
|
+
Content-Type:
|
30
|
+
- application/json; charset=utf-8
|
31
|
+
X-Meta-Request-Version:
|
32
|
+
- 0.2.9
|
33
|
+
Etag:
|
34
|
+
- '"899b743a73d9e0c627447c15248d4e7e"'
|
35
|
+
Cache-Control:
|
36
|
+
- max-age=0, private, must-revalidate
|
37
|
+
Set-Cookie:
|
38
|
+
- request_method=GET; path=/
|
39
|
+
X-Request-Id:
|
40
|
+
- 15c71bee-9db5-4839-b4cd-ed38b9d156ed
|
41
|
+
X-Runtime:
|
42
|
+
- '0.032412'
|
43
|
+
Connection:
|
44
|
+
- close
|
45
|
+
Server:
|
46
|
+
- thin 1.6.2 codename Doc Brown
|
47
|
+
body:
|
48
|
+
encoding: UTF-8
|
49
|
+
string: '{"id":"51213be7-c8de-4e06-8cc2-06bfc82cdd68","name":"Calpurnia","created_at":"2016-11-30T15:02:53.459Z","updated_at":"2016-11-30T15:02:53.654Z","providers_url":"http://localhost:3000/api/v0/providers","lock_version":1}'
|
50
|
+
http_version:
|
51
|
+
recorded_at: Fri, 20 Jan 2017 23:41:02 GMT
|
52
|
+
recorded_with: VCR 2.9.3
|
@@ -0,0 +1,53 @@
|
|
1
|
+
---
|
2
|
+
http_interactions:
|
3
|
+
- request:
|
4
|
+
method: get
|
5
|
+
uri: http://foo:bar@localhost:3000/api/v0/ses/acf51ef2-8bf3-4f05-9042-0bfCB6860560
|
6
|
+
body:
|
7
|
+
encoding: US-ASCII
|
8
|
+
string: ''
|
9
|
+
headers:
|
10
|
+
User-Agent:
|
11
|
+
- Faraday v0.9.2
|
12
|
+
Accept-Encoding:
|
13
|
+
- gzip;q=1.0,deflate;q=0.6,identity;q=0.3
|
14
|
+
Accept:
|
15
|
+
- '*/*'
|
16
|
+
response:
|
17
|
+
status:
|
18
|
+
code: 200
|
19
|
+
message: OK
|
20
|
+
headers:
|
21
|
+
X-Frame-Options:
|
22
|
+
- SAMEORIGIN
|
23
|
+
X-Xss-Protection:
|
24
|
+
- 1; mode=block
|
25
|
+
X-Content-Type-Options:
|
26
|
+
- nosniff
|
27
|
+
X-Ua-Compatible:
|
28
|
+
- chrome=1
|
29
|
+
Content-Type:
|
30
|
+
- application/json; charset=utf-8
|
31
|
+
X-Meta-Request-Version:
|
32
|
+
- 0.2.9
|
33
|
+
Etag:
|
34
|
+
- '"98b1bea21461e79a20c2b92d76e0ce11"'
|
35
|
+
Cache-Control:
|
36
|
+
- max-age=0, private, must-revalidate
|
37
|
+
Set-Cookie:
|
38
|
+
- request_method=GET; path=/
|
39
|
+
X-Request-Id:
|
40
|
+
- 341babc4-5b16-44d8-ac6a-4ab4e05c0125
|
41
|
+
X-Runtime:
|
42
|
+
- '0.037678'
|
43
|
+
Connection:
|
44
|
+
- close
|
45
|
+
Server:
|
46
|
+
- thin 1.6.2 codename Doc Brown
|
47
|
+
body:
|
48
|
+
encoding: UTF-8
|
49
|
+
string: '{"id":"acf51ef2-8bf3-4f05-9042-0bfcb6860560","coll_id":"ea85c776-a79b-4603-b307-d6760a400281","digi_id":"foo_quux_cuid01234","do_type":"audio","phase":"digitization","step":"qc","status":"active","notes":"these
|
50
|
+
are some AWESOME notes!","label":"v 1 pt. 2","created_at":"2016-11-30T18:52:03.913Z","updated_at":"2016-11-30T18:53:08.361Z","coll_url":"http://localhost:3000/api/v0/colls/ea85c776-a79b-4603-b307-d6760a400281","lock_version":1}'
|
51
|
+
http_version:
|
52
|
+
recorded_at: Fri, 20 Jan 2017 23:41:02 GMT
|
53
|
+
recorded_with: VCR 2.9.3
|
@@ -0,0 +1,53 @@
|
|
1
|
+
---
|
2
|
+
http_interactions:
|
3
|
+
- request:
|
4
|
+
method: get
|
5
|
+
uri: http://foo:bar@localhost:3000/api/v0/colls/fc7455cf-3b20-494c-9b9e-17cae9e51fa1
|
6
|
+
body:
|
7
|
+
encoding: US-ASCII
|
8
|
+
string: ''
|
9
|
+
headers:
|
10
|
+
User-Agent:
|
11
|
+
- Faraday v0.9.0
|
12
|
+
Accept-Encoding:
|
13
|
+
- gzip;q=1.0,deflate;q=0.6,identity;q=0.3
|
14
|
+
Accept:
|
15
|
+
- '*/*'
|
16
|
+
response:
|
17
|
+
status:
|
18
|
+
code: 200
|
19
|
+
message: OK
|
20
|
+
headers:
|
21
|
+
X-Frame-Options:
|
22
|
+
- SAMEORIGIN
|
23
|
+
X-Xss-Protection:
|
24
|
+
- 1; mode=block
|
25
|
+
X-Content-Type-Options:
|
26
|
+
- nosniff
|
27
|
+
X-Ua-Compatible:
|
28
|
+
- chrome=1
|
29
|
+
Content-Type:
|
30
|
+
- application/json; charset=utf-8
|
31
|
+
X-Meta-Request-Version:
|
32
|
+
- 0.2.9
|
33
|
+
Etag:
|
34
|
+
- '"0b08e939ec30068fe00bd00b48b84822"'
|
35
|
+
Cache-Control:
|
36
|
+
- max-age=0, private, must-revalidate
|
37
|
+
Set-Cookie:
|
38
|
+
- request_method=GET; path=/
|
39
|
+
X-Request-Id:
|
40
|
+
- 54d58c09-6e9a-4095-89ae-40ebb0b0d5e7
|
41
|
+
X-Runtime:
|
42
|
+
- '0.106557'
|
43
|
+
Connection:
|
44
|
+
- close
|
45
|
+
Server:
|
46
|
+
- thin 1.6.2 codename Doc Brown
|
47
|
+
body:
|
48
|
+
encoding: UTF-8
|
49
|
+
string: '{"id":"fc7455cf-3b20-494c-9b9e-17cae9e51fa1","partner_id":"b110731f-86af-4534-8e58-6d219dcb1c52","code":"zaap","name":"Zoinks
|
50
|
+
and Away, Potatoes!","coll_type":"origin","created_at":"2014-11-07T14:50:23.745Z","updated_at":"2014-11-07T14:50:23.745Z","quota":500,"ready_for_content":false,"partner_url":"http://localhost:3000/api/v0/partners/b110731f-86af-4534-8e58-6d219dcb1c52","lock_version":0,"rel_path":null}'
|
51
|
+
http_version:
|
52
|
+
recorded_at: Fri, 07 Nov 2014 14:57:15 GMT
|
53
|
+
recorded_with: VCR 2.9.3
|
@@ -0,0 +1,50 @@
|
|
1
|
+
---
|
2
|
+
http_interactions:
|
3
|
+
- request:
|
4
|
+
method: get
|
5
|
+
uri: http://foo:bar@localhost:3000/api/v0/colls/bad45d46-a14a-489f-97ac-384afb552a13
|
6
|
+
body:
|
7
|
+
encoding: US-ASCII
|
8
|
+
string: ''
|
9
|
+
headers:
|
10
|
+
User-Agent:
|
11
|
+
- Faraday v0.9.0
|
12
|
+
Accept-Encoding:
|
13
|
+
- gzip;q=1.0,deflate;q=0.6,identity;q=0.3
|
14
|
+
Accept:
|
15
|
+
- '*/*'
|
16
|
+
response:
|
17
|
+
status:
|
18
|
+
code: 404
|
19
|
+
message: Not Found
|
20
|
+
headers:
|
21
|
+
X-Frame-Options:
|
22
|
+
- SAMEORIGIN
|
23
|
+
X-Xss-Protection:
|
24
|
+
- 1; mode=block
|
25
|
+
X-Content-Type-Options:
|
26
|
+
- nosniff
|
27
|
+
X-Ua-Compatible:
|
28
|
+
- chrome=1
|
29
|
+
Content-Type:
|
30
|
+
- application/json; charset=utf-8
|
31
|
+
X-Meta-Request-Version:
|
32
|
+
- 0.2.9
|
33
|
+
Cache-Control:
|
34
|
+
- no-cache
|
35
|
+
Set-Cookie:
|
36
|
+
- request_method=GET; path=/
|
37
|
+
X-Request-Id:
|
38
|
+
- 6d098f67-be03-482e-be0c-7ded89675152
|
39
|
+
X-Runtime:
|
40
|
+
- '0.081581'
|
41
|
+
Connection:
|
42
|
+
- close
|
43
|
+
Server:
|
44
|
+
- thin 1.6.2 codename Doc Brown
|
45
|
+
body:
|
46
|
+
encoding: UTF-8
|
47
|
+
string: '{"error":"Couldn''t find Coll with id=bad45d46-a14a-489f-97ac-384afb552a13"}'
|
48
|
+
http_version:
|
49
|
+
recorded_at: Fri, 07 Nov 2014 14:57:15 GMT
|
50
|
+
recorded_with: VCR 2.9.3
|
@@ -0,0 +1,285 @@
|
|
1
|
+
---
|
2
|
+
http_interactions:
|
3
|
+
- request:
|
4
|
+
method: get
|
5
|
+
uri: http://foo:bar@localhost:3000/api/v0/colls/7c7afee8-c8be-43bf-8096-c03672aaf114
|
6
|
+
body:
|
7
|
+
encoding: US-ASCII
|
8
|
+
string: ''
|
9
|
+
headers:
|
10
|
+
User-Agent:
|
11
|
+
- Faraday v0.9.0
|
12
|
+
Accept-Encoding:
|
13
|
+
- gzip;q=1.0,deflate;q=0.6,identity;q=0.3
|
14
|
+
Accept:
|
15
|
+
- '*/*'
|
16
|
+
response:
|
17
|
+
status:
|
18
|
+
code: 404
|
19
|
+
message: Not Found
|
20
|
+
headers:
|
21
|
+
X-Frame-Options:
|
22
|
+
- SAMEORIGIN
|
23
|
+
X-Xss-Protection:
|
24
|
+
- 1; mode=block
|
25
|
+
X-Content-Type-Options:
|
26
|
+
- nosniff
|
27
|
+
X-Ua-Compatible:
|
28
|
+
- chrome=1
|
29
|
+
Content-Type:
|
30
|
+
- application/json; charset=utf-8
|
31
|
+
X-Meta-Request-Version:
|
32
|
+
- 0.2.9
|
33
|
+
Cache-Control:
|
34
|
+
- no-cache
|
35
|
+
Set-Cookie:
|
36
|
+
- request_method=GET; path=/
|
37
|
+
X-Request-Id:
|
38
|
+
- 35bdf634-252e-4746-b6d9-5befb0e24f26
|
39
|
+
X-Runtime:
|
40
|
+
- '0.009585'
|
41
|
+
Connection:
|
42
|
+
- close
|
43
|
+
Server:
|
44
|
+
- thin 1.6.2 codename Doc Brown
|
45
|
+
body:
|
46
|
+
encoding: UTF-8
|
47
|
+
string: '{"error":"Couldn''t find Coll with id=7c7afee8-c8be-43bf-8096-c03672aaf114"}'
|
48
|
+
http_version:
|
49
|
+
recorded_at: Sun, 02 Oct 2016 00:50:59 GMT
|
50
|
+
- request:
|
51
|
+
method: get
|
52
|
+
uri: http://foo:bar@localhost:3000/api/v0/colls/7c7afee8-c8be-43bf-8096-c03672aaf114
|
53
|
+
body:
|
54
|
+
encoding: US-ASCII
|
55
|
+
string: ''
|
56
|
+
headers:
|
57
|
+
User-Agent:
|
58
|
+
- Faraday v0.9.0
|
59
|
+
Accept-Encoding:
|
60
|
+
- gzip;q=1.0,deflate;q=0.6,identity;q=0.3
|
61
|
+
Accept:
|
62
|
+
- '*/*'
|
63
|
+
response:
|
64
|
+
status:
|
65
|
+
code: 404
|
66
|
+
message: Not Found
|
67
|
+
headers:
|
68
|
+
X-Frame-Options:
|
69
|
+
- SAMEORIGIN
|
70
|
+
X-Xss-Protection:
|
71
|
+
- 1; mode=block
|
72
|
+
X-Content-Type-Options:
|
73
|
+
- nosniff
|
74
|
+
X-Ua-Compatible:
|
75
|
+
- chrome=1
|
76
|
+
Content-Type:
|
77
|
+
- application/json; charset=utf-8
|
78
|
+
X-Meta-Request-Version:
|
79
|
+
- 0.2.9
|
80
|
+
Cache-Control:
|
81
|
+
- no-cache
|
82
|
+
Set-Cookie:
|
83
|
+
- request_method=GET; path=/
|
84
|
+
X-Request-Id:
|
85
|
+
- b5594af6-56ac-411a-add0-95f280d35505
|
86
|
+
X-Runtime:
|
87
|
+
- '0.010523'
|
88
|
+
Connection:
|
89
|
+
- close
|
90
|
+
Server:
|
91
|
+
- thin 1.6.2 codename Doc Brown
|
92
|
+
body:
|
93
|
+
encoding: UTF-8
|
94
|
+
string: '{"error":"Couldn''t find Coll with id=7c7afee8-c8be-43bf-8096-c03672aaf114"}'
|
95
|
+
http_version:
|
96
|
+
recorded_at: Sun, 02 Oct 2016 00:50:59 GMT
|
97
|
+
- request:
|
98
|
+
method: get
|
99
|
+
uri: http://foo:bar@localhost:3000/api/v0/colls/7c7afee8-c8be-43bf-8096-c03672aaf114
|
100
|
+
body:
|
101
|
+
encoding: US-ASCII
|
102
|
+
string: ''
|
103
|
+
headers:
|
104
|
+
User-Agent:
|
105
|
+
- Faraday v0.9.0
|
106
|
+
Accept-Encoding:
|
107
|
+
- gzip;q=1.0,deflate;q=0.6,identity;q=0.3
|
108
|
+
Accept:
|
109
|
+
- '*/*'
|
110
|
+
response:
|
111
|
+
status:
|
112
|
+
code: 404
|
113
|
+
message: Not Found
|
114
|
+
headers:
|
115
|
+
X-Frame-Options:
|
116
|
+
- SAMEORIGIN
|
117
|
+
X-Xss-Protection:
|
118
|
+
- 1; mode=block
|
119
|
+
X-Content-Type-Options:
|
120
|
+
- nosniff
|
121
|
+
X-Ua-Compatible:
|
122
|
+
- chrome=1
|
123
|
+
Content-Type:
|
124
|
+
- application/json; charset=utf-8
|
125
|
+
X-Meta-Request-Version:
|
126
|
+
- 0.2.9
|
127
|
+
Cache-Control:
|
128
|
+
- no-cache
|
129
|
+
Set-Cookie:
|
130
|
+
- request_method=GET; path=/
|
131
|
+
X-Request-Id:
|
132
|
+
- 3802e194-d60f-4142-aa70-1893ecfb5a55
|
133
|
+
X-Runtime:
|
134
|
+
- '0.043454'
|
135
|
+
Connection:
|
136
|
+
- close
|
137
|
+
Server:
|
138
|
+
- thin 1.6.2 codename Doc Brown
|
139
|
+
body:
|
140
|
+
encoding: UTF-8
|
141
|
+
string: '{"error":"Couldn''t find Coll with id=7c7afee8-c8be-43bf-8096-c03672aaf114"}'
|
142
|
+
http_version:
|
143
|
+
recorded_at: Sun, 02 Oct 2016 00:50:59 GMT
|
144
|
+
- request:
|
145
|
+
method: get
|
146
|
+
uri: http://foo:bar@localhost:3000/api/v0/colls/7c7afee8-c8be-43bf-8096-c03672aaf114
|
147
|
+
body:
|
148
|
+
encoding: US-ASCII
|
149
|
+
string: ''
|
150
|
+
headers:
|
151
|
+
User-Agent:
|
152
|
+
- Faraday v0.9.0
|
153
|
+
Accept-Encoding:
|
154
|
+
- gzip;q=1.0,deflate;q=0.6,identity;q=0.3
|
155
|
+
Accept:
|
156
|
+
- '*/*'
|
157
|
+
response:
|
158
|
+
status:
|
159
|
+
code: 404
|
160
|
+
message: Not Found
|
161
|
+
headers:
|
162
|
+
X-Frame-Options:
|
163
|
+
- SAMEORIGIN
|
164
|
+
X-Xss-Protection:
|
165
|
+
- 1; mode=block
|
166
|
+
X-Content-Type-Options:
|
167
|
+
- nosniff
|
168
|
+
X-Ua-Compatible:
|
169
|
+
- chrome=1
|
170
|
+
Content-Type:
|
171
|
+
- application/json; charset=utf-8
|
172
|
+
X-Meta-Request-Version:
|
173
|
+
- 0.2.9
|
174
|
+
Cache-Control:
|
175
|
+
- no-cache
|
176
|
+
Set-Cookie:
|
177
|
+
- request_method=GET; path=/
|
178
|
+
X-Request-Id:
|
179
|
+
- d801db49-b39e-4a3d-941e-d300b12a9e1f
|
180
|
+
X-Runtime:
|
181
|
+
- '0.010425'
|
182
|
+
Connection:
|
183
|
+
- close
|
184
|
+
Server:
|
185
|
+
- thin 1.6.2 codename Doc Brown
|
186
|
+
body:
|
187
|
+
encoding: UTF-8
|
188
|
+
string: '{"error":"Couldn''t find Coll with id=7c7afee8-c8be-43bf-8096-c03672aaf114"}'
|
189
|
+
http_version:
|
190
|
+
recorded_at: Sun, 02 Oct 2016 00:50:59 GMT
|
191
|
+
- request:
|
192
|
+
method: get
|
193
|
+
uri: http://foo:bar@localhost:3000/api/v0/colls/7c7afee8-c8be-43bf-8096-c03672aaf114
|
194
|
+
body:
|
195
|
+
encoding: US-ASCII
|
196
|
+
string: ''
|
197
|
+
headers:
|
198
|
+
User-Agent:
|
199
|
+
- Faraday v0.9.0
|
200
|
+
Accept-Encoding:
|
201
|
+
- gzip;q=1.0,deflate;q=0.6,identity;q=0.3
|
202
|
+
Accept:
|
203
|
+
- '*/*'
|
204
|
+
response:
|
205
|
+
status:
|
206
|
+
code: 404
|
207
|
+
message: Not Found
|
208
|
+
headers:
|
209
|
+
X-Frame-Options:
|
210
|
+
- SAMEORIGIN
|
211
|
+
X-Xss-Protection:
|
212
|
+
- 1; mode=block
|
213
|
+
X-Content-Type-Options:
|
214
|
+
- nosniff
|
215
|
+
X-Ua-Compatible:
|
216
|
+
- chrome=1
|
217
|
+
Content-Type:
|
218
|
+
- application/json; charset=utf-8
|
219
|
+
X-Meta-Request-Version:
|
220
|
+
- 0.2.9
|
221
|
+
Cache-Control:
|
222
|
+
- no-cache
|
223
|
+
Set-Cookie:
|
224
|
+
- request_method=GET; path=/
|
225
|
+
X-Request-Id:
|
226
|
+
- 461ebcb2-0ffb-45c8-85fb-75d8d8e6c171
|
227
|
+
X-Runtime:
|
228
|
+
- '0.008864'
|
229
|
+
Connection:
|
230
|
+
- close
|
231
|
+
Server:
|
232
|
+
- thin 1.6.2 codename Doc Brown
|
233
|
+
body:
|
234
|
+
encoding: UTF-8
|
235
|
+
string: '{"error":"Couldn''t find Coll with id=7c7afee8-c8be-43bf-8096-c03672aaf114"}'
|
236
|
+
http_version:
|
237
|
+
recorded_at: Sun, 02 Oct 2016 00:50:59 GMT
|
238
|
+
- request:
|
239
|
+
method: get
|
240
|
+
uri: http://foo:bar@localhost:3000/api/v0/colls/7c7afee8-c8be-43bf-8096-c03672aaf114
|
241
|
+
body:
|
242
|
+
encoding: US-ASCII
|
243
|
+
string: ''
|
244
|
+
headers:
|
245
|
+
User-Agent:
|
246
|
+
- Faraday v0.9.0
|
247
|
+
Accept-Encoding:
|
248
|
+
- gzip;q=1.0,deflate;q=0.6,identity;q=0.3
|
249
|
+
Accept:
|
250
|
+
- '*/*'
|
251
|
+
response:
|
252
|
+
status:
|
253
|
+
code: 404
|
254
|
+
message: Not Found
|
255
|
+
headers:
|
256
|
+
X-Frame-Options:
|
257
|
+
- SAMEORIGIN
|
258
|
+
X-Xss-Protection:
|
259
|
+
- 1; mode=block
|
260
|
+
X-Content-Type-Options:
|
261
|
+
- nosniff
|
262
|
+
X-Ua-Compatible:
|
263
|
+
- chrome=1
|
264
|
+
Content-Type:
|
265
|
+
- application/json; charset=utf-8
|
266
|
+
X-Meta-Request-Version:
|
267
|
+
- 0.2.9
|
268
|
+
Cache-Control:
|
269
|
+
- no-cache
|
270
|
+
Set-Cookie:
|
271
|
+
- request_method=GET; path=/
|
272
|
+
X-Request-Id:
|
273
|
+
- b48bcf48-ecac-403a-b937-d82139775fcc
|
274
|
+
X-Runtime:
|
275
|
+
- '0.007596'
|
276
|
+
Connection:
|
277
|
+
- close
|
278
|
+
Server:
|
279
|
+
- thin 1.6.2 codename Doc Brown
|
280
|
+
body:
|
281
|
+
encoding: UTF-8
|
282
|
+
string: '{"error":"Couldn''t find Coll with id=7c7afee8-c8be-43bf-8096-c03672aaf114"}'
|
283
|
+
http_version:
|
284
|
+
recorded_at: Sun, 02 Oct 2016 00:50:59 GMT
|
285
|
+
recorded_with: VCR 2.9.3
|