purdie 0.0.9 → 0.0.10
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 +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
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA1:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: f7c06826645ecad1b7d8a52a703ea4b654a67fd6
|
|
4
|
+
data.tar.gz: 9a254bbbd7487741fbc7c13adae35e5730f6574c
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 8ba2d9e0d257920bf1e3df1aa62bea58d1b55b36a032f79378e0a48dfc7c3e899a4e4957822990d83b88cf73f998e403dd6e25d62fff31950e65d0ef519a535c
|
|
7
|
+
data.tar.gz: 7ee9dfe27711152f798b11e91b7babeedfd70ddae964ef6f9fba63e0454d51f27ff08d6a06618cb240a3a1bd1c2aaa590248a2245b19e360fe6a39fb9aeb0cd7
|
data/.travis.yml
CHANGED
|
@@ -1,11 +1,13 @@
|
|
|
1
1
|
language: ruby
|
|
2
2
|
rvm:
|
|
3
3
|
- 2.2.0
|
|
4
|
-
- 2.1.5
|
|
5
4
|
env:
|
|
6
5
|
global:
|
|
7
|
-
- secure:
|
|
8
|
-
- secure:
|
|
9
|
-
- secure:
|
|
10
|
-
- secure:
|
|
11
|
-
- secure:
|
|
6
|
+
- secure: Pp7JaGVsZyPJPaZHgpWEibRDtpg4aWWTC9yb7SITdXTJ7AN5gZPLIyNuYfY937Ypq2JoJAI2yhJzfMPTQJ/FwF8OV1d9dUZyDv3R6aMsE41xJoL6X2bLtyh3TduULSIeiemoOEk4Y5JqOJb8JEyFMd0n+0AD+hn+HBPysIfwgHM=
|
|
7
|
+
- secure: JWJ1rHozorq1b2eC5tr0f8qejFvBbmWElTiGFFjxiOMXBwTBGbqTwSUhwyj0oNCfNcSvHRLXbUtDHLch+v7G/xHKzC91xBqpzCVoQSpKdC2f8/coJTDqQ2NOeatTY470lkOky5gGm/+i+ezL+fhqMPMMijZDtsNw4SOIiIRqdow=
|
|
8
|
+
- secure: HX5HFOrjK9Gn4diyOyzFpAgZimtyHQcJbDqBw6EbuuOjHcJd+9a/2VE+PA81tNyB16MSpCdpLL97/jagY59XnncbNkfp92rxSugbENZz0QLGNrpkyC7lAoBOS8EUAjKVJVYosEi5kPhdZ92Kyv8yoOsGWVGIIJjGglt02mGbpkc=
|
|
9
|
+
- secure: P3ZD1DF4uLw/1AmqFPhg6zsI747GI4KLAKFRAsRRBooPoNxTvgoSaF/5P+B9CeulOIyTYYWnDzAzJaW99vYHUy72kAp0cUc+zYcan+F+GO0Iezq1ui/A/iqDBYnd7vJNMYlMgLk8kwkpQNwBWqoeIFDB/WtdSR2h3wpWexBExeg=
|
|
10
|
+
- secure: OKDTP/CnnP/Y4A645kwwXP2kVlg4htfiCN6s9+bGhz9DBukwW5/zS9qv/rAntxLWO5pRubZlhIWA68oyNSxayLOizgpN8f5IsGUjsx8OXRuXxQrb6wpPk3K78LPc6bJYMqkA5COGb4FcfPBEiD05ECcb9X6PgkbMk7bQLY61Zjo=
|
|
11
|
+
- secure: AeXUYDzqttkNCkemmsAn3NkYUMwcLX7h5QNvYQ5UNrPkDTEkW/TGrgAfgErSmMRCiQas+jqRm4CJOGA917gPZrkbdxHf4MwF7vvACQPMmwFLhW7ZVERrRjV/jJNMVsMKb4Jr1SuhfCgrNWKOvowKGRM0ulqbkda/sgM0QtH/Iow=
|
|
12
|
+
- secure: jIVGrSlocGRVRXfiI1tnsa6bMWkQA2Cev5R7+W5nIiPmO9piH6YBFKxvbpeebvSDpvB7wVzrAM3JUeCaYXXF7hiDT7NAYiU8+v6FB20bvyFM9cDxtYB+SJRTwsF2Mq8212bMg47hdubnSFL0g9IC/nLtxq9tJjGycbMaAMZRKC4=
|
|
13
|
+
- secure: aKZ3c8pttF/tDAbQ+zfrflDRPF7I6lTLV8rHm4NwNh1cEgOv8v45HiBWIl5IplaNXonUcfhrvrmi11m9KhWtKiCiA7Z1BHJJu9eP+QhedJtGvxbmnDQ1UOXAY2Ot9Y1b0wRa2YqsYIZOUg42erVsHcWiPXWpfCQ+27dqglP59k8=
|
data/README.md
CHANGED
|
@@ -24,70 +24,86 @@ Am I going to regret these decisions? Almost certainly.
|
|
|
24
24
|
|
|
25
25
|
##Using it
|
|
26
26
|
|
|
27
|
+
###Installation
|
|
28
|
+
|
|
29
|
+
gem install purdie
|
|
30
|
+
|
|
31
|
+
or
|
|
32
|
+
|
|
33
|
+
git clone https://github.com/rawfunkmaharishi/purdie/
|
|
34
|
+
cd purdie
|
|
35
|
+
bundle
|
|
36
|
+
rake
|
|
37
|
+
rake install
|
|
38
|
+
|
|
39
|
+
###Configuration
|
|
40
|
+
|
|
27
41
|
You need to create a *_sources* directory in your Jekyll project, containing files with one-URL-per-line, like this:
|
|
28
42
|
|
|
29
43
|
https://soundcloud.com/rawfunkmaharishi/hexaflexagon-1
|
|
30
44
|
https://soundcloud.com/rawfunkmaharishi/junalbandi-3
|
|
31
45
|
|
|
32
46
|
(you can alternatively specify a source file on the command line with the `-f` flag).
|
|
33
|
-
|
|
34
|
-
You also need a *.env* file with API
|
|
47
|
+
|
|
48
|
+
You also need a *.env* file with API keys in it:
|
|
35
49
|
|
|
36
50
|
FLICKR_API_KEY: this_a_key
|
|
37
51
|
FLICKR_SECRET: this_a_secret
|
|
38
52
|
|
|
39
|
-
SOUNDCLOUD_CLIENT_ID:
|
|
53
|
+
SOUNDCLOUD_CLIENT_ID: this_a_client_id
|
|
40
54
|
SOUNDCLOUD_USER_ID: this_a_user_id
|
|
41
55
|
|
|
42
|
-
VIMEO_BEARER_TOKEN:
|
|
43
|
-
|
|
56
|
+
VIMEO_BEARER_TOKEN: this_is_bearer_token
|
|
57
|
+
|
|
44
58
|
(get those keys from [Flickr](https://www.flickr.com/services/apps/create/apply), [SoundCloud](http://soundcloud.com/you/apps/new) and [Vimeo](https://developer.vimeo.com/apps/new))
|
|
45
59
|
|
|
46
60
|
And then you can run
|
|
47
61
|
|
|
48
62
|
purdie fetch
|
|
49
63
|
|
|
50
|
-
and it will dump out YAML files into *_data
|
|
64
|
+
and it will dump out YAML files into *_data*, ready for Jekyll to consume.
|
|
51
65
|
|
|
52
66
|
###Customisation
|
|
53
67
|
|
|
54
|
-
You can supply your own _config/purdie.
|
|
68
|
+
You can supply your own *_config/purdie.yaml* file to specify a few things:
|
|
55
69
|
|
|
56
70
|
# Flickr photos are happy to have a null title
|
|
57
|
-
default_title: Raw Funk Maharishi
|
|
71
|
+
default_title: Raw Funk Maharishi
|
|
58
72
|
|
|
59
73
|
# Map Flickr users to better names
|
|
60
74
|
photographer_lookups:
|
|
61
75
|
pikesley: sam
|
|
62
|
-
|
|
76
|
+
|
|
63
77
|
# Specify output files per-service
|
|
64
78
|
services:
|
|
65
79
|
Flickr:
|
|
66
80
|
output_file: "_outfiles/photos.yaml"
|
|
67
|
-
|
|
81
|
+
|
|
68
82
|
(see [this](https://github.com/rawfunkmaharishi/purdie/blob/master/_config/defaults.yaml) for some other things you can tweak)
|
|
69
83
|
|
|
70
|
-
|
|
84
|
+
###Caveats
|
|
85
|
+
|
|
86
|
+
Tread carefully for now, because my metadata hacks aren't fully documented, and I may have inadvertently nailed-in some Raw Funk Maharishi-specific stuff (although I've tried hard not to).
|
|
71
87
|
|
|
72
88
|
##What next?
|
|
73
89
|
|
|
74
|
-
There's no reason I couldn't support other services -
|
|
90
|
+
There's no reason I couldn't support other services - I've now added [YouTube](https://github.com/rawfunkmaharishi/purdie/blob/master/spec/services/youtube_spec.rb) [support](https://github.com/rawfunkmaharishi/purdie/blob/master/lib/purdie/services/youtube.rb) and others should be fairly simple. There's some introspection magic at the heart of all of this which means that as long as each service is represented by a class that:
|
|
75
91
|
|
|
76
92
|
* includes the `Purdie::Ingester` module, and
|
|
77
|
-
* sports a
|
|
78
|
-
* `@matcher` string which will pick a URL out of an input file, and an
|
|
79
|
-
* `@output_file`, and
|
|
93
|
+
* sports a `::matcher` class method which returns a string which will pick a URL out of an input file, and
|
|
80
94
|
* has a `#distill` method which takes a URL representing an item on the service and returns a hash of metadata, see e.g.
|
|
81
|
-
* [Flickr](https://github.com/rawfunkmaharishi/purdie/blob/master/lib/purdie/services/flickr.rb#
|
|
82
|
-
* [SoundCloud](https://github.com/rawfunkmaharishi/purdie/blob/master/lib/purdie/services/soundcloud.rb#
|
|
83
|
-
* [Vimeo](https://github.com/rawfunkmaharishi/purdie/blob/master/lib/purdie/services/vimeo.rb#
|
|
95
|
+
* [Flickr](https://github.com/rawfunkmaharishi/purdie/blob/master/lib/purdie/services/flickr.rb#L27)
|
|
96
|
+
* [SoundCloud](https://github.com/rawfunkmaharishi/purdie/blob/master/lib/purdie/services/soundcloud.rb#L31)
|
|
97
|
+
* [Vimeo](https://github.com/rawfunkmaharishi/purdie/blob/master/lib/purdie/services/vimeo.rb#L28)
|
|
84
98
|
|
|
85
99
|
then this should all Just Work. There's definitely a blog post in this, because Ruby introspection and metaprogramming is just mind-bogglingly powerful (and dangerous).
|
|
86
100
|
|
|
87
101
|
More prosaically, I think it will be fairly simple to support Flickr sets and SoundCloud albums as input data.
|
|
88
|
-
|
|
89
|
-
And I can definitely rationalise these [horrible license lookups](https://github.com/rawfunkmaharishi/purdie/blob/master/_config/defaults.yaml#L5
|
|
90
|
-
|
|
102
|
+
|
|
103
|
+
And I can definitely rationalise these [horrible license lookups](https://github.com/rawfunkmaharishi/purdie/blob/master/_config/defaults.yaml#L5) into a module or even a gem of their own.
|
|
104
|
+
|
|
105
|
+
And of course, known issues are [here](https://github.com/rawfunkmaharishi/purdie/issues).
|
|
106
|
+
|
|
91
107
|
##Why Purdie?
|
|
92
108
|
|
|
93
|
-
Because Bernard Purdie is [even more amazing
|
|
109
|
+
Because Bernard Purdie is [even more amazing than Ruby introspection](https://www.youtube.com/watch?v=E9E0WxLbqVA&list=PLuPLM2FI60-OIgFTc9YCrGgH5XWGT6znV&index=6).
|
data/_config/defaults.yaml
CHANGED
|
@@ -4,11 +4,21 @@ default_title: Bernard Purdie, the World's most-recorded drummer
|
|
|
4
4
|
|
|
5
5
|
# those unwieldy lookups are because each service calls the CC licenses by a slightly different name and defaults to a different version of the license. I think I need to abstract all of this out into a modlue or even a gem of its own
|
|
6
6
|
license_lookups:
|
|
7
|
+
|
|
8
|
+
# SoundCloud
|
|
7
9
|
cc-by-nc-sa:
|
|
8
10
|
short_name: BY-NC-SA
|
|
9
11
|
full_name: Attribution-NonCommercial-ShareAlike
|
|
10
12
|
url: http://creativecommons.org/licenses/by-nc-sa/4.0/
|
|
13
|
+
|
|
14
|
+
# Vimeo
|
|
11
15
|
by-nc-sa:
|
|
12
16
|
short_name: BY-NC-SA
|
|
13
17
|
full_name: Attribution-NonCommercial-ShareAlike
|
|
14
18
|
url: http://creativecommons.org/licenses/by-nc-sa/3.0/
|
|
19
|
+
|
|
20
|
+
# This one is YouTube. WTF YouTube?
|
|
21
|
+
creativeCommon:
|
|
22
|
+
short_name: BY
|
|
23
|
+
full_name: Attribution
|
|
24
|
+
url: https://creativecommons.org/licenses/by/3.0/
|
data/_data/flickr.yaml
ADDED
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
@vcr
|
|
2
|
+
Feature: Flickr album
|
|
3
|
+
|
|
4
|
+
Scenario: Generate Flickr YAML for an album
|
|
5
|
+
Given a file named "_sources/flickr.csv" with:
|
|
6
|
+
"""
|
|
7
|
+
https://www.flickr.com/photos/pikesley/sets/72157649827363868/
|
|
8
|
+
"""
|
|
9
|
+
When I successfully run `purdie fetch`
|
|
10
|
+
Then a file named "_data/flickr.yaml" should exist
|
|
11
|
+
And the file "_data/flickr.yaml" should contain:
|
|
12
|
+
"""
|
|
13
|
+
---
|
|
14
|
+
- title: First planting of the year
|
|
15
|
+
date: '2015-01-11'
|
|
16
|
+
photo_page: https://www.flickr.com/photos/pikesley/16252009191/
|
|
17
|
+
photo_url: https://farm8.staticflickr.com/7506/16252009191_ea2d06e6bb_m.jpg
|
|
18
|
+
license: Attribution-NonCommercial-ShareAlike
|
|
19
|
+
license_url: https://creativecommons.org/licenses/by-nc-sa/2.0/
|
|
20
|
+
photographer: pikesley
|
|
21
|
+
"""
|
|
22
|
+
And a file named "_data/soundcloud.yaml" should not exist
|
|
23
|
+
And a file named "_data/vimeo.yaml" should not exist
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
@vcr
|
|
2
|
+
Feature: Set Flickr picturesize
|
|
3
|
+
|
|
4
|
+
Scenario: Generate Flickr YAML
|
|
5
|
+
Given a file named "_sources/flickr.csv" with:
|
|
6
|
+
"""
|
|
7
|
+
https://www.flickr.com/photos/rawfunkmaharishi/15631479625/
|
|
8
|
+
"""
|
|
9
|
+
And a file named "_config/purdie.yaml" with:
|
|
10
|
+
"""
|
|
11
|
+
services:
|
|
12
|
+
Flickr:
|
|
13
|
+
size: 700
|
|
14
|
+
"""
|
|
15
|
+
When I successfully run `purdie fetch`
|
|
16
|
+
Then a file named "_data/flickr.yaml" should exist
|
|
17
|
+
And the file "_data/flickr.yaml" should contain:
|
|
18
|
+
"""
|
|
19
|
+
- title: The Comedy, October 2014
|
|
20
|
+
date: '2014-10-22'
|
|
21
|
+
photo_page: https://www.flickr.com/photos/rawfunkmaharishi/15631479625/
|
|
22
|
+
photo_url: https://farm4.staticflickr.com/3933/15631479625_b6168ee903_c.jpg
|
|
23
|
+
license: Attribution-NonCommercial-ShareAlike
|
|
24
|
+
license_url: https://creativecommons.org/licenses/by-nc-sa/2.0/
|
|
25
|
+
photographer: kim
|
|
26
|
+
"""
|
|
27
|
+
And a file named "_data/soundcloud.yaml" should not exist
|
|
28
|
+
And a file named "_data/vimeo.yaml" should not exist
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
@vcr
|
|
2
|
+
Feature: Soundcloud set
|
|
3
|
+
|
|
4
|
+
Scenario: Generate YAML for a SoundCloud set
|
|
5
|
+
Given a file named "_sources/soundcloud-set.csv" with:
|
|
6
|
+
"""
|
|
7
|
+
https://soundcloud.com/rawfunkmaharishi/sets/islington-academy-sessions
|
|
8
|
+
"""
|
|
9
|
+
When I successfully run `purdie fetch`
|
|
10
|
+
Then a file named "_data/soundcloud.yaml" should exist
|
|
11
|
+
And the file "_data/soundcloud.yaml" should contain:
|
|
12
|
+
"""
|
|
13
|
+
---
|
|
14
|
+
- title: Hexaflexagon
|
|
15
|
+
id: 193008299
|
|
16
|
+
location: Islington Academy
|
|
17
|
+
date: '2015-02-18'
|
|
18
|
+
license: Attribution-NonCommercial-ShareAlike
|
|
19
|
+
license_url: http://creativecommons.org/licenses/by-nc-sa/4.0/
|
|
20
|
+
- title: Beer, Of Course, But Why
|
|
21
|
+
id: 193006525
|
|
22
|
+
location: Islington Academy
|
|
23
|
+
date: '2015-02-18'
|
|
24
|
+
license: Attribution-NonCommercial-ShareAlike
|
|
25
|
+
license_url: http://creativecommons.org/licenses/by-nc-sa/4.0/
|
|
26
|
+
- title: Junalbandi
|
|
27
|
+
id: 193005357
|
|
28
|
+
location: Islington Academy
|
|
29
|
+
date: '2015-02-18'
|
|
30
|
+
license: Attribution-NonCommercial-ShareAlike
|
|
31
|
+
license_url: http://creativecommons.org/licenses/by-nc-sa/4.0/
|
|
32
|
+
- title: Bernard
|
|
33
|
+
id: 192841052
|
|
34
|
+
location: Islington Academy
|
|
35
|
+
date: '2015-02-18'
|
|
36
|
+
license: Attribution-NonCommercial-ShareAlike
|
|
37
|
+
license_url: http://creativecommons.org/licenses/by-nc-sa/4.0/
|
|
38
|
+
"""
|
|
39
|
+
And a file named "_data/flickr.yaml" should not exist
|
|
40
|
+
And a file named "_data/youtube.yaml" should not exist
|
|
41
|
+
And a file named "_data/vimeo.yaml" should not exist
|
data/features/soundcloud.feature
CHANGED
data/features/support/fixtures/vcr/A_URL_we_don_t_understand/Handle_a_URL_we_don_t_recognise.yml
CHANGED
|
@@ -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="BhHMbdRV8L2SQzpYSRL%2FWCxnjGwaREmYEq3r26OG2rE%3D", oauth_signature="<FLICKR_SECRET>%26",
|
|
19
|
+
oauth_signature_method="PLAINTEXT", oauth_timestamp="1426006401", 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:22 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
|
+
- www55.flickr.bf1.yahoo.com
|
|
42
42
|
Vary:
|
|
43
43
|
- Accept-Encoding
|
|
44
44
|
Age:
|
|
45
|
-
- '
|
|
45
|
+
- '2'
|
|
46
46
|
Via:
|
|
47
|
-
- http/1.1
|
|
48
|
-
http/1.1
|
|
47
|
+
- http/1.1 fts110.flickr.bf1.yahoo.com (ApacheTrafficServer/4.0.2 [cMsSf ]),
|
|
48
|
+
http/1.1 r12.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:22 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="092C0sA5RStztAm86VzUC4lS07gEfaNnCTwQz1TAY3Y%3D", oauth_signature="<FLICKR_SECRET>%26",
|
|
78
|
+
oauth_signature_method="PLAINTEXT", oauth_timestamp="1426006402", 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:22 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
|
+
- www48.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 fts125.flickr.bf1.yahoo.com (ApacheTrafficServer/4.0.2 [cMsSf ]),
|
|
107
|
+
http/1.1 r02.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:22 GMT
|
|
125
125
|
recorded_with: VCR 2.9.3
|