purdie 0.1.2 → 0.1.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/features/soundcloud.feature +11 -0
- data/features/support/env.rb +3 -3
- data/lib/purdie/exceptions.rb +9 -0
- data/lib/purdie/services/soundcloud.rb +17 -8
- data/lib/purdie/version.rb +1 -1
- data/spec/purdie/services/soundcloud_spec.rb +18 -0
- data/spec/vcr/Purdie_Services_SoundCloud/handle_missing_fields/behaves_gracefully_when_there_is_no_date.yml +98 -0
- data/spec/vcr/Purdie_Services_SoundCloud/handle_missing_fields/is_fine_when_there_is_no_location.yml +98 -0
- metadata +6 -36
- data/features/support/fixtures/vcr.nope/A_URL_we_don_t_understand/Handle_a_URL_we_don_t_recognise.yml +0 -125
- data/features/support/fixtures/vcr.nope/First_contact_with_the_Real_World/Generate_YAML_for_the_Raw_Funk_Maharishi.yml +0 -536
- data/features/support/fixtures/vcr.nope/Flickr/Generate_Flickr_YAML.yml +0 -131
- data/features/support/fixtures/vcr.nope/Flickr/Generate_Flickr_YAML_with_lookups.yml +0 -129
- data/features/support/fixtures/vcr.nope/Flickr_album/Generate_Flickr_YAML_for_an_album.yml +0 -2280
- data/features/support/fixtures/vcr.nope/Handle_comments/Handle_comments_in_a_source_file.yml +0 -131
- data/features/support/fixtures/vcr.nope/Missing_or_bad_credentials/Bad_credentials_for_multiple_services.yml +0 -156
- data/features/support/fixtures/vcr.nope/Purdie/Generate_several_YAML.yml +0 -355
- data/features/support/fixtures/vcr.nope/Select_a_file_to_process/Choose_file_to_process.yml +0 -220
- data/features/support/fixtures/vcr.nope/Set_Flickr_picturesize/Generate_Flickr_YAML.yml +0 -131
- data/features/support/fixtures/vcr.nope/Soundcloud/Generate_SoundCloud_YAML.yml +0 -92
- data/features/support/fixtures/vcr.nope/Soundcloud/Generate_SoundCloud_YAML_for_multiple_tracks.yml +0 -181
- data/features/support/fixtures/vcr.nope/Soundcloud_set/Generate_YAML_for_a_SoundCloud_set.yml +0 -461
- data/features/support/fixtures/vcr.nope/Vimeo/Generate_Vimeo_YAML.yml +0 -53
- data/features/support/fixtures/vcr.nope/Vimeo_albums/Generate_YAML_for_a_Vimeo_album.yml +0 -210
- data/features/support/fixtures/vcr.nope/YouTube/Generate_YouTube_YAML.yml +0 -970
- data/features/support/fixtures/vcr.nope/YouTube_playlists/Generate_YAML_for_a_YouTube_playlist.yml +0 -9688
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 7e15de3cd46cfd4ab2bcd06c5b1195d4e9454709
|
4
|
+
data.tar.gz: 1a23b690573300661c01c229015ce0e94bdc8bd8
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 5b5ede341276bc590e6e53930234eeb110ea521cd7c9290a66413b176fc419e1ae64206a5d91f3cc08f4ab797b3f3dccbddeaaec1d24eb81b93b8593d6be91f5
|
7
|
+
data.tar.gz: 9305ebc1e5743360c025de453735620cb64c6011f8ac5ffe2ca3e023f45b92be24d360b7f548931ae842de5305c98d5497788079a4388b18e76f51ea41157cef
|
data/features/soundcloud.feature
CHANGED
@@ -44,3 +44,14 @@ Feature: Soundcloud
|
|
44
44
|
license: Attribution-NonCommercial-ShareAlike
|
45
45
|
license_url: http://creativecommons.org/licenses/by-nc-sa/4.0/
|
46
46
|
"""
|
47
|
+
|
48
|
+
# Scenario: Be cool when the track has no date metadata
|
49
|
+
# Given a file named "_sources/soundcloud.csv" with:
|
50
|
+
# """
|
51
|
+
# https://soundcloud.com/rawfunkmaharishi/nrf
|
52
|
+
# """
|
53
|
+
# When I run `purdie fetch`
|
54
|
+
# Then the stderr should contain:
|
55
|
+
# """
|
56
|
+
# 'https://soundcloud.com/rawfunkmaharishi/nrf' does not have a release date
|
57
|
+
# """
|
data/features/support/env.rb
CHANGED
@@ -1,10 +1,10 @@
|
|
1
|
+
require 'coveralls'
|
2
|
+
Coveralls.wear_merged!
|
3
|
+
|
1
4
|
ENV['RACK_ENV'] = 'test'
|
2
5
|
|
3
6
|
require 'aruba/cucumber'
|
4
7
|
require 'aruba/in_process'
|
5
8
|
require 'rspec'
|
6
9
|
|
7
|
-
require 'coveralls'
|
8
|
-
Coveralls.wear_merged!
|
9
|
-
|
10
10
|
$fixtures = File.join(File.dirname(__FILE__), 'fixtures/')
|
data/lib/purdie/exceptions.rb
CHANGED
@@ -22,17 +22,26 @@ module Purdie
|
|
22
22
|
results['title'] = track['title']
|
23
23
|
results['id'] = track['id']
|
24
24
|
results['url'] = track['permalink_url']
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
25
|
+
|
26
|
+
begin
|
27
|
+
description = YAML.load track['description']
|
28
|
+
|
29
|
+
if description.class == Hash
|
30
|
+
description.keys.each do |k|
|
31
|
+
results[k] = description[k]
|
32
|
+
end
|
33
|
+
else
|
34
|
+
results['location'] = track['description']
|
30
35
|
end
|
31
|
-
|
32
|
-
|
36
|
+
rescue TypeError => te
|
37
|
+
raise MetadataException.new self, "'#{url}' does not have a location" if te.message == "no implicit conversion of nil into String"
|
33
38
|
end
|
34
39
|
|
35
|
-
|
40
|
+
begin
|
41
|
+
results['date'] = "%4d-%02d-%02d" % [ track['release_year'], track['release_month'], track['release_day'] ]
|
42
|
+
rescue TypeError => te
|
43
|
+
raise MetadataException.new self, "'#{url}' does not have a release date" if te.message == "can't convert nil into Integer"
|
44
|
+
end
|
36
45
|
|
37
46
|
results.attach_license self, track['license']
|
38
47
|
|
data/lib/purdie/version.rb
CHANGED
@@ -49,6 +49,24 @@ license_url: http://creativecommons.org/licenses/by-nc-sa/4.0/
|
|
49
49
|
expect(set[3]).to eq 'http://soundcloud.com/rawfunkmaharishi/bernard'
|
50
50
|
end
|
51
51
|
end
|
52
|
+
|
53
|
+
context 'handle missing fields' do
|
54
|
+
it 'behaves gracefully when there is no date', :vcr do
|
55
|
+
expect { @sc.distill 'https://soundcloud.com/rawfunkmaharishi/nrf' }.to raise_exception { |exception|
|
56
|
+
expect(exception).to be_a Purdie::MetadataException
|
57
|
+
expect(exception.service.class).to eq Purdie::Services::SoundCloud
|
58
|
+
expect(exception.message).to eq ("'https://soundcloud.com/rawfunkmaharishi/nrf' does not have a release date")
|
59
|
+
}
|
60
|
+
end
|
61
|
+
|
62
|
+
it 'is fine when there is no location', :vcr do
|
63
|
+
expect { @sc.distill 'https://soundcloud.com/rawfunkmaharishi/nrf' }.to raise_exception { |exception|
|
64
|
+
expect(exception).to be_a Purdie::MetadataException
|
65
|
+
expect(exception.service.class).to eq Purdie::Services::SoundCloud
|
66
|
+
expect(exception.message).to eq ("'https://soundcloud.com/rawfunkmaharishi/nrf' does not have a location")
|
67
|
+
}
|
68
|
+
end
|
69
|
+
end
|
52
70
|
end
|
53
71
|
end
|
54
72
|
end
|
@@ -0,0 +1,98 @@
|
|
1
|
+
---
|
2
|
+
http_interactions:
|
3
|
+
- request:
|
4
|
+
method: get
|
5
|
+
uri: http://api.soundcloud.com/resolve?client_id=<SOUNDCLOUD_CLIENT_ID>&format=json&url=https://soundcloud.com/rawfunkmaharishi/nrf
|
6
|
+
body:
|
7
|
+
encoding: US-ASCII
|
8
|
+
string: ''
|
9
|
+
headers:
|
10
|
+
User-Agent:
|
11
|
+
- SoundCloud Ruby Wrapper 0.13.7
|
12
|
+
response:
|
13
|
+
status:
|
14
|
+
code: 302
|
15
|
+
message: Found
|
16
|
+
headers:
|
17
|
+
Access-Control-Allow-Headers:
|
18
|
+
- Accept, Authorization, Content-Type, Origin
|
19
|
+
Access-Control-Allow-Methods:
|
20
|
+
- GET, PUT, POST, DELETE
|
21
|
+
Access-Control-Allow-Origin:
|
22
|
+
- "*"
|
23
|
+
Access-Control-Expose-Headers:
|
24
|
+
- Date
|
25
|
+
Cache-Control:
|
26
|
+
- no-cache
|
27
|
+
Content-Type:
|
28
|
+
- application/json; charset=utf-8
|
29
|
+
Date:
|
30
|
+
- Tue, 09 Feb 2016 16:53:58 GMT
|
31
|
+
Location:
|
32
|
+
- https://api.soundcloud.com/tracks/246202062.json?client_id=<SOUNDCLOUD_CLIENT_ID>
|
33
|
+
Server:
|
34
|
+
- am/2
|
35
|
+
Status:
|
36
|
+
- 302 Found
|
37
|
+
Content-Length:
|
38
|
+
- '129'
|
39
|
+
body:
|
40
|
+
encoding: UTF-8
|
41
|
+
string: '{"status":"302 - Found","location":"https://api.soundcloud.com/tracks/246202062.json?client_id=<SOUNDCLOUD_CLIENT_ID>"}'
|
42
|
+
http_version:
|
43
|
+
recorded_at: Tue, 09 Feb 2016 16:53:58 GMT
|
44
|
+
- request:
|
45
|
+
method: get
|
46
|
+
uri: https://api.soundcloud.com/tracks/246202062.json?client_id=<SOUNDCLOUD_CLIENT_ID>
|
47
|
+
body:
|
48
|
+
encoding: US-ASCII
|
49
|
+
string: ''
|
50
|
+
headers:
|
51
|
+
User-Agent:
|
52
|
+
- SoundCloud Ruby Wrapper 0.13.7
|
53
|
+
response:
|
54
|
+
status:
|
55
|
+
code: 200
|
56
|
+
message: OK
|
57
|
+
headers:
|
58
|
+
Accept-Ranges:
|
59
|
+
- bytes
|
60
|
+
Access-Control-Allow-Headers:
|
61
|
+
- Accept, Authorization, Content-Type, Origin
|
62
|
+
Access-Control-Allow-Methods:
|
63
|
+
- GET, PUT, POST, DELETE
|
64
|
+
Access-Control-Allow-Origin:
|
65
|
+
- "*"
|
66
|
+
Access-Control-Expose-Headers:
|
67
|
+
- Date
|
68
|
+
Age:
|
69
|
+
- '281'
|
70
|
+
Cache-Control:
|
71
|
+
- max-age=600, public
|
72
|
+
Content-Type:
|
73
|
+
- application/json; charset=utf-8
|
74
|
+
Date:
|
75
|
+
- Tue, 09 Feb 2016 16:53:58 GMT
|
76
|
+
Etag:
|
77
|
+
- '"2ba30065b967f3d954cd3a5f32a53199"'
|
78
|
+
Last-Modified:
|
79
|
+
- Tue, 09 Feb 2016 16:49:17 GMT
|
80
|
+
Server:
|
81
|
+
- ECS (lhr/4745)
|
82
|
+
Status:
|
83
|
+
- 200 OK
|
84
|
+
Vary:
|
85
|
+
- Accept-Encoding
|
86
|
+
X-Cache:
|
87
|
+
- HIT
|
88
|
+
Content-Length:
|
89
|
+
- '1496'
|
90
|
+
body:
|
91
|
+
encoding: UTF-8
|
92
|
+
string: '{"kind":"track","id":246202062,"created_at":"2016/02/09 14:37:34 +0000","user_id":56479293,"duration":184701,"commentable":true,"state":"finished","original_content_size":7439637,"last_modified":"2016/02/09
|
93
|
+
16:30:39 +0000","sharing":"public","tag_list":"","permalink":"nrf","streamable":true,"embeddable_by":"all","downloadable":true,"purchase_url":null,"label_id":null,"purchase_title":null,"genre":"work
|
94
|
+
in progress","title":"NRF","description":"location: Rogue Studios\n","label_name":null,"release":null,"track_type":null,"key_signature":null,"isrc":null,"video_url":null,"bpm":null,"release_year":null,"release_month":null,"release_day":null,"original_format":"mp3","license":"cc-by-nc-sa","uri":"https://api.soundcloud.com/tracks/246202062","user":{"id":56479293,"kind":"user","permalink":"rawfunkmaharishi","username":"Raw
|
95
|
+
Funk Maharishi","last_modified":"2015/11/30 21:40:23 +0000","uri":"https://api.soundcloud.com/users/56479293","permalink_url":"http://soundcloud.com/rawfunkmaharishi","avatar_url":"https://i1.sndcdn.com/avatars-000110957821-ac80gy-large.jpg"},"permalink_url":"http://soundcloud.com/rawfunkmaharishi/nrf","artwork_url":null,"waveform_url":"https://w1.sndcdn.com/1RTdZJuRNZex_m.png","stream_url":"https://api.soundcloud.com/tracks/246202062/stream","download_url":"https://api.soundcloud.com/tracks/246202062/download","playback_count":5,"download_count":0,"favoritings_count":0,"comment_count":0,"attachments_uri":"https://api.soundcloud.com/tracks/246202062/attachments"}'
|
96
|
+
http_version:
|
97
|
+
recorded_at: Tue, 09 Feb 2016 16:53:58 GMT
|
98
|
+
recorded_with: VCR 2.9.3
|
data/spec/vcr/Purdie_Services_SoundCloud/handle_missing_fields/is_fine_when_there_is_no_location.yml
ADDED
@@ -0,0 +1,98 @@
|
|
1
|
+
---
|
2
|
+
http_interactions:
|
3
|
+
- request:
|
4
|
+
method: get
|
5
|
+
uri: http://api.soundcloud.com/resolve?client_id=<SOUNDCLOUD_CLIENT_ID>&format=json&url=https://soundcloud.com/rawfunkmaharishi/nrf
|
6
|
+
body:
|
7
|
+
encoding: US-ASCII
|
8
|
+
string: ''
|
9
|
+
headers:
|
10
|
+
User-Agent:
|
11
|
+
- SoundCloud Ruby Wrapper 0.13.7
|
12
|
+
response:
|
13
|
+
status:
|
14
|
+
code: 302
|
15
|
+
message: Found
|
16
|
+
headers:
|
17
|
+
Access-Control-Allow-Headers:
|
18
|
+
- Accept, Authorization, Content-Type, Origin
|
19
|
+
Access-Control-Allow-Methods:
|
20
|
+
- GET, PUT, POST, DELETE
|
21
|
+
Access-Control-Allow-Origin:
|
22
|
+
- "*"
|
23
|
+
Access-Control-Expose-Headers:
|
24
|
+
- Date
|
25
|
+
Cache-Control:
|
26
|
+
- no-cache
|
27
|
+
Content-Type:
|
28
|
+
- application/json; charset=utf-8
|
29
|
+
Date:
|
30
|
+
- Tue, 09 Feb 2016 17:32:27 GMT
|
31
|
+
Location:
|
32
|
+
- https://api.soundcloud.com/tracks/246202062.json?client_id=<SOUNDCLOUD_CLIENT_ID>
|
33
|
+
Server:
|
34
|
+
- am/2
|
35
|
+
Status:
|
36
|
+
- 302 Found
|
37
|
+
Content-Length:
|
38
|
+
- '129'
|
39
|
+
body:
|
40
|
+
encoding: UTF-8
|
41
|
+
string: '{"status":"302 - Found","location":"https://api.soundcloud.com/tracks/246202062.json?client_id=<SOUNDCLOUD_CLIENT_ID>"}'
|
42
|
+
http_version:
|
43
|
+
recorded_at: Tue, 09 Feb 2016 17:32:27 GMT
|
44
|
+
- request:
|
45
|
+
method: get
|
46
|
+
uri: https://api.soundcloud.com/tracks/246202062.json?client_id=<SOUNDCLOUD_CLIENT_ID>
|
47
|
+
body:
|
48
|
+
encoding: US-ASCII
|
49
|
+
string: ''
|
50
|
+
headers:
|
51
|
+
User-Agent:
|
52
|
+
- SoundCloud Ruby Wrapper 0.13.7
|
53
|
+
response:
|
54
|
+
status:
|
55
|
+
code: 200
|
56
|
+
message: OK
|
57
|
+
headers:
|
58
|
+
Accept-Ranges:
|
59
|
+
- bytes
|
60
|
+
Access-Control-Allow-Headers:
|
61
|
+
- Accept, Authorization, Content-Type, Origin
|
62
|
+
Access-Control-Allow-Methods:
|
63
|
+
- GET, PUT, POST, DELETE
|
64
|
+
Access-Control-Allow-Origin:
|
65
|
+
- "*"
|
66
|
+
Access-Control-Expose-Headers:
|
67
|
+
- Date
|
68
|
+
Age:
|
69
|
+
- '61'
|
70
|
+
Cache-Control:
|
71
|
+
- max-age=600, public
|
72
|
+
Content-Type:
|
73
|
+
- application/json; charset=utf-8
|
74
|
+
Date:
|
75
|
+
- Tue, 09 Feb 2016 17:32:27 GMT
|
76
|
+
Etag:
|
77
|
+
- '"01a0d88ce6fb396420926e507972c77e"'
|
78
|
+
Last-Modified:
|
79
|
+
- Tue, 09 Feb 2016 17:31:26 GMT
|
80
|
+
Server:
|
81
|
+
- ECS (lhr/4745)
|
82
|
+
Status:
|
83
|
+
- 200 OK
|
84
|
+
Vary:
|
85
|
+
- Accept-Encoding
|
86
|
+
X-Cache:
|
87
|
+
- HIT
|
88
|
+
Content-Length:
|
89
|
+
- '1494'
|
90
|
+
body:
|
91
|
+
encoding: UTF-8
|
92
|
+
string: '{"kind":"track","id":246202062,"created_at":"2016/02/09 14:37:34 +0000","user_id":56479293,"duration":184701,"commentable":true,"state":"finished","original_content_size":7439637,"last_modified":"2016/02/09
|
93
|
+
17:23:47 +0000","sharing":"public","tag_list":"","permalink":"nrf","streamable":true,"embeddable_by":"all","downloadable":true,"purchase_url":null,"label_id":null,"purchase_title":null,"genre":"work
|
94
|
+
in progress","title":"NRF","description":null,"label_name":null,"release":null,"track_type":null,"key_signature":null,"isrc":null,"video_url":null,"bpm":null,"release_year":2016,"release_month":1,"release_day":20,"original_format":"mp3","license":"cc-by-nc-sa","uri":"https://api.soundcloud.com/tracks/246202062","user":{"id":56479293,"kind":"user","permalink":"rawfunkmaharishi","username":"Raw
|
95
|
+
Funk Maharishi","last_modified":"2015/11/30 21:40:23 +0000","uri":"https://api.soundcloud.com/users/56479293","permalink_url":"http://soundcloud.com/rawfunkmaharishi","avatar_url":"https://i1.sndcdn.com/avatars-000110957821-ac80gy-large.jpg"},"permalink_url":"http://soundcloud.com/rawfunkmaharishi/nrf","artwork_url":null,"waveform_url":"https://w1.sndcdn.com/1RTdZJuRNZex_m.png","stream_url":"https://api.soundcloud.com/tracks/246202062/stream","download_url":"https://api.soundcloud.com/tracks/246202062/download","playback_count":5,"download_count":0,"favoritings_count":0,"comment_count":0,"attachments_uri":"https://api.soundcloud.com/tracks/246202062/attachments"}'
|
96
|
+
http_version:
|
97
|
+
recorded_at: Tue, 09 Feb 2016 17:32:27 GMT
|
98
|
+
recorded_with: VCR 2.9.3
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: purdie
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- pikesley
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-
|
11
|
+
date: 2016-02-09 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: thor
|
@@ -310,23 +310,6 @@ files:
|
|
310
310
|
- features/step_definitions/purdie_steps.rb
|
311
311
|
- features/support/env.rb
|
312
312
|
- features/support/fixtures/_config/purdie.yaml
|
313
|
-
- features/support/fixtures/vcr.nope/A_URL_we_don_t_understand/Handle_a_URL_we_don_t_recognise.yml
|
314
|
-
- features/support/fixtures/vcr.nope/First_contact_with_the_Real_World/Generate_YAML_for_the_Raw_Funk_Maharishi.yml
|
315
|
-
- features/support/fixtures/vcr.nope/Flickr/Generate_Flickr_YAML.yml
|
316
|
-
- features/support/fixtures/vcr.nope/Flickr/Generate_Flickr_YAML_with_lookups.yml
|
317
|
-
- features/support/fixtures/vcr.nope/Flickr_album/Generate_Flickr_YAML_for_an_album.yml
|
318
|
-
- features/support/fixtures/vcr.nope/Handle_comments/Handle_comments_in_a_source_file.yml
|
319
|
-
- features/support/fixtures/vcr.nope/Missing_or_bad_credentials/Bad_credentials_for_multiple_services.yml
|
320
|
-
- features/support/fixtures/vcr.nope/Purdie/Generate_several_YAML.yml
|
321
|
-
- features/support/fixtures/vcr.nope/Select_a_file_to_process/Choose_file_to_process.yml
|
322
|
-
- features/support/fixtures/vcr.nope/Set_Flickr_picturesize/Generate_Flickr_YAML.yml
|
323
|
-
- features/support/fixtures/vcr.nope/Soundcloud/Generate_SoundCloud_YAML.yml
|
324
|
-
- features/support/fixtures/vcr.nope/Soundcloud/Generate_SoundCloud_YAML_for_multiple_tracks.yml
|
325
|
-
- features/support/fixtures/vcr.nope/Soundcloud_set/Generate_YAML_for_a_SoundCloud_set.yml
|
326
|
-
- features/support/fixtures/vcr.nope/Vimeo/Generate_Vimeo_YAML.yml
|
327
|
-
- features/support/fixtures/vcr.nope/Vimeo_albums/Generate_YAML_for_a_Vimeo_album.yml
|
328
|
-
- features/support/fixtures/vcr.nope/YouTube/Generate_YouTube_YAML.yml
|
329
|
-
- features/support/fixtures/vcr.nope/YouTube_playlists/Generate_YAML_for_a_YouTube_playlist.yml
|
330
313
|
- features/support/fixtures/vcr/A_URL_we_don_t_understand/Handle_a_URL_we_don_t_recognise.yml
|
331
314
|
- features/support/fixtures/vcr/Flickr/Generate_Flickr_YAML.yml
|
332
315
|
- features/support/fixtures/vcr/Flickr/Generate_Flickr_YAML_with_lookups.yml
|
@@ -394,6 +377,8 @@ files:
|
|
394
377
|
- spec/vcr/Purdie_Services_SoundCloud/distills_richer_metadata.yml
|
395
378
|
- spec/vcr/Purdie_Services_SoundCloud/distills_the_data.yml
|
396
379
|
- spec/vcr/Purdie_Services_SoundCloud/extracts_a_track.yml
|
380
|
+
- spec/vcr/Purdie_Services_SoundCloud/handle_missing_fields/behaves_gracefully_when_there_is_no_date.yml
|
381
|
+
- spec/vcr/Purdie_Services_SoundCloud/handle_missing_fields/is_fine_when_there_is_no_location.yml
|
397
382
|
- spec/vcr/Purdie_Services_SoundCloud/ingests_a_track.yml
|
398
383
|
- spec/vcr/Purdie_Services_SoundCloud/resolve_a_set/resolves_a_set_from_a_url.yml
|
399
384
|
- spec/vcr/Purdie_Services_Vimeo/gets_a_video.yml
|
@@ -452,23 +437,6 @@ test_files:
|
|
452
437
|
- features/step_definitions/purdie_steps.rb
|
453
438
|
- features/support/env.rb
|
454
439
|
- features/support/fixtures/_config/purdie.yaml
|
455
|
-
- features/support/fixtures/vcr.nope/A_URL_we_don_t_understand/Handle_a_URL_we_don_t_recognise.yml
|
456
|
-
- features/support/fixtures/vcr.nope/First_contact_with_the_Real_World/Generate_YAML_for_the_Raw_Funk_Maharishi.yml
|
457
|
-
- features/support/fixtures/vcr.nope/Flickr/Generate_Flickr_YAML.yml
|
458
|
-
- features/support/fixtures/vcr.nope/Flickr/Generate_Flickr_YAML_with_lookups.yml
|
459
|
-
- features/support/fixtures/vcr.nope/Flickr_album/Generate_Flickr_YAML_for_an_album.yml
|
460
|
-
- features/support/fixtures/vcr.nope/Handle_comments/Handle_comments_in_a_source_file.yml
|
461
|
-
- features/support/fixtures/vcr.nope/Missing_or_bad_credentials/Bad_credentials_for_multiple_services.yml
|
462
|
-
- features/support/fixtures/vcr.nope/Purdie/Generate_several_YAML.yml
|
463
|
-
- features/support/fixtures/vcr.nope/Select_a_file_to_process/Choose_file_to_process.yml
|
464
|
-
- features/support/fixtures/vcr.nope/Set_Flickr_picturesize/Generate_Flickr_YAML.yml
|
465
|
-
- features/support/fixtures/vcr.nope/Soundcloud/Generate_SoundCloud_YAML.yml
|
466
|
-
- features/support/fixtures/vcr.nope/Soundcloud/Generate_SoundCloud_YAML_for_multiple_tracks.yml
|
467
|
-
- features/support/fixtures/vcr.nope/Soundcloud_set/Generate_YAML_for_a_SoundCloud_set.yml
|
468
|
-
- features/support/fixtures/vcr.nope/Vimeo/Generate_Vimeo_YAML.yml
|
469
|
-
- features/support/fixtures/vcr.nope/Vimeo_albums/Generate_YAML_for_a_Vimeo_album.yml
|
470
|
-
- features/support/fixtures/vcr.nope/YouTube/Generate_YouTube_YAML.yml
|
471
|
-
- features/support/fixtures/vcr.nope/YouTube_playlists/Generate_YAML_for_a_YouTube_playlist.yml
|
472
440
|
- features/support/fixtures/vcr/A_URL_we_don_t_understand/Handle_a_URL_we_don_t_recognise.yml
|
473
441
|
- features/support/fixtures/vcr/Flickr/Generate_Flickr_YAML.yml
|
474
442
|
- features/support/fixtures/vcr/Flickr/Generate_Flickr_YAML_with_lookups.yml
|
@@ -520,6 +488,8 @@ test_files:
|
|
520
488
|
- spec/vcr/Purdie_Services_SoundCloud/distills_richer_metadata.yml
|
521
489
|
- spec/vcr/Purdie_Services_SoundCloud/distills_the_data.yml
|
522
490
|
- spec/vcr/Purdie_Services_SoundCloud/extracts_a_track.yml
|
491
|
+
- spec/vcr/Purdie_Services_SoundCloud/handle_missing_fields/behaves_gracefully_when_there_is_no_date.yml
|
492
|
+
- spec/vcr/Purdie_Services_SoundCloud/handle_missing_fields/is_fine_when_there_is_no_location.yml
|
523
493
|
- spec/vcr/Purdie_Services_SoundCloud/ingests_a_track.yml
|
524
494
|
- spec/vcr/Purdie_Services_SoundCloud/resolve_a_set/resolves_a_set_from_a_url.yml
|
525
495
|
- spec/vcr/Purdie_Services_Vimeo/gets_a_video.yml
|
@@ -1,125 +0,0 @@
|
|
1
|
-
---
|
2
|
-
http_interactions:
|
3
|
-
- request:
|
4
|
-
method: post
|
5
|
-
uri: https://api.flickr.com/services/rest/
|
6
|
-
body:
|
7
|
-
encoding: US-ASCII
|
8
|
-
string: photo_id=15631479625&method=flickr.photos.getInfo&format=json&nojsoncallback=1
|
9
|
-
headers:
|
10
|
-
Accept-Encoding:
|
11
|
-
- gzip;q=1.0,deflate;q=0.6,identity;q=0.3
|
12
|
-
Accept:
|
13
|
-
- "*/*"
|
14
|
-
User-Agent:
|
15
|
-
- FlickRaw/0.9.8
|
16
|
-
Authorization:
|
17
|
-
- OAuth realm="https://api.flickr.com/services/rest/", oauth_consumer_key="<FLICKR_API_KEY>",
|
18
|
-
oauth_nonce="lStJS%2BN%2FCaUkNeTkqy96sNrrbLb4jG9KHEIFoqANl2o%3D", oauth_signature="<FLICKR_SECRET>%26",
|
19
|
-
oauth_signature_method="PLAINTEXT", oauth_timestamp="1426093984", oauth_token="",
|
20
|
-
oauth_version="1.0"
|
21
|
-
Content-Type:
|
22
|
-
- application/x-www-form-urlencoded
|
23
|
-
response:
|
24
|
-
status:
|
25
|
-
code: 200
|
26
|
-
message: OK
|
27
|
-
headers:
|
28
|
-
Date:
|
29
|
-
- Wed, 11 Mar 2015 17:13:05 GMT
|
30
|
-
Content-Type:
|
31
|
-
- application/json
|
32
|
-
Content-Length:
|
33
|
-
- '665'
|
34
|
-
P3p:
|
35
|
-
- policyref="http://info.yahoo.com/w3c/p3p.xml", CP="CAO DSP COR CUR ADM DEV
|
36
|
-
TAI PSA PSD IVAi IVDi CONi TELo OTPi OUR DELi SAMi OTRi UNRi PUBi IND PHY
|
37
|
-
ONL UNI PUR FIN COM NAV INT DEM CNT STA POL HEA PRE LOC GOV"
|
38
|
-
Cache-Control:
|
39
|
-
- private
|
40
|
-
X-Served-By:
|
41
|
-
- www58.flickr.bf1.yahoo.com
|
42
|
-
Vary:
|
43
|
-
- Accept-Encoding
|
44
|
-
Age:
|
45
|
-
- '0'
|
46
|
-
Via:
|
47
|
-
- http/1.1 fts116.flickr.bf1.yahoo.com (ApacheTrafficServer/4.0.2 [cMsSf ]),
|
48
|
-
http/1.1 r21.ycpi.dea.yahoo.net (ApacheTrafficServer [cMsSf ])
|
49
|
-
Server:
|
50
|
-
- ATS
|
51
|
-
Connection:
|
52
|
-
- keep-alive
|
53
|
-
body:
|
54
|
-
encoding: ASCII-8BIT
|
55
|
-
string: '{"photo":{"id":"15631479625","secret":"b6168ee903","server":"3933","farm":4,"dateuploaded":"1414326010","isfavorite":0,"license":"1","safety_level":"0","rotation":0,"originalsecret":"3191340cdb","originalformat":"jpg","owner":{"nsid":"128943844@N06","username":"rawfunkmaharishi","realname":"Raw
|
56
|
-
Funk Maharishi","location":"","iconserver":"3933","iconfarm":4,"path_alias":"rawfunkmaharishi"},"title":{"_content":"The
|
57
|
-
Comedy, October 2014"},"description":{"_content":""},"visibility":{"ispublic":1,"isfriend":0,"isfamily":0},"dates":{"posted":"1414326010","taken":"2014-10-22
|
58
|
-
15:54:24","takengranularity":"0","takenunknown":"0","lastupdate":"1416111853"},"views":"94","editability":{"cancomment":0,"canaddmeta":0},"publiceditability":{"cancomment":1,"canaddmeta":0},"usage":{"candownload":1,"canblog":0,"canprint":0,"canshare":1},"comments":{"_content":"0"},"notes":{"note":[]},"people":{"haspeople":0},"tags":{"tag":[{"id":"128898522-15631479625-1422028","author":"128943844@N06","authorname":"rawfunkmaharishi","raw":"the
|
59
|
-
comedy","_content":"thecomedy","machine_tag":0},{"id":"128898522-15631479625-17975","author":"128943844@N06","authorname":"rawfunkmaharishi","raw":"gigs","_content":"gigs","machine_tag":0},{"id":"128898522-15631479625-228989594","author":"128943844@N06","authorname":"rawfunkmaharishi","raw":"photographer:kim","_content":"photographerkim","machine_tag":0}]},"urls":{"url":[{"type":"photopage","_content":"https:\/\/www.flickr.com\/photos\/rawfunkmaharishi\/15631479625\/"}]},"media":"photo"},"stat":"ok"}'
|
60
|
-
http_version:
|
61
|
-
recorded_at: Wed, 11 Mar 2015 17:13:05 GMT
|
62
|
-
- request:
|
63
|
-
method: post
|
64
|
-
uri: https://api.flickr.com/services/rest/
|
65
|
-
body:
|
66
|
-
encoding: US-ASCII
|
67
|
-
string: method=flickr.photos.licenses.getInfo&format=json&nojsoncallback=1
|
68
|
-
headers:
|
69
|
-
Accept-Encoding:
|
70
|
-
- gzip;q=1.0,deflate;q=0.6,identity;q=0.3
|
71
|
-
Accept:
|
72
|
-
- "*/*"
|
73
|
-
User-Agent:
|
74
|
-
- FlickRaw/0.9.8
|
75
|
-
Authorization:
|
76
|
-
- OAuth realm="https://api.flickr.com/services/rest/", oauth_consumer_key="<FLICKR_API_KEY>",
|
77
|
-
oauth_nonce="Wys2vnSmSwlJVK6t4GZKjntby0j9A6Al%2FLvTo3sEsdw%3D", oauth_signature="<FLICKR_SECRET>%26",
|
78
|
-
oauth_signature_method="PLAINTEXT", oauth_timestamp="1426093985", oauth_token="",
|
79
|
-
oauth_version="1.0"
|
80
|
-
Content-Type:
|
81
|
-
- application/x-www-form-urlencoded
|
82
|
-
response:
|
83
|
-
status:
|
84
|
-
code: 200
|
85
|
-
message: OK
|
86
|
-
headers:
|
87
|
-
Date:
|
88
|
-
- Wed, 11 Mar 2015 17:13:05 GMT
|
89
|
-
Content-Type:
|
90
|
-
- application/json
|
91
|
-
Content-Length:
|
92
|
-
- '314'
|
93
|
-
P3p:
|
94
|
-
- policyref="http://info.yahoo.com/w3c/p3p.xml", CP="CAO DSP COR CUR ADM DEV
|
95
|
-
TAI PSA PSD IVAi IVDi CONi TELo OTPi OUR DELi SAMi OTRi UNRi PUBi IND PHY
|
96
|
-
ONL UNI PUR FIN COM NAV INT DEM CNT STA POL HEA PRE LOC GOV"
|
97
|
-
Cache-Control:
|
98
|
-
- private
|
99
|
-
X-Served-By:
|
100
|
-
- www47.flickr.bf1.yahoo.com
|
101
|
-
Vary:
|
102
|
-
- Accept-Encoding
|
103
|
-
Age:
|
104
|
-
- '0'
|
105
|
-
Via:
|
106
|
-
- http/1.1 fts122.flickr.bf1.yahoo.com (ApacheTrafficServer/4.0.2 [cMsSf ]),
|
107
|
-
http/1.1 r10.ycpi.dea.yahoo.net (ApacheTrafficServer [cMsSf ])
|
108
|
-
Server:
|
109
|
-
- ATS
|
110
|
-
Connection:
|
111
|
-
- keep-alive
|
112
|
-
body:
|
113
|
-
encoding: ASCII-8BIT
|
114
|
-
string: '{"licenses":{"license":[{"id":"0","name":"All Rights Reserved","url":""},{"id":"4","name":"Attribution
|
115
|
-
License","url":"https:\/\/creativecommons.org\/licenses\/by\/2.0\/"},{"id":"6","name":"Attribution-NoDerivs
|
116
|
-
License","url":"https:\/\/creativecommons.org\/licenses\/by-nd\/2.0\/"},{"id":"3","name":"Attribution-NonCommercial-NoDerivs
|
117
|
-
License","url":"https:\/\/creativecommons.org\/licenses\/by-nc-nd\/2.0\/"},{"id":"2","name":"Attribution-NonCommercial
|
118
|
-
License","url":"https:\/\/creativecommons.org\/licenses\/by-nc\/2.0\/"},{"id":"1","name":"Attribution-NonCommercial-ShareAlike
|
119
|
-
License","url":"https:\/\/creativecommons.org\/licenses\/by-nc-sa\/2.0\/"},{"id":"5","name":"Attribution-ShareAlike
|
120
|
-
License","url":"https:\/\/creativecommons.org\/licenses\/by-sa\/2.0\/"},{"id":"7","name":"No
|
121
|
-
known copyright restrictions","url":"https:\/\/www.flickr.com\/commons\/usage\/"},{"id":"8","name":"United
|
122
|
-
States Government Work","url":"http:\/\/www.usa.gov\/copyright.shtml"}]},"stat":"ok"}'
|
123
|
-
http_version:
|
124
|
-
recorded_at: Wed, 11 Mar 2015 17:13:05 GMT
|
125
|
-
recorded_with: VCR 2.9.3
|