purdie 0.0.4 → 0.0.5
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/_config/defaults.yaml +25 -0
- data/cruft.rb +9 -0
- data/features/comments.feature +32 -0
- data/features/flickr.feature +2 -0
- data/features/rfm.feature +69 -0
- data/features/select-file.feature +24 -0
- data/features/support/fixtures/vcr/First_contact_with_the_Real_World/Generate_YAML_for_the_Raw_Funk_Maharishi.yml +538 -0
- data/features/support/fixtures/vcr/Handle_comments/Handle_comments_in_a_source_file.yml +346 -0
- data/features/support/fixtures/vcr/Select_a_file_to_process/Choose_file_to_process.yml +224 -0
- data/features/support/fixtures/vcr/Soundcloud/Generate_SoundCloud_YAML.yml +41 -46
- data/features/support/fixtures/vcr/Soundcloud/Generate_SoundCloud_YAML_for_multiple_tracks.yml +42 -49
- data/features/support/hooks.rb +2 -2
- data/lib/purdie/bernard.rb +29 -16
- data/lib/purdie/cli.rb +4 -0
- data/lib/purdie/config.rb +3 -3
- data/lib/purdie/services/flickr.rb +1 -1
- data/lib/purdie/services/soundcloud.rb +1 -1
- data/lib/purdie/services/vimeo.rb +1 -1
- data/lib/purdie/version.rb +1 -1
- data/spec/services/flickr_spec.rb +5 -5
- data/spec/services/soundcloud_spec.rb +16 -4
- data/spec/services/vimeo_spec.rb +2 -2
- data/spec/spec_helper.rb +5 -3
- data/spec/vcr/Purdie_Services_Flickr/distills_data_for_a_photo_without_a_specific_photographer_tag.yml +123 -0
- data/spec/vcr/Purdie_Services_Flickr/distills_data_for_a_regular_photo.yml +125 -0
- data/spec/vcr/Purdie_Services_SoundCloud/deals_with_a_troublesome_bawbag.yml +230 -0
- data/spec/vcr/Purdie_Services_SoundCloud/distills_the_data.yml +222 -0
- data/spec/vcr/Purdie_Services_SoundCloud/extracts_a_track.yml +230 -0
- data/spec/vcr/Purdie_Services_SoundCloud/refines_the_data.yml +230 -0
- data/spec/vcr/Purdie_Services_Vimeo/distills_a_video.yml +41 -0
- metadata +31 -3
- /data/features/support/fixtures/{config → _config}/purdie.yaml +0 -0
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: cb654a275f2bdd4ec1639b56b9da200c275b23b8
|
4
|
+
data.tar.gz: 87a9eac82f83c0d9040881a681d47195b0dc7edc
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 8b3f745cf82ad61dbc61c0479f0d99e1a32fa39d10b8e8259b4faff2191b12d2baa1d2f02f663c23122a5da9e96d6a15be2b36150717bdd4c770d16f7651d1f9
|
7
|
+
data.tar.gz: 82050344fe0a0138aa776ca5ce2e82b7c194eab50532af8330b7de190b9c8ad5698884cedf976527ac41594a76695437f856fcb6bd2d1b2af59817693072361c
|
@@ -0,0 +1,25 @@
|
|
1
|
+
source-dir: _sources
|
2
|
+
output-dir: _data
|
3
|
+
default-title: Bernard Purdie, the World's most-recorded drummer
|
4
|
+
|
5
|
+
license-lookups:
|
6
|
+
cc-by-nc-sa:
|
7
|
+
short-name: BY-NC-SA
|
8
|
+
full-name: Attribution-NonCommercial-ShareAlike
|
9
|
+
url: http://creativecommons.org/licenses/by-nc-sa/4.0/
|
10
|
+
by-nc-sa:
|
11
|
+
short-name: BY-NC-SA
|
12
|
+
full-name: Attribution-NonCommercial-ShareAlike
|
13
|
+
url: http://creativecommons.org/licenses/by-nc-sa/3.0/
|
14
|
+
|
15
|
+
services:
|
16
|
+
SoundCloud:
|
17
|
+
host: https://api.soundcloud.com
|
18
|
+
output-file: soundcloud.yaml
|
19
|
+
|
20
|
+
Flickr:
|
21
|
+
output-file: flickr.yaml
|
22
|
+
|
23
|
+
Vimeo:
|
24
|
+
host: https://api.vimeo.com
|
25
|
+
output-file: vimeo.yaml
|
data/cruft.rb
ADDED
@@ -0,0 +1,32 @@
|
|
1
|
+
@vcr
|
2
|
+
Feature: Handle comments
|
3
|
+
|
4
|
+
Scenario: Handle comments in a source file
|
5
|
+
Given a file named "_sources/sources.source" with:
|
6
|
+
"""
|
7
|
+
https://soundcloud.com/rawfunkmaharishi/hexaflexagon-1
|
8
|
+
# This is a comment
|
9
|
+
https://www.flickr.com/photos/rawfunkmaharishi/15631479625/
|
10
|
+
"""
|
11
|
+
When I successfully run `purdie fetch`
|
12
|
+
Then a file named "_data/soundcloud.yaml" should exist
|
13
|
+
And the file "_data/soundcloud.yaml" should contain:
|
14
|
+
"""
|
15
|
+
- title: Hexaflexagon
|
16
|
+
id: 193008299
|
17
|
+
location: Islington Academy
|
18
|
+
date: '2015-02-18'
|
19
|
+
license: Attribution-NonCommercial-ShareAlike
|
20
|
+
license_url: http://creativecommons.org/licenses/by-nc-sa/4.0/
|
21
|
+
"""
|
22
|
+
And a file named "_data/flickr.yaml" should exist
|
23
|
+
And the file "_data/flickr.yaml" should contain:
|
24
|
+
"""
|
25
|
+
- title: The Comedy, October 2014
|
26
|
+
date: '2014-10-22'
|
27
|
+
photo_page: https://www.flickr.com/photos/rawfunkmaharishi/15631479625/
|
28
|
+
photo_url: https://farm4.staticflickr.com/3933/15631479625_b6168ee903_m.jpg
|
29
|
+
license: Attribution-NonCommercial-ShareAlike
|
30
|
+
license_url: https://creativecommons.org/licenses/by-nc-sa/2.0/
|
31
|
+
photographer: kim
|
32
|
+
"""
|
data/features/flickr.feature
CHANGED
@@ -0,0 +1,69 @@
|
|
1
|
+
@vcr
|
2
|
+
Feature: First contact with the Real World
|
3
|
+
|
4
|
+
Scenario: Generate YAML for the Raw Funk Maharishi
|
5
|
+
Given a file named "_sources/flickr.csv" with:
|
6
|
+
"""
|
7
|
+
https://www.flickr.com/photos/cluttercup/15950875724/
|
8
|
+
https://www.flickr.com/photos/cluttercup/16579675721/
|
9
|
+
"""
|
10
|
+
And a file named "_sources/soundcloud.csv" with:
|
11
|
+
"""
|
12
|
+
https://soundcloud.com/rawfunkmaharishi/hexaflexagon-1
|
13
|
+
https://soundcloud.com/rawfunkmaharishi/beer-of-course-but-why
|
14
|
+
"""
|
15
|
+
And a file named "_sources/vimeo.csv" with:
|
16
|
+
"""
|
17
|
+
https://vimeo.com/117102891
|
18
|
+
https://vimeo.com/110132671
|
19
|
+
"""
|
20
|
+
When I successfully run `purdie fetch`
|
21
|
+
Then a file named "_data/flickr.yaml" should exist
|
22
|
+
And the file "_data/flickr.yaml" should contain:
|
23
|
+
"""
|
24
|
+
---
|
25
|
+
- title: Raw Funk Maharishi
|
26
|
+
date: '2015-02-18'
|
27
|
+
photo_page: https://www.flickr.com/photos/cluttercup/15950875724/
|
28
|
+
photo_url: https://farm8.staticflickr.com/7398/15950875724_23d58be214_m.jpg
|
29
|
+
license: Attribution-NonCommercial
|
30
|
+
license_url: https://creativecommons.org/licenses/by-nc/2.0/
|
31
|
+
photographer: jane
|
32
|
+
- title: Raw Funk Maharishi
|
33
|
+
date: '2015-02-18'
|
34
|
+
photo_page: https://www.flickr.com/photos/cluttercup/16579675721/
|
35
|
+
photo_url: https://farm8.staticflickr.com/7418/16579675721_f765c42f99_m.jpg
|
36
|
+
license: Attribution-NonCommercial
|
37
|
+
license_url: https://creativecommons.org/licenses/by-nc/2.0/
|
38
|
+
photographer: jane
|
39
|
+
"""
|
40
|
+
And a file named "_data/soundcloud.yaml" should exist
|
41
|
+
And the file "_data/soundcloud.yaml" should contain:
|
42
|
+
"""
|
43
|
+
---
|
44
|
+
- title: Hexaflexagon
|
45
|
+
id: 193008299
|
46
|
+
location: Islington Academy
|
47
|
+
date: '2015-02-18'
|
48
|
+
license: Attribution-NonCommercial-ShareAlike
|
49
|
+
license_url: http://creativecommons.org/licenses/by-nc-sa/4.0/
|
50
|
+
- title: Beer, Of Course, But Why
|
51
|
+
id: 193006525
|
52
|
+
location: Islington Academy
|
53
|
+
date: '2015-02-18'
|
54
|
+
license: Attribution-NonCommercial-ShareAlike
|
55
|
+
license_url: http://creativecommons.org/licenses/by-nc-sa/4.0/
|
56
|
+
"""
|
57
|
+
And a file named "_data/vimeo.yaml" should exist
|
58
|
+
And the file "_data/vimeo.yaml" should contain:
|
59
|
+
"""
|
60
|
+
---
|
61
|
+
- title: Bernard
|
62
|
+
id: 117102891
|
63
|
+
license: Attribution-NonCommercial-ShareAlike
|
64
|
+
license_url: http://creativecommons.org/licenses/by-nc-sa/3.0/
|
65
|
+
- title: Discotheque Metamorphosis
|
66
|
+
id: 110132671
|
67
|
+
license: Attribution-NonCommercial-ShareAlike
|
68
|
+
license_url: http://creativecommons.org/licenses/by-nc-sa/3.0/
|
69
|
+
"""
|
@@ -0,0 +1,24 @@
|
|
1
|
+
@vcr
|
2
|
+
Feature: Select a file to process
|
3
|
+
|
4
|
+
Scenario: Choose file to process
|
5
|
+
Given a file named "_sources/soundcloud.source" with:
|
6
|
+
"""
|
7
|
+
https://soundcloud.com/rawfunkmaharishi/hexaflexagon-1
|
8
|
+
"""
|
9
|
+
And a file named "_sources/flickr.source" with:
|
10
|
+
"""
|
11
|
+
https://www.flickr.com/photos/rawfunkmaharishi/15631479625/
|
12
|
+
"""
|
13
|
+
When I successfully run `purdie fetch -f _sources/soundcloud.source`
|
14
|
+
Then a file named "_data/soundcloud.yaml" should exist
|
15
|
+
And the file "_data/soundcloud.yaml" should contain:
|
16
|
+
"""
|
17
|
+
- title: Hexaflexagon
|
18
|
+
id: 193008299
|
19
|
+
location: Islington Academy
|
20
|
+
date: '2015-02-18'
|
21
|
+
license: Attribution-NonCommercial-ShareAlike
|
22
|
+
license_url: http://creativecommons.org/licenses/by-nc-sa/4.0/
|
23
|
+
"""
|
24
|
+
And a file named "_data/flickr.yaml" should not exist
|