purdie 0.0.9 → 0.0.10
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.travis.yml +8 -6
- data/README.md +38 -22
- data/_config/defaults.yaml +10 -0
- data/_data/flickr.yaml +4 -0
- data/_data/soundcloud.yaml +7 -0
- data/features/flickr-album.feature +23 -0
- data/features/flickr-different-size.feature +28 -0
- data/features/soundcloud-set.feature +41 -0
- data/features/soundcloud.feature +0 -1
- data/features/support/fixtures/vcr/A_URL_we_don_t_understand/Handle_a_URL_we_don_t_recognise.yml +16 -16
- data/features/support/fixtures/vcr/First_contact_with_the_Real_World/Generate_YAML_for_the_Raw_Funk_Maharishi.yml +191 -276
- data/features/support/fixtures/vcr/Flickr/Generate_Flickr_YAML.yml +16 -16
- data/features/support/fixtures/vcr/Flickr_album/Generate_Flickr_YAML_for_an_album.yml +1035 -0
- data/features/support/fixtures/vcr/Handle_comments/Handle_comments_in_a_source_file.yml +75 -206
- data/features/support/fixtures/vcr/Purdie/Generate_several_YAML.yml +177 -213
- data/features/support/fixtures/vcr/Select_a_file_to_process/Choose_file_to_process.yml +56 -188
- data/features/support/fixtures/vcr/Set_Flickr_picturesize/Generate_Flickr_YAML.yml +125 -0
- data/features/support/fixtures/vcr/Soundcloud/Generate_SoundCloud_YAML.yml +56 -188
- data/features/support/fixtures/vcr/Soundcloud/Generate_SoundCloud_YAML_for_multiple_tracks.yml +140 -181
- data/features/support/fixtures/vcr/Soundcloud_set/Generate_YAML_for_a_SoundCloud_set.yml +436 -0
- data/features/support/fixtures/vcr/Vimeo/Generate_Vimeo_YAML.yml +23 -11
- data/features/support/fixtures/vcr/YouTube/Generate_YouTube_YAML.yml +970 -0
- data/features/support/vcr.rb +7 -5
- data/features/youtube.feature +20 -0
- data/lib/purdie/bernard.rb +35 -17
- data/lib/purdie/cli.rb +1 -1
- data/lib/purdie/helpers.rb +24 -0
- data/lib/purdie/ingester.rb +25 -10
- data/lib/purdie/services/flickr.rb +48 -5
- data/lib/purdie/services/soundcloud.rb +13 -21
- data/lib/purdie/services/vimeo.rb +4 -3
- data/lib/purdie/services/youtube.rb +64 -0
- data/lib/purdie/source_list.rb +46 -0
- data/lib/purdie/version.rb +1 -1
- data/lib/purdie.rb +4 -21
- data/list +1 -0
- data/purdie.gemspec +3 -1
- data/spec/helpers_spec.rb +31 -0
- data/spec/purdie_spec.rb +0 -24
- data/spec/services/flickr_spec.rb +33 -1
- data/spec/services/soundcloud_spec.rb +10 -8
- data/spec/services/youtube_spec.rb +27 -0
- data/spec/source_list_spec.rb +64 -0
- data/spec/support/fixtures/soundcloud.sounds +4 -0
- data/spec/support/fixtures/with-comments.source +3 -0
- data/spec/support/vcr_setup.rb +3 -1
- data/spec/vcr/Purdie_Services_Flickr/distills_data_for_a_regular_photo.yml +15 -15
- data/spec/vcr/Purdie_Services_Flickr/falls_back_to_the_default_photographer_name.yml +16 -16
- data/spec/vcr/Purdie_Services_Flickr/ingests_data_for_a_photo_without_a_specific_photographer_tag.yml +16 -16
- data/spec/vcr/Purdie_Services_Flickr/resolve_a_set/resolves_a_set_from_a_url.yml +518 -0
- data/spec/vcr/Purdie_Services_SoundCloud/connects_to_SoundCloud.yml +62 -67
- data/spec/vcr/Purdie_Services_SoundCloud/distills_the_data.yml +53 -183
- data/spec/vcr/Purdie_Services_SoundCloud/extracts_a_track.yml +50 -194
- data/spec/vcr/Purdie_Services_SoundCloud/ingests_a_track.yml +48 -186
- data/spec/vcr/Purdie_Services_SoundCloud/resolve_a_set/resolves_a_set_from_a_url.yml +103 -0
- data/spec/vcr/Purdie_Services_Vimeo/gets_a_video.yml +23 -11
- data/spec/vcr/Purdie_Services_Vimeo/ingests_a_video.yml +23 -11
- data/spec/vcr/Purdie_Services_YouTube/gets_a_video.yml +970 -0
- data/spec/vcr/Purdie_Services_YouTube/ingests_a_video.yml +970 -0
- data/spec/vcr/Purdie_SourceList/resolve_sets/constructs_a_list_from_a_set_URL.yml +518 -0
- data/spec/vcr/Purdie_SourceList/resolve_sets/resolves_a_Flickr_set.yml +518 -0
- data/spec/vcr/Purdie_SourceList/resolve_sets/resolves_a_SoundCloud_set.yml +103 -0
- data/spec/vcr/Purdie_SourceList/resolves_a_Flickr_set.yml +518 -0
- data/wtf.log +1 -0
- metadata +81 -14
- data/features/support/fixtures/vcr/Handle_no__sources_directory/Handle_no__sources_directory.yml +0 -346
- data/spec/vcr/Purdie_Services_SoundCloud/deals_with_a_troublesome_bawbag.yml +0 -230
- data/spec/vcr/Purdie_Services_SoundCloud/refines_the_data.yml +0 -230
- data/spec/vcr/Purdie_Services_Vimeo/distills_a_video.yml +0 -41
- data/spec/vcr/Purdie_Services_Vimeo/refines_a_video.yml +0 -41
@@ -15,8 +15,8 @@ http_interactions:
|
|
15
15
|
- FlickRaw/0.9.8
|
16
16
|
Authorization:
|
17
17
|
- OAuth realm="https://api.flickr.com/services/rest/", oauth_consumer_key="<FLICKR_API_KEY>",
|
18
|
-
oauth_nonce="
|
19
|
-
oauth_signature_method="PLAINTEXT", oauth_timestamp="
|
18
|
+
oauth_nonce="jGRDygLjXdnc51xHcey9QN4pyuIFU%2F0FLudnedV%2FfFc%3D", oauth_signature="<FLICKR_SECRET>%26",
|
19
|
+
oauth_signature_method="PLAINTEXT", oauth_timestamp="1426006403", oauth_token="",
|
20
20
|
oauth_version="1.0"
|
21
21
|
Content-Type:
|
22
22
|
- application/x-www-form-urlencoded
|
@@ -26,7 +26,7 @@ http_interactions:
|
|
26
26
|
message: OK
|
27
27
|
headers:
|
28
28
|
Date:
|
29
|
-
-
|
29
|
+
- Tue, 10 Mar 2015 16:53:23 GMT
|
30
30
|
Content-Type:
|
31
31
|
- application/json
|
32
32
|
Content-Length:
|
@@ -38,14 +38,14 @@ http_interactions:
|
|
38
38
|
Cache-Control:
|
39
39
|
- private
|
40
40
|
X-Served-By:
|
41
|
-
-
|
41
|
+
- www253.flickr.bf1.yahoo.com
|
42
42
|
Vary:
|
43
43
|
- Accept-Encoding
|
44
44
|
Age:
|
45
|
-
- '
|
45
|
+
- '0'
|
46
46
|
Via:
|
47
|
-
- http/1.1
|
48
|
-
http/1.1
|
47
|
+
- http/1.1 fts121.flickr.bf1.yahoo.com (ApacheTrafficServer/4.0.2 [cMsSf ]),
|
48
|
+
http/1.1 r08.ycpi.dea.yahoo.net (ApacheTrafficServer [cMsSf ])
|
49
49
|
Server:
|
50
50
|
- ATS
|
51
51
|
Connection:
|
@@ -55,10 +55,10 @@ http_interactions:
|
|
55
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
56
|
Funk Maharishi","location":"","iconserver":"3933","iconfarm":4,"path_alias":"rawfunkmaharishi"},"title":{"_content":"The
|
57
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":"
|
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
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
60
|
http_version:
|
61
|
-
recorded_at:
|
61
|
+
recorded_at: Tue, 10 Mar 2015 16:53:23 GMT
|
62
62
|
- request:
|
63
63
|
method: post
|
64
64
|
uri: https://api.flickr.com/services/rest/
|
@@ -74,8 +74,8 @@ http_interactions:
|
|
74
74
|
- FlickRaw/0.9.8
|
75
75
|
Authorization:
|
76
76
|
- OAuth realm="https://api.flickr.com/services/rest/", oauth_consumer_key="<FLICKR_API_KEY>",
|
77
|
-
oauth_nonce="
|
78
|
-
oauth_signature_method="PLAINTEXT", oauth_timestamp="
|
77
|
+
oauth_nonce="HvF6oBbU46ePJNtl7YXkWXE962gAZIzzD%2BO%2Bgka0b5M%3D", oauth_signature="<FLICKR_SECRET>%26",
|
78
|
+
oauth_signature_method="PLAINTEXT", oauth_timestamp="1426006403", oauth_token="",
|
79
79
|
oauth_version="1.0"
|
80
80
|
Content-Type:
|
81
81
|
- application/x-www-form-urlencoded
|
@@ -85,7 +85,7 @@ http_interactions:
|
|
85
85
|
message: OK
|
86
86
|
headers:
|
87
87
|
Date:
|
88
|
-
-
|
88
|
+
- Tue, 10 Mar 2015 16:53:23 GMT
|
89
89
|
Content-Type:
|
90
90
|
- application/json
|
91
91
|
Content-Length:
|
@@ -97,14 +97,14 @@ http_interactions:
|
|
97
97
|
Cache-Control:
|
98
98
|
- private
|
99
99
|
X-Served-By:
|
100
|
-
-
|
100
|
+
- www323.flickr.bf1.yahoo.com
|
101
101
|
Vary:
|
102
102
|
- Accept-Encoding
|
103
103
|
Age:
|
104
104
|
- '0'
|
105
105
|
Via:
|
106
|
-
- http/1.1
|
107
|
-
http/1.1
|
106
|
+
- http/1.1 fts104.flickr.bf1.yahoo.com (ApacheTrafficServer/4.0.2 [cMsSf ]),
|
107
|
+
http/1.1 r18.ycpi.dea.yahoo.net (ApacheTrafficServer [cMsSf ])
|
108
108
|
Server:
|
109
109
|
- ATS
|
110
110
|
Connection:
|
@@ -121,5 +121,5 @@ http_interactions:
|
|
121
121
|
known copyright restrictions","url":"https:\/\/www.flickr.com\/commons\/usage\/"},{"id":"8","name":"United
|
122
122
|
States Government Work","url":"http:\/\/www.usa.gov\/copyright.shtml"}]},"stat":"ok"}'
|
123
123
|
http_version:
|
124
|
-
recorded_at:
|
124
|
+
recorded_at: Tue, 10 Mar 2015 16:53:23 GMT
|
125
125
|
recorded_with: VCR 2.9.3
|