purdie 0.0.5 → 0.0.6
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.gitignore +1 -0
- data/cruft.rb +4 -3
- data/lib/purdie/bernard.rb +10 -38
- data/lib/purdie/ingester.rb +29 -0
- data/lib/purdie/services/flickr.rb +9 -8
- data/lib/purdie/services/soundcloud.rb +4 -1
- data/lib/purdie/services/vimeo.rb +5 -4
- data/lib/purdie/version.rb +1 -1
- data/lib/purdie.rb +14 -0
- data/purdie.gemspec +1 -0
- data/spec/purdie_spec.rb +8 -0
- data/spec/services/flickr_spec.rb +3 -2
- data/spec/services/soundcloud_spec.rb +3 -3
- data/spec/services/vimeo_spec.rb +3 -2
- data/spec/vcr/Purdie_Services_Flickr/distills_data_for_a_regular_photo.yml +13 -13
- data/spec/vcr/Purdie_Services_Flickr/falls_back_to_the_default_photographer_name.yml +16 -16
- data/spec/vcr/Purdie_Services_Flickr/{distills_data_for_a_photo_without_a_specific_photographer_tag.yml → ingests_data_for_a_photo_without_a_specific_photographer_tag.yml} +12 -12
- data/spec/vcr/Purdie_Services_SoundCloud/ingests_a_track.yml +224 -0
- data/spec/vcr/Purdie_Services_Vimeo/ingests_a_video.yml +41 -0
- metadata +22 -7
- data/spec/vcr/Purdie_Services_Flickr/refines_data_for_a_photo_without_a_specific_photographer_tag.yml +0 -123
- data/spec/vcr/Purdie_Services_Flickr/refines_data_for_a_regular_photo.yml +0 -125
@@ -1,123 +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=15950875724&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="XboHFofj%2FWNn%2FR0ZvWBUKPb0nRq7Kt%2BentdGloK3XBY%3D", oauth_signature="<FLICKR_SECRET>%26",
|
19
|
-
oauth_signature_method="PLAINTEXT", oauth_timestamp="1425290288", 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
|
-
- Mon, 02 Mar 2015 09:58:08 GMT
|
30
|
-
Content-Type:
|
31
|
-
- application/json
|
32
|
-
Content-Length:
|
33
|
-
- '543'
|
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
|
-
- www43.flickr.bf1.yahoo.com
|
42
|
-
Vary:
|
43
|
-
- Accept-Encoding
|
44
|
-
Age:
|
45
|
-
- '0'
|
46
|
-
Via:
|
47
|
-
- http/1.1 fts109.flickr.bf1.yahoo.com (ApacheTrafficServer/4.0.2 [cMsSf ]),
|
48
|
-
http/1.1 r18.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":"15950875724","secret":"23d58be214","server":"7398","farm":8,"dateuploaded":"1424289792","isfavorite":0,"license":"2","safety_level":"0","rotation":0,"originalsecret":"24a89b0cfe","originalformat":"jpg","owner":{"nsid":"54115632@N00","username":"cluttercup","realname":"Jane
|
56
|
-
Dickson","location":"London, UK","iconserver":"7338","iconfarm":8,"path_alias":"cluttercup"},"title":{"_content":""},"description":{"_content":""},"visibility":{"ispublic":1,"isfriend":0,"isfamily":0},"dates":{"posted":"1424289792","taken":"2015-02-18
|
57
|
-
16:56:20","takengranularity":"0","takenunknown":"0","lastupdate":"1424289832"},"views":"37","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":[]},"urls":{"url":[{"type":"photopage","_content":"https:\/\/www.flickr.com\/photos\/cluttercup\/15950875724\/"}]},"media":"photo"},"stat":"ok"}'
|
58
|
-
http_version:
|
59
|
-
recorded_at: Mon, 02 Mar 2015 09:58:08 GMT
|
60
|
-
- request:
|
61
|
-
method: post
|
62
|
-
uri: https://api.flickr.com/services/rest/
|
63
|
-
body:
|
64
|
-
encoding: US-ASCII
|
65
|
-
string: method=flickr.photos.licenses.getInfo&format=json&nojsoncallback=1
|
66
|
-
headers:
|
67
|
-
Accept-Encoding:
|
68
|
-
- gzip;q=1.0,deflate;q=0.6,identity;q=0.3
|
69
|
-
Accept:
|
70
|
-
- "*/*"
|
71
|
-
User-Agent:
|
72
|
-
- FlickRaw/0.9.8
|
73
|
-
Authorization:
|
74
|
-
- OAuth realm="https://api.flickr.com/services/rest/", oauth_consumer_key="<FLICKR_API_KEY>",
|
75
|
-
oauth_nonce="66UyhqjjjhtG%2FbEKieinacvaJHwlT2wHR3m%2BHolGyno%3D", oauth_signature="<FLICKR_SECRET>%26",
|
76
|
-
oauth_signature_method="PLAINTEXT", oauth_timestamp="1425290288", oauth_token="",
|
77
|
-
oauth_version="1.0"
|
78
|
-
Content-Type:
|
79
|
-
- application/x-www-form-urlencoded
|
80
|
-
response:
|
81
|
-
status:
|
82
|
-
code: 200
|
83
|
-
message: OK
|
84
|
-
headers:
|
85
|
-
Date:
|
86
|
-
- Mon, 02 Mar 2015 09:58:09 GMT
|
87
|
-
Content-Type:
|
88
|
-
- application/json
|
89
|
-
Content-Length:
|
90
|
-
- '314'
|
91
|
-
P3p:
|
92
|
-
- policyref="http://info.yahoo.com/w3c/p3p.xml", CP="CAO DSP COR CUR ADM DEV
|
93
|
-
TAI PSA PSD IVAi IVDi CONi TELo OTPi OUR DELi SAMi OTRi UNRi PUBi IND PHY
|
94
|
-
ONL UNI PUR FIN COM NAV INT DEM CNT STA POL HEA PRE LOC GOV"
|
95
|
-
Cache-Control:
|
96
|
-
- private
|
97
|
-
X-Served-By:
|
98
|
-
- www290.flickr.bf1.yahoo.com
|
99
|
-
Vary:
|
100
|
-
- Accept-Encoding
|
101
|
-
Age:
|
102
|
-
- '2'
|
103
|
-
Via:
|
104
|
-
- http/1.1 fts121.flickr.bf1.yahoo.com (ApacheTrafficServer/4.0.2 [cMsSf ]),
|
105
|
-
http/1.1 r10.ycpi.dea.yahoo.net (ApacheTrafficServer [cMsSf ])
|
106
|
-
Server:
|
107
|
-
- ATS
|
108
|
-
Connection:
|
109
|
-
- keep-alive
|
110
|
-
body:
|
111
|
-
encoding: ASCII-8BIT
|
112
|
-
string: '{"licenses":{"license":[{"id":"0","name":"All Rights Reserved","url":""},{"id":"4","name":"Attribution
|
113
|
-
License","url":"https:\/\/creativecommons.org\/licenses\/by\/2.0\/"},{"id":"6","name":"Attribution-NoDerivs
|
114
|
-
License","url":"https:\/\/creativecommons.org\/licenses\/by-nd\/2.0\/"},{"id":"3","name":"Attribution-NonCommercial-NoDerivs
|
115
|
-
License","url":"https:\/\/creativecommons.org\/licenses\/by-nc-nd\/2.0\/"},{"id":"2","name":"Attribution-NonCommercial
|
116
|
-
License","url":"https:\/\/creativecommons.org\/licenses\/by-nc\/2.0\/"},{"id":"1","name":"Attribution-NonCommercial-ShareAlike
|
117
|
-
License","url":"https:\/\/creativecommons.org\/licenses\/by-nc-sa\/2.0\/"},{"id":"5","name":"Attribution-ShareAlike
|
118
|
-
License","url":"https:\/\/creativecommons.org\/licenses\/by-sa\/2.0\/"},{"id":"7","name":"No
|
119
|
-
known copyright restrictions","url":"https:\/\/www.flickr.com\/commons\/usage\/"},{"id":"8","name":"United
|
120
|
-
States Government Work","url":"http:\/\/www.usa.gov\/copyright.shtml"}]},"stat":"ok"}'
|
121
|
-
http_version:
|
122
|
-
recorded_at: Mon, 02 Mar 2015 09:58:09 GMT
|
123
|
-
recorded_with: VCR 2.9.3
|
@@ -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="mpd%2Fmo8bVVoGeGsq9ZzlC5VBarCGfDw%2FpxzmC5W92SA%3D", oauth_signature="<FLICKR_SECRET>%26",
|
19
|
-
oauth_signature_method="PLAINTEXT", oauth_timestamp="1425290287", 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
|
-
- Mon, 02 Mar 2015 09:58:08 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
|
-
- www13.flickr.bf1.yahoo.com
|
42
|
-
Vary:
|
43
|
-
- Accept-Encoding
|
44
|
-
Age:
|
45
|
-
- '1'
|
46
|
-
Via:
|
47
|
-
- http/1.1 fts113.flickr.bf1.yahoo.com (ApacheTrafficServer/4.0.2 [cMsSf ]),
|
48
|
-
http/1.1 r03.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":"92","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: Mon, 02 Mar 2015 09:58:08 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="YsGosyDRjrMwLD4aK3bZ6CkhzAkvkJGICXOsA5zB2z0%3D", oauth_signature="<FLICKR_SECRET>%26",
|
78
|
-
oauth_signature_method="PLAINTEXT", oauth_timestamp="1425290288", 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
|
-
- Mon, 02 Mar 2015 09:58:08 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
|
-
- www250.flickr.bf1.yahoo.com
|
101
|
-
Vary:
|
102
|
-
- Accept-Encoding
|
103
|
-
Age:
|
104
|
-
- '0'
|
105
|
-
Via:
|
106
|
-
- http/1.1 fts123.flickr.bf1.yahoo.com (ApacheTrafficServer/4.0.2 [cMsSf ]),
|
107
|
-
http/1.1 r12.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: Mon, 02 Mar 2015 09:58:08 GMT
|
125
|
-
recorded_with: VCR 2.9.3
|