purdie 0.0.9 → 0.0.10

Sign up to get free protection for your applications and to get access to all the features.
Files changed (71) hide show
  1. checksums.yaml +4 -4
  2. data/.travis.yml +8 -6
  3. data/README.md +38 -22
  4. data/_config/defaults.yaml +10 -0
  5. data/_data/flickr.yaml +4 -0
  6. data/_data/soundcloud.yaml +7 -0
  7. data/features/flickr-album.feature +23 -0
  8. data/features/flickr-different-size.feature +28 -0
  9. data/features/soundcloud-set.feature +41 -0
  10. data/features/soundcloud.feature +0 -1
  11. data/features/support/fixtures/vcr/A_URL_we_don_t_understand/Handle_a_URL_we_don_t_recognise.yml +16 -16
  12. data/features/support/fixtures/vcr/First_contact_with_the_Real_World/Generate_YAML_for_the_Raw_Funk_Maharishi.yml +191 -276
  13. data/features/support/fixtures/vcr/Flickr/Generate_Flickr_YAML.yml +16 -16
  14. data/features/support/fixtures/vcr/Flickr_album/Generate_Flickr_YAML_for_an_album.yml +1035 -0
  15. data/features/support/fixtures/vcr/Handle_comments/Handle_comments_in_a_source_file.yml +75 -206
  16. data/features/support/fixtures/vcr/Purdie/Generate_several_YAML.yml +177 -213
  17. data/features/support/fixtures/vcr/Select_a_file_to_process/Choose_file_to_process.yml +56 -188
  18. data/features/support/fixtures/vcr/Set_Flickr_picturesize/Generate_Flickr_YAML.yml +125 -0
  19. data/features/support/fixtures/vcr/Soundcloud/Generate_SoundCloud_YAML.yml +56 -188
  20. data/features/support/fixtures/vcr/Soundcloud/Generate_SoundCloud_YAML_for_multiple_tracks.yml +140 -181
  21. data/features/support/fixtures/vcr/Soundcloud_set/Generate_YAML_for_a_SoundCloud_set.yml +436 -0
  22. data/features/support/fixtures/vcr/Vimeo/Generate_Vimeo_YAML.yml +23 -11
  23. data/features/support/fixtures/vcr/YouTube/Generate_YouTube_YAML.yml +970 -0
  24. data/features/support/vcr.rb +7 -5
  25. data/features/youtube.feature +20 -0
  26. data/lib/purdie/bernard.rb +35 -17
  27. data/lib/purdie/cli.rb +1 -1
  28. data/lib/purdie/helpers.rb +24 -0
  29. data/lib/purdie/ingester.rb +25 -10
  30. data/lib/purdie/services/flickr.rb +48 -5
  31. data/lib/purdie/services/soundcloud.rb +13 -21
  32. data/lib/purdie/services/vimeo.rb +4 -3
  33. data/lib/purdie/services/youtube.rb +64 -0
  34. data/lib/purdie/source_list.rb +46 -0
  35. data/lib/purdie/version.rb +1 -1
  36. data/lib/purdie.rb +4 -21
  37. data/list +1 -0
  38. data/purdie.gemspec +3 -1
  39. data/spec/helpers_spec.rb +31 -0
  40. data/spec/purdie_spec.rb +0 -24
  41. data/spec/services/flickr_spec.rb +33 -1
  42. data/spec/services/soundcloud_spec.rb +10 -8
  43. data/spec/services/youtube_spec.rb +27 -0
  44. data/spec/source_list_spec.rb +64 -0
  45. data/spec/support/fixtures/soundcloud.sounds +4 -0
  46. data/spec/support/fixtures/with-comments.source +3 -0
  47. data/spec/support/vcr_setup.rb +3 -1
  48. data/spec/vcr/Purdie_Services_Flickr/distills_data_for_a_regular_photo.yml +15 -15
  49. data/spec/vcr/Purdie_Services_Flickr/falls_back_to_the_default_photographer_name.yml +16 -16
  50. data/spec/vcr/Purdie_Services_Flickr/ingests_data_for_a_photo_without_a_specific_photographer_tag.yml +16 -16
  51. data/spec/vcr/Purdie_Services_Flickr/resolve_a_set/resolves_a_set_from_a_url.yml +518 -0
  52. data/spec/vcr/Purdie_Services_SoundCloud/connects_to_SoundCloud.yml +62 -67
  53. data/spec/vcr/Purdie_Services_SoundCloud/distills_the_data.yml +53 -183
  54. data/spec/vcr/Purdie_Services_SoundCloud/extracts_a_track.yml +50 -194
  55. data/spec/vcr/Purdie_Services_SoundCloud/ingests_a_track.yml +48 -186
  56. data/spec/vcr/Purdie_Services_SoundCloud/resolve_a_set/resolves_a_set_from_a_url.yml +103 -0
  57. data/spec/vcr/Purdie_Services_Vimeo/gets_a_video.yml +23 -11
  58. data/spec/vcr/Purdie_Services_Vimeo/ingests_a_video.yml +23 -11
  59. data/spec/vcr/Purdie_Services_YouTube/gets_a_video.yml +970 -0
  60. data/spec/vcr/Purdie_Services_YouTube/ingests_a_video.yml +970 -0
  61. data/spec/vcr/Purdie_SourceList/resolve_sets/constructs_a_list_from_a_set_URL.yml +518 -0
  62. data/spec/vcr/Purdie_SourceList/resolve_sets/resolves_a_Flickr_set.yml +518 -0
  63. data/spec/vcr/Purdie_SourceList/resolve_sets/resolves_a_SoundCloud_set.yml +103 -0
  64. data/spec/vcr/Purdie_SourceList/resolves_a_Flickr_set.yml +518 -0
  65. data/wtf.log +1 -0
  66. metadata +81 -14
  67. data/features/support/fixtures/vcr/Handle_no__sources_directory/Handle_no__sources_directory.yml +0 -346
  68. data/spec/vcr/Purdie_Services_SoundCloud/deals_with_a_troublesome_bawbag.yml +0 -230
  69. data/spec/vcr/Purdie_Services_SoundCloud/refines_the_data.yml +0 -230
  70. data/spec/vcr/Purdie_Services_Vimeo/distills_a_video.yml +0 -41
  71. data/spec/vcr/Purdie_Services_Vimeo/refines_a_video.yml +0 -41
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.0.9
4
+ version: 0.0.10
5
5
  platform: ruby
6
6
  authors:
7
7
  - pikesley
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-03-04 00:00:00.000000000 Z
11
+ date: 2015-03-10 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: thor
@@ -58,14 +58,14 @@ dependencies:
58
58
  requirements:
59
59
  - - "~>"
60
60
  - !ruby/object:Gem::Version
61
- version: '1.0'
61
+ version: '2.0'
62
62
  type: :runtime
63
63
  prerelease: false
64
64
  version_requirements: !ruby/object:Gem::Requirement
65
65
  requirements:
66
66
  - - "~>"
67
67
  - !ruby/object:Gem::Version
68
- version: '1.0'
68
+ version: '2.0'
69
69
  - !ruby/object:Gem::Dependency
70
70
  name: flickraw-cached
71
71
  requirement: !ruby/object:Gem::Requirement
@@ -80,6 +80,20 @@ dependencies:
80
80
  - - '='
81
81
  - !ruby/object:Gem::Version
82
82
  version: '20120701'
83
+ - !ruby/object:Gem::Dependency
84
+ name: soundcloud
85
+ requirement: !ruby/object:Gem::Requirement
86
+ requirements:
87
+ - - ">="
88
+ - !ruby/object:Gem::Version
89
+ version: '0'
90
+ type: :runtime
91
+ prerelease: false
92
+ version_requirements: !ruby/object:Gem::Requirement
93
+ requirements:
94
+ - - ">="
95
+ - !ruby/object:Gem::Version
96
+ version: '0'
83
97
  - !ruby/object:Gem::Dependency
84
98
  name: activesupport
85
99
  requirement: !ruby/object:Gem::Requirement
@@ -94,6 +108,20 @@ dependencies:
94
108
  - - ">="
95
109
  - !ruby/object:Gem::Version
96
110
  version: '0'
111
+ - !ruby/object:Gem::Dependency
112
+ name: google-api-client
113
+ requirement: !ruby/object:Gem::Requirement
114
+ requirements:
115
+ - - ">="
116
+ - !ruby/object:Gem::Version
117
+ version: '0'
118
+ type: :runtime
119
+ prerelease: false
120
+ version_requirements: !ruby/object:Gem::Requirement
121
+ requirements:
122
+ - - ">="
123
+ - !ruby/object:Gem::Version
124
+ version: '0'
97
125
  - !ruby/object:Gem::Dependency
98
126
  name: bundler
99
127
  requirement: !ruby/object:Gem::Requirement
@@ -280,16 +308,21 @@ files:
280
308
  - README.md
281
309
  - Rakefile
282
310
  - _config/defaults.yaml
311
+ - _data/flickr.yaml
312
+ - _data/soundcloud.yaml
283
313
  - bin/purdie
284
314
  - cruft.rb
285
315
  - features/bad-url.feature
286
316
  - features/comments.feature
317
+ - features/flickr-album.feature
287
318
  - features/flickr-alternative-outfile.feature
319
+ - features/flickr-different-size.feature
288
320
  - features/flickr.feature
289
321
  - features/no-sources.feature
290
322
  - features/purdie.feature
291
323
  - features/rfm.feature
292
324
  - features/select-file.feature
325
+ - features/soundcloud-set.feature
293
326
  - features/soundcloud.feature
294
327
  - features/step_definitions/purdie_steps.rb
295
328
  - features/support/env.rb
@@ -297,46 +330,64 @@ files:
297
330
  - features/support/fixtures/vcr/A_URL_we_don_t_understand/Handle_a_URL_we_don_t_recognise.yml
298
331
  - features/support/fixtures/vcr/First_contact_with_the_Real_World/Generate_YAML_for_the_Raw_Funk_Maharishi.yml
299
332
  - features/support/fixtures/vcr/Flickr/Generate_Flickr_YAML.yml
333
+ - features/support/fixtures/vcr/Flickr_album/Generate_Flickr_YAML_for_an_album.yml
300
334
  - features/support/fixtures/vcr/Handle_comments/Handle_comments_in_a_source_file.yml
301
- - features/support/fixtures/vcr/Handle_no__sources_directory/Handle_no__sources_directory.yml
302
335
  - features/support/fixtures/vcr/Purdie/Generate_several_YAML.yml
303
336
  - features/support/fixtures/vcr/Select_a_file_to_process/Choose_file_to_process.yml
337
+ - features/support/fixtures/vcr/Set_Flickr_picturesize/Generate_Flickr_YAML.yml
304
338
  - features/support/fixtures/vcr/Soundcloud/Generate_SoundCloud_YAML.yml
305
339
  - features/support/fixtures/vcr/Soundcloud/Generate_SoundCloud_YAML_for_multiple_tracks.yml
340
+ - features/support/fixtures/vcr/Soundcloud_set/Generate_YAML_for_a_SoundCloud_set.yml
306
341
  - features/support/fixtures/vcr/Vimeo/Generate_Vimeo_YAML.yml
342
+ - features/support/fixtures/vcr/YouTube/Generate_YouTube_YAML.yml
307
343
  - features/support/hooks.rb
308
344
  - features/support/vcr.rb
309
345
  - features/vimeo.feature
346
+ - features/youtube.feature
310
347
  - lib/purdie.rb
311
348
  - lib/purdie/bernard.rb
312
349
  - lib/purdie/cli.rb
313
350
  - lib/purdie/config.rb
351
+ - lib/purdie/helpers.rb
314
352
  - lib/purdie/ingester.rb
315
353
  - lib/purdie/services/flickr.rb
316
354
  - lib/purdie/services/soundcloud.rb
317
355
  - lib/purdie/services/vimeo.rb
356
+ - lib/purdie/services/youtube.rb
357
+ - lib/purdie/source_list.rb
318
358
  - lib/purdie/version.rb
359
+ - list
319
360
  - purdie.gemspec
320
361
  - spec/config_spec.rb
362
+ - spec/helpers_spec.rb
321
363
  - spec/purdie_spec.rb
322
364
  - spec/services/flickr_spec.rb
323
365
  - spec/services/soundcloud_spec.rb
324
366
  - spec/services/vimeo_spec.rb
367
+ - spec/services/youtube_spec.rb
368
+ - spec/source_list_spec.rb
325
369
  - spec/spec_helper.rb
370
+ - spec/support/fixtures/soundcloud.sounds
371
+ - spec/support/fixtures/with-comments.source
326
372
  - spec/support/vcr_setup.rb
327
373
  - spec/vcr/Purdie_Services_Flickr/distills_data_for_a_regular_photo.yml
328
374
  - spec/vcr/Purdie_Services_Flickr/falls_back_to_the_default_photographer_name.yml
329
375
  - spec/vcr/Purdie_Services_Flickr/ingests_data_for_a_photo_without_a_specific_photographer_tag.yml
376
+ - spec/vcr/Purdie_Services_Flickr/resolve_a_set/resolves_a_set_from_a_url.yml
330
377
  - spec/vcr/Purdie_Services_SoundCloud/connects_to_SoundCloud.yml
331
- - spec/vcr/Purdie_Services_SoundCloud/deals_with_a_troublesome_bawbag.yml
332
378
  - spec/vcr/Purdie_Services_SoundCloud/distills_the_data.yml
333
379
  - spec/vcr/Purdie_Services_SoundCloud/extracts_a_track.yml
334
380
  - spec/vcr/Purdie_Services_SoundCloud/ingests_a_track.yml
335
- - spec/vcr/Purdie_Services_SoundCloud/refines_the_data.yml
336
- - spec/vcr/Purdie_Services_Vimeo/distills_a_video.yml
381
+ - spec/vcr/Purdie_Services_SoundCloud/resolve_a_set/resolves_a_set_from_a_url.yml
337
382
  - spec/vcr/Purdie_Services_Vimeo/gets_a_video.yml
338
383
  - spec/vcr/Purdie_Services_Vimeo/ingests_a_video.yml
339
- - spec/vcr/Purdie_Services_Vimeo/refines_a_video.yml
384
+ - spec/vcr/Purdie_Services_YouTube/gets_a_video.yml
385
+ - spec/vcr/Purdie_Services_YouTube/ingests_a_video.yml
386
+ - spec/vcr/Purdie_SourceList/resolve_sets/constructs_a_list_from_a_set_URL.yml
387
+ - spec/vcr/Purdie_SourceList/resolve_sets/resolves_a_Flickr_set.yml
388
+ - spec/vcr/Purdie_SourceList/resolve_sets/resolves_a_SoundCloud_set.yml
389
+ - spec/vcr/Purdie_SourceList/resolves_a_Flickr_set.yml
390
+ - wtf.log
340
391
  homepage: ''
341
392
  licenses:
342
393
  - MIT
@@ -365,12 +416,15 @@ summary: Capture metadata from Flickr, SoundCloud et al for when we're building
365
416
  test_files:
366
417
  - features/bad-url.feature
367
418
  - features/comments.feature
419
+ - features/flickr-album.feature
368
420
  - features/flickr-alternative-outfile.feature
421
+ - features/flickr-different-size.feature
369
422
  - features/flickr.feature
370
423
  - features/no-sources.feature
371
424
  - features/purdie.feature
372
425
  - features/rfm.feature
373
426
  - features/select-file.feature
427
+ - features/soundcloud-set.feature
374
428
  - features/soundcloud.feature
375
429
  - features/step_definitions/purdie_steps.rb
376
430
  - features/support/env.rb
@@ -378,33 +432,46 @@ test_files:
378
432
  - features/support/fixtures/vcr/A_URL_we_don_t_understand/Handle_a_URL_we_don_t_recognise.yml
379
433
  - features/support/fixtures/vcr/First_contact_with_the_Real_World/Generate_YAML_for_the_Raw_Funk_Maharishi.yml
380
434
  - features/support/fixtures/vcr/Flickr/Generate_Flickr_YAML.yml
435
+ - features/support/fixtures/vcr/Flickr_album/Generate_Flickr_YAML_for_an_album.yml
381
436
  - features/support/fixtures/vcr/Handle_comments/Handle_comments_in_a_source_file.yml
382
- - features/support/fixtures/vcr/Handle_no__sources_directory/Handle_no__sources_directory.yml
383
437
  - features/support/fixtures/vcr/Purdie/Generate_several_YAML.yml
384
438
  - features/support/fixtures/vcr/Select_a_file_to_process/Choose_file_to_process.yml
439
+ - features/support/fixtures/vcr/Set_Flickr_picturesize/Generate_Flickr_YAML.yml
385
440
  - features/support/fixtures/vcr/Soundcloud/Generate_SoundCloud_YAML.yml
386
441
  - features/support/fixtures/vcr/Soundcloud/Generate_SoundCloud_YAML_for_multiple_tracks.yml
442
+ - features/support/fixtures/vcr/Soundcloud_set/Generate_YAML_for_a_SoundCloud_set.yml
387
443
  - features/support/fixtures/vcr/Vimeo/Generate_Vimeo_YAML.yml
444
+ - features/support/fixtures/vcr/YouTube/Generate_YouTube_YAML.yml
388
445
  - features/support/hooks.rb
389
446
  - features/support/vcr.rb
390
447
  - features/vimeo.feature
448
+ - features/youtube.feature
391
449
  - spec/config_spec.rb
450
+ - spec/helpers_spec.rb
392
451
  - spec/purdie_spec.rb
393
452
  - spec/services/flickr_spec.rb
394
453
  - spec/services/soundcloud_spec.rb
395
454
  - spec/services/vimeo_spec.rb
455
+ - spec/services/youtube_spec.rb
456
+ - spec/source_list_spec.rb
396
457
  - spec/spec_helper.rb
458
+ - spec/support/fixtures/soundcloud.sounds
459
+ - spec/support/fixtures/with-comments.source
397
460
  - spec/support/vcr_setup.rb
398
461
  - spec/vcr/Purdie_Services_Flickr/distills_data_for_a_regular_photo.yml
399
462
  - spec/vcr/Purdie_Services_Flickr/falls_back_to_the_default_photographer_name.yml
400
463
  - spec/vcr/Purdie_Services_Flickr/ingests_data_for_a_photo_without_a_specific_photographer_tag.yml
464
+ - spec/vcr/Purdie_Services_Flickr/resolve_a_set/resolves_a_set_from_a_url.yml
401
465
  - spec/vcr/Purdie_Services_SoundCloud/connects_to_SoundCloud.yml
402
- - spec/vcr/Purdie_Services_SoundCloud/deals_with_a_troublesome_bawbag.yml
403
466
  - spec/vcr/Purdie_Services_SoundCloud/distills_the_data.yml
404
467
  - spec/vcr/Purdie_Services_SoundCloud/extracts_a_track.yml
405
468
  - spec/vcr/Purdie_Services_SoundCloud/ingests_a_track.yml
406
- - spec/vcr/Purdie_Services_SoundCloud/refines_the_data.yml
407
- - spec/vcr/Purdie_Services_Vimeo/distills_a_video.yml
469
+ - spec/vcr/Purdie_Services_SoundCloud/resolve_a_set/resolves_a_set_from_a_url.yml
408
470
  - spec/vcr/Purdie_Services_Vimeo/gets_a_video.yml
409
471
  - spec/vcr/Purdie_Services_Vimeo/ingests_a_video.yml
410
- - spec/vcr/Purdie_Services_Vimeo/refines_a_video.yml
472
+ - spec/vcr/Purdie_Services_YouTube/gets_a_video.yml
473
+ - spec/vcr/Purdie_Services_YouTube/ingests_a_video.yml
474
+ - spec/vcr/Purdie_SourceList/resolve_sets/constructs_a_list_from_a_set_URL.yml
475
+ - spec/vcr/Purdie_SourceList/resolve_sets/resolves_a_Flickr_set.yml
476
+ - spec/vcr/Purdie_SourceList/resolve_sets/resolves_a_SoundCloud_set.yml
477
+ - spec/vcr/Purdie_SourceList/resolves_a_Flickr_set.yml