nokaya 0.1.4 → 0.1.5
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/.coveralls.yml +1 -0
- data/.rspec +3 -0
- data/.travis.yml +18 -0
- data/CHANGELOG.md +5 -0
- data/README.md +22 -2
- data/Rakefile +3 -7
- data/lib/nokaya/adn.rb +2 -2
- data/lib/nokaya/app.rb +13 -2
- data/lib/nokaya/deviantart.rb +2 -2
- data/lib/nokaya/favd.rb +2 -2
- data/lib/nokaya/flickr_album.rb +2 -2
- data/lib/nokaya/imageshack_user.rb +2 -2
- data/lib/nokaya/imgur_album.rb +2 -2
- data/lib/nokaya/instagram.rb +2 -2
- data/lib/nokaya/status.rb +8 -1
- data/lib/nokaya/tvshow.rb +81 -0
- data/lib/nokaya/version.rb +1 -1
- data/nokaya.gemspec +2 -0
- data/spec/mock/adn.page +109 -0
- data/spec/mock/deviantart.page +1023 -0
- data/spec/mock/favd.page +443 -0
- data/spec/mock/flickr.page +1629 -0
- data/spec/mock/imguralbum.page +1655 -0
- data/spec/mock/instagram.page +261 -0
- data/spec/mock/movie.marshal +0 -0
- data/spec/mock/musicstore.json +54 -0
- data/spec/mock/photonet.page +772 -0
- data/spec/mock/tumblr.page +1269 -0
- data/spec/mock/tumblralbum.page +1884 -0
- data/spec/nokaya_spec.rb +147 -8
- data/spec/spec_helper.rb +4 -1
- metadata +56 -2
data/spec/nokaya_spec.rb
CHANGED
@@ -1,10 +1,149 @@
|
|
1
1
|
require 'spec_helper'
|
2
2
|
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
3
|
+
describe Nokaya do
|
4
|
+
|
5
|
+
class FakeLogger
|
6
|
+
|
7
|
+
attr_accessor :formatter, :error
|
8
|
+
|
9
|
+
end
|
10
|
+
|
11
|
+
before do
|
12
|
+
Logger.stub(:new).and_return(FakeLogger.new)
|
13
|
+
Dir.stub(:mkdir)
|
14
|
+
File.stub(:write)
|
15
|
+
end
|
16
|
+
|
17
|
+
describe "#version" do
|
18
|
+
it 'has a version number' do
|
19
|
+
expect(Nokaya::VERSION).to_not be nil
|
20
|
+
end
|
21
|
+
end
|
22
|
+
|
23
|
+
describe "#adn" do
|
24
|
+
let(:inst) {Nokaya::ADN.new(['spec/mock/adn.page'])}
|
25
|
+
it "gets pic from app.net page" do
|
26
|
+
expect(inst.urls).to eq ["https://files.app.net/1/1176038/aAzhGKr0HnF6Qvx0m5y4H3DRO8t3MRUWJshlLLfv4lcJ545lYdmY5ijA3CTfvZ1I8vJN0-gNuGXlLzpDjf5diwg3WZREDWMsiCKLEM1Rzi5XBPnIjUkixFpJ5_srdyjqA_tpw-9joHD8LkYLP9GFWrWd7cVs02ijwOdBlJ25-LfG1FIz9I-oCCiWamGjtcGUX"]
|
27
|
+
expect(inst.filenames).to eq ["adn-charl-.jpg"]
|
28
|
+
expect(inst.author).to eq 'charl'
|
29
|
+
expect(inst.name).to eq 'charl'
|
30
|
+
end
|
31
|
+
end
|
32
|
+
|
33
|
+
describe "#deviantart" do
|
34
|
+
before do
|
35
|
+
Nokaya::Deviantart.any_instance.stub(:author_name).and_return('yolo')
|
36
|
+
end
|
37
|
+
let(:inst) {Nokaya::Deviantart.new(['spec/mock/deviantart.page'])}
|
38
|
+
it "gets pic from deviantart page" do
|
39
|
+
expect(inst.urls).to eq ["http://fc09.deviantart.net/fs70/f/2014/263/3/2/autumn_in_palsankoski_ii_by_m_eralp-d7zu20i.jpg", "http://fc08.deviantart.net/fs70/i/2014/263/a/b/aqua_by_jbrum-d7ztmhc.jpg", "http://th02.deviantart.net/fs71/PRE/f/2014/263/7/a/_mg_4290_by_thechosenpesssimist-d7ztwj1.jpg", "http://th06.deviantart.net/fs70/PRE/i/2014/263/5/9/spider_lilies_by_the_sea_by_peterpateman-d7zuahz.jpg", "http://th03.deviantart.net/fs70/PRE/f/2014/263/6/c/_mg_4096_by_thechosenpesssimist-d7zuiaz.jpg", "http://th09.deviantart.net/fs71/PRE/i/2014/262/4/3/mt__rainier_national_park___snow_lake_by_jxsnyder-d7ztjgg.jpg", "http://fc08.deviantart.net/fs70/i/2014/263/6/5/silver_by_slatkatajna-d7ztwkv.jpg", "http://fc04.deviantart.net/fs70/f/2014/263/5/1/26_3_2014_big_splash_by_poseidonsimons_s-d7ztshi.jpg", "http://th03.deviantart.net/fs70/PRE/f/2014/263/c/0/17sep2014_007_100_by_vw1956-d7zvfom.jpg", "http://fc01.deviantart.net/fs70/f/2014/263/a/8/10706451_10202732285297434_559845670_n_by_igngiannioglou17-d7zuns1.jpg", "http://fc05.deviantart.net/fs70/i/2014/263/b/9/lake_by_apostolos_t-d7ztnoc.jpg", "http://fc07.deviantart.net/fs71/i/2014/263/a/8/sunset_by_the_pond__3__by_ioanniscleary-d7zu89u.png", "http://th08.deviantart.net/fs71/PRE/f/2014/263/5/4/sunset_on_the_river_by_radu_mihai-d7ztwtd.jpg", "http://th04.deviantart.net/fs71/PRE/i/2014/262/e/b/ozone_falls_by_vision_quest-d7zt69p.jpg", "http://fc03.deviantart.net/fs70/i/2014/263/1/d/small__but_very_deep______area__by_skarzynscy-d7zumrf.jpg", "http://th06.deviantart.net/fs70/PRE/i/2014/263/1/4/lake_tekapo_ripples_by_ajbaus-d7ztug6.jpg", "http://fc06.deviantart.net/fs71/f/2014/263/c/4/lake_by_chocho_takeda-d7zv0bw.jpg", "http://fc02.deviantart.net/fs70/f/2014/263/8/5/untitled_by_bomb_creator-d7ztr8t.jpg", "http://th00.deviantart.net/fs70/PRE/i/2014/263/9/3/golyazi_v_by_dselene-d7ztmnz.jpg", "http://th07.deviantart.net/fs71/PRE/i/2014/262/1/f/harrison_wright_by_vision_quest-d7zt5ru.jpg", "http://th03.deviantart.net/fs71/PRE/i/2014/263/7/f/golyazi_iv_by_dselene-d7ztmfy.jpg", "http://fc06.deviantart.net/fs70/f/2014/263/6/1/10638040_10203775349123183_2032706264_n_by_igngiannioglou17-d7zuo8q.jpg", "http://fc09.deviantart.net/fs70/f/2014/263/e/e/ee3d9b6348981b0aec57ce5e362a5a67-d7zufxv.jpg", "http://fc08.deviantart.net/fs70/i/2014/263/2/3/harbour_by_mim001122-d7zu3pn.jpg", "http://fc03.deviantart.net/fs71/i/2014/060/7/2/elsa_by_lily_on_the_moon-d78fzl7.jpg", "http://th05.deviantart.net/fs70/PRE/f/2014/255/a/1/from_hell_s_heart_i_stab_at_thee_by_scumbugg-d7yx24n.jpg", "http://th07.deviantart.net/fs71/PRE/i/2014/260/f/2/feeling_good_by_tsubaki77-d7zemf7.jpg", "http://th06.deviantart.net/fs71/PRE/i/2014/162/2/b/background_86_by_sisterslaughter165-d7m06ym.jpg", "http://th05.deviantart.net/fs70/PRE/f/2014/236/2/5/01_7_3_by_hoooook-d7wjiqb.jpg", "http://th08.deviantart.net/fs71/PRE/i/2014/064/4/0/week_nine_by_mary_by-d7916nc.jpg", "http://fc02.deviantart.net/fs71/f/2014/235/f/e/treasury_by_realnam-d7wda4b.jpg", "http://fc01.deviantart.net/fs71/f/2014/244/5/8/citykani_03_by_dracovinia-d7xicpn.jpg"]
|
40
|
+
expect(inst.filenames).to eq ["deviantart-yolo-autumn_in_palsankoski_ii_by_m_eralp-d7zu20i.jpg", "deviantart-yolo-aqua_by_jbrum-d7ztmhc.jpg", "deviantart-yolo-_mg_4290_by_thechosenpesssimist-d7ztwj1.jpg", "deviantart-yolo-spider_lilies_by_the_sea_by_peterpateman-d7zuahz.jpg", "deviantart-yolo-_mg_4096_by_thechosenpesssimist-d7zuiaz.jpg", "deviantart-yolo-mt__rainier_national_park___snow_lake_by_jxsnyder-d7ztjgg.jpg", "deviantart-yolo-silver_by_slatkatajna-d7ztwkv.jpg", "deviantart-yolo-26_3_2014_big_splash_by_poseidonsimons_s-d7ztshi.jpg", "deviantart-yolo-17sep2014_007_100_by_vw1956-d7zvfom.jpg", "deviantart-yolo-10706451_10202732285297434_559845670_n_by_igngiannioglou17-d7zuns1.jpg", "deviantart-yolo-lake_by_apostolos_t-d7ztnoc.jpg", "deviantart-yolo-sunset_by_the_pond__3__by_ioanniscleary-d7zu89u.png", "deviantart-yolo-sunset_on_the_river_by_radu_mihai-d7ztwtd.jpg", "deviantart-yolo-ozone_falls_by_vision_quest-d7zt69p.jpg", "deviantart-yolo-small__but_very_deep______area__by_skarzynscy-d7zumrf.jpg", "deviantart-yolo-lake_tekapo_ripples_by_ajbaus-d7ztug6.jpg", "deviantart-yolo-lake_by_chocho_takeda-d7zv0bw.jpg", "deviantart-yolo-untitled_by_bomb_creator-d7ztr8t.jpg", "deviantart-yolo-golyazi_v_by_dselene-d7ztmnz.jpg", "deviantart-yolo-harrison_wright_by_vision_quest-d7zt5ru.jpg", "deviantart-yolo-golyazi_iv_by_dselene-d7ztmfy.jpg", "deviantart-yolo-10638040_10203775349123183_2032706264_n_by_igngiannioglou17-d7zuo8q.jpg", "deviantart-yolo-ee3d9b6348981b0aec57ce5e362a5a67-d7zufxv.jpg", "deviantart-yolo-harbour_by_mim001122-d7zu3pn.jpg", "deviantart-yolo-elsa_by_lily_on_the_moon-d78fzl7.jpg", "deviantart-yolo-from_hell_s_heart_i_stab_at_thee_by_scumbugg-d7yx24n.jpg", "deviantart-yolo-feeling_good_by_tsubaki77-d7zemf7.jpg", "deviantart-yolo-background_86_by_sisterslaughter165-d7m06ym.jpg", "deviantart-yolo-01_7_3_by_hoooook-d7wjiqb.jpg", "deviantart-yolo-week_nine_by_mary_by-d7916nc.jpg", "deviantart-yolo-treasury_by_realnam-d7wda4b.jpg", "deviantart-yolo-citykani_03_by_dracovinia-d7xicpn.jpg"]
|
41
|
+
expect(inst.type).to eq :deviantart
|
42
|
+
end
|
43
|
+
end
|
44
|
+
|
45
|
+
describe "#favd" do
|
46
|
+
let(:inst) {Nokaya::Favd.new(['spec/mock/favd.page'])}
|
47
|
+
it "gets pic from favd page" do
|
48
|
+
expect(inst.urls).to eq ["https://files.app.net/1/1171798/aW8KMoVM36ZCoKYWNVjWgzFCLwAJ89Z64s6mJ9z5mrLcx8WOCrd0yGQSWHWBpJDS0Gv3YTsW9XIBRihnacwuqPzjzayR2BvY-KVdVUfZiBArkNaHLTIPcgBCd65KLIA8rViX3E59VIq5asZrEdACOkWMJCA2n_nzrdAg4p-Ga6B3bXzMN9tJo8vUzzn2ViiEl"]
|
49
|
+
expect(inst.filenames[0]).to include "favd-isaiah-"
|
50
|
+
expect(inst.author).to eq 'isaiah'
|
51
|
+
expect(inst.name).to eq 'isaiah'
|
52
|
+
end
|
53
|
+
end
|
54
|
+
|
55
|
+
describe "#flickr_album" do
|
56
|
+
let(:inst) {Nokaya::FlickrAlbum.new(['spec/mock/flickr.page'])}
|
57
|
+
it "gets pic from flickr album" do
|
58
|
+
expect(inst.urls).to eq ["https://c1.staticflickr.com/3/2919/13946923640_182d400d21.jpg", "https://c2.staticflickr.com/6/5157/13946880807_db1f88de4d.jpg", "https://c2.staticflickr.com/6/5560/13946924040_c6a7e4ab46_h.jpg", "https://c1.staticflickr.com/3/2913/13946882097_a4a5591396_h.jpg", "https://c2.staticflickr.com/8/7379/14153634813_d6250e48a3_h.jpg", "https://c1.staticflickr.com/3/2940/13946925490_0a038b9f23_h.jpg", "https://c2.staticflickr.com/8/7375/13946901759_e470b6af0b_h.jpg", "https://c2.staticflickr.com/6/5585/13946926300_941a8996d0.jpg", "https://c2.staticflickr.com/6/5464/13946945758_2809171f0b.jpg", "https://c2.staticflickr.com/8/7338/13946885567_c11122f56d_h.jpg", "https://c2.staticflickr.com/8/7313/13946927570_5ddc44a93a.jpg", "https://c1.staticflickr.com/3/2914/13946947058_d02cdc8a53_h.jpg", "https://c2.staticflickr.com/8/7369/14110391036_e3976f8552_k.jpg", "https://c2.staticflickr.com/6/5444/14130603722_78fbbcfe88_h.jpg", "https://c2.staticflickr.com/8/7316/13946948088_c764f350a7_h.jpg"]
|
59
|
+
expect(inst.filenames).to eq ["flickr--13946923640_182d400d21.jpg", "flickr--13946880807_db1f88de4d.jpg", "flickr--13946924040_c6a7e4ab46_h.jpg", "flickr--13946882097_a4a5591396_h.jpg", "flickr--14153634813_d6250e48a3_h.jpg", "flickr--13946925490_0a038b9f23_h.jpg", "flickr--13946901759_e470b6af0b_h.jpg", "flickr--13946926300_941a8996d0.jpg", "flickr--13946945758_2809171f0b.jpg", "flickr--13946885567_c11122f56d_h.jpg", "flickr--13946927570_5ddc44a93a.jpg", "flickr--13946947058_d02cdc8a53_h.jpg", "flickr--14110391036_e3976f8552_k.jpg", "flickr--14130603722_78fbbcfe88_h.jpg", "flickr--13946948088_c764f350a7_h.jpg"]
|
60
|
+
end
|
61
|
+
end
|
62
|
+
|
63
|
+
describe "#ImgurAlbum" do
|
64
|
+
let(:inst) {Nokaya::ImgurAlbum.new(['spec/mock/imguralbum.page'])}
|
65
|
+
it "gets pic from ImgurAlbum page" do
|
66
|
+
expect(inst.urls).to eq ["http://i.imgur.com/ElCPi.gif", "http://i.imgur.com/IzUaG.gif", "http://i.imgur.com/BTR34.gif", "http://i.imgur.com/Sj6HN.gif", "http://i.imgur.com/R2v3c6H.gif", "http://i.imgur.com/v6JHwtK.gif", "http://i.imgur.com/RMsnqCF.gif", "http://i.imgur.com/PFRaVV6.gif", "http://i.imgur.com/ZQ4RyHo.gif", "http://i.imgur.com/biHam6L.gif", "http://i.imgur.com/LCUjeU1.gif", "http://i.imgur.com/0U2cnck.gif", "http://i.imgur.com/t6jxZYx.gif", "http://i.imgur.com/AT5je46.gif", "http://i.imgur.com/G4QbkbX.gif", "http://i.imgur.com/vFhh4JW.gif", "http://i.imgur.com/nqQQlXM.gif", "http://i.imgur.com/XdecdeT.gif", "http://i.imgur.com/E3jqOHP.gif", "http://i.imgur.com/ffgtvJG.gif", "http://i.imgur.com/ltmY2rg.gif", "http://i.imgur.com/O8G3idn.gif", "http://i.imgur.com/PeOkjoB.gif", "http://i.imgur.com/qGr2jmT.gif", "http://i.imgur.com/YsEvEu3.gif", "http://i.imgur.com/SqUnkNY.gif", "http://i.imgur.com/0fY0s03.gif", "http://i.imgur.com/GqUfvsA.gif", "http://i.imgur.com/tXysky4.gif", "http://i.imgur.com/woZL9TO.gif", "http://i.imgur.com/fFUjGje.gif", "http://i.imgur.com/YkoCx.gif", "http://i.imgur.com/dEFHI.gif", "http://i.imgur.com/vTqWh.gif", "http://i.imgur.com/GPqtwr7.gif", "http://i.imgur.com/NpAbl.gif", "http://i.imgur.com/megqR.gif", "http://i.imgur.com/8waIx0Y.gif", "http://i.imgur.com/RVBi3T1.gif"]
|
67
|
+
expect(inst.filenames).to eq ["imgur-no_nope-ElCPi.gif", "imgur-no_nope-IzUaG.gif", "imgur-no_nope-BTR34.gif", "imgur-no_nope-Sj6HN.gif", "imgur-no_nope-R2v3c6H.gif", "imgur-no_nope-v6JHwtK.gif", "imgur-no_nope-RMsnqCF.gif", "imgur-no_nope-PFRaVV6.gif", "imgur-no_nope-ZQ4RyHo.gif", "imgur-no_nope-biHam6L.gif", "imgur-no_nope-LCUjeU1.gif", "imgur-no_nope-0U2cnck.gif", "imgur-no_nope-t6jxZYx.gif", "imgur-no_nope-AT5je46.gif", "imgur-no_nope-G4QbkbX.gif", "imgur-no_nope-vFhh4JW.gif", "imgur-no_nope-nqQQlXM.gif", "imgur-no_nope-XdecdeT.gif", "imgur-no_nope-E3jqOHP.gif", "imgur-no_nope-ffgtvJG.gif", "imgur-no_nope-ltmY2rg.gif", "imgur-no_nope-O8G3idn.gif", "imgur-no_nope-PeOkjoB.gif", "imgur-no_nope-qGr2jmT.gif", "imgur-no_nope-YsEvEu3.gif", "imgur-no_nope-SqUnkNY.gif", "imgur-no_nope-0fY0s03.gif", "imgur-no_nope-GqUfvsA.gif", "imgur-no_nope-tXysky4.gif", "imgur-no_nope-woZL9TO.gif", "imgur-no_nope-fFUjGje.gif", "imgur-no_nope-YkoCx.gif", "imgur-no_nope-dEFHI.gif", "imgur-no_nope-vTqWh.gif", "imgur-no_nope-GPqtwr7.gif", "imgur-no_nope-NpAbl.gif", "imgur-no_nope-megqR.gif", "imgur-no_nope-8waIx0Y.gif", "imgur-no_nope-RVBi3T1.gif"]
|
68
|
+
expect(inst.author).to eq 'no_nope'
|
69
|
+
end
|
70
|
+
end
|
71
|
+
|
72
|
+
describe "#instagram" do
|
73
|
+
let(:inst) {Nokaya::Instagram.new(['spec/mock/instagram.page'])}
|
74
|
+
it "gets pic from instagram page" do
|
75
|
+
expect(inst.urls).to eq ["http://photos-e.ak.instagram.com/hphotos-ak-xpa1/926741_520249524752228_30532453_n.jpg"]
|
76
|
+
expect(inst.filenames[0]).to include "instagram-1075005806-"
|
77
|
+
expect(inst.author).to eq '1075005806'
|
78
|
+
expect(inst.name).to eq '1075005806'
|
79
|
+
end
|
80
|
+
end
|
81
|
+
|
82
|
+
describe "#movie" do
|
83
|
+
before do
|
84
|
+
Spotlite::Movie.stub(:find).and_return(Marshal.load(File.read('spec/mock/movie.marshal')))
|
85
|
+
OpenURI.stub(:open_uri).and_return('whatever')
|
86
|
+
end
|
87
|
+
let(:inst) {Nokaya::Movie.new(['solaris'])}
|
88
|
+
it "gets pics from imdb" do
|
89
|
+
expect(inst.filenames).to eq ["movie-solaris.jpg"]
|
90
|
+
expect(inst.title).to eq 'Solaris'
|
91
|
+
expect(inst.ref_url).to eq 'http://www.imdb.com/title/tt0307479/'
|
92
|
+
expect(inst.year).to eq 2002
|
93
|
+
expect(inst.name).to eq 'solaris'
|
94
|
+
end
|
95
|
+
end
|
96
|
+
|
97
|
+
describe "#movie alt" do
|
98
|
+
before do
|
99
|
+
Spotlite::Movie.stub(:find).and_return(Marshal.load(File.read('spec/mock/movie.marshal')))
|
100
|
+
OpenURI.stub(:open_uri).and_return('whatever')
|
101
|
+
end
|
102
|
+
let(:inst) {Nokaya::Movie.new(['solaris'], {'alt' => true})}
|
103
|
+
it "gets pics from imdb" do
|
104
|
+
expect(inst.filenames).to eq ["movie-solaris.jpg"]
|
105
|
+
expect(inst.title).to eq 'Solaris'
|
106
|
+
expect(inst.ref_url).to eq "http://www.imdb.com/title/tt0069293/"
|
107
|
+
expect(inst.year).to eq 1972
|
108
|
+
expect(inst.name).to eq 'solaris'
|
109
|
+
end
|
110
|
+
end
|
111
|
+
|
112
|
+
describe "#musicstore" do
|
113
|
+
before do
|
114
|
+
Nokaya::MusicStore.any_instance.stub(:get).and_return(JSON.parse(File.read('spec/mock/musicstore.json')))
|
115
|
+
OpenURI.stub(:open_uri).and_return('whatever')
|
116
|
+
end
|
117
|
+
let(:inst) {Nokaya::MusicStore.new(['stairway to heaven'])}
|
118
|
+
it "gets pics from itunes store" do
|
119
|
+
expect(inst.filenames).to eq ["mothership_remastered_.jpg", "led_zeppelin_iv_remastered_.jpg", "stairway_to_heaven_live_at_the_kennedy_center_honors_[with_jason_bonham]_-_single.jpg", "the_ultimate_o_jays.jpg", "rodrigo_y_gabriela.jpg", "celebration_day_live_at_o2_arena_london_.jpg", "a_tribute_to_led_zeppelin.jpg", "chilled_acoustic_session.jpg", "stairway_to_heaven_-_single.jpg", "how_the_west_was_won_live_[remastered].jpg", "the_string_quartet_tribute_to_led_zeppelin.jpg", "greatest_hits_box_set_a_tribute_to_led_zeppelin.jpg", "the_song_remains_the_same_live_[remastered].jpg", "lullaby_renditions_of_led_zeppelin.jpg", "the_rock_n_roll_wedding_collection.jpg", "little_queen.jpg", "the_essential_o_jays.jpg", "great_zeppelin_-_a_tribute_to_led_zeppelin_live_.jpg", "led_zeppelin_iv.jpg", "kashmir_symphonic_led_zeppelin.jpg", "the_soundtrack_to_your_life_rock_classics.jpg", "the_essential_o_jays.jpg", "rockfluence_solo_piano.jpg", "whole_lotta_bluegrass_a_bluegrass_tribute_to_led_zeppelin.jpg", "smooth_rock_sessions.jpg", "ruin_jonny_s_bar_mitzvah.jpg", "the_very_best_of_neil_sedaka.jpg", "live_in_japan.jpg", "the_definitive_collection.jpg", "cello_-_stairway_to_heaven_-_new_songs_for_cello.jpg", "a_tribute_to_led_zeppelin_-_livin_lovin_played.jpg", "valentine_s_day_love_ballads.jpg", "led_zeppelin_iv_deluxe_edition_.jpg", "be_your_own_pet.jpg", "rhythms_del_mundo_classics.jpg"]
|
120
|
+
expect(inst.urls).to eq ["http://a2.mzstatic.com/us/r30/Features/v4/3b/ec/d2/3becd264-4656-3fc9-497b-449e9e4fc5ed/dj.azyhgayp.1200x1200-75.jpg", "http://a4.mzstatic.com/us/r30/Music/v4/ff/18/42/ff18423c-ea1c-8351-21b8-c74687756645/603497926121.1200x1200-75.jpg", "http://a4.mzstatic.com/us/r30/Music/v4/88/86/bc/8886bc26-1a67-2998-afd2-72ef1cbdf50f/887158318115_Cover.1200x1200-75.jpg", "http://a1.mzstatic.com/us/r30/Music/76/37/2a/mzi.areasmgx.1200x1200-75.jpg", "http://a2.mzstatic.com/us/r30/Music/fc/a1/a8/mzi.qistqxdp.1200x1200-75.jpg", "http://a2.mzstatic.com/us/r30/Features/v4/53/62/c4/5362c4ea-0ff6-0279-9dca-6e05931587eb/dj.aeaokiej.1200x1200-75.jpg", "http://a1.mzstatic.com/us/r30/Music/y2005/m04/d16/h18/s05.erxrvyat.1200x1200-75.jpg", "http://a3.mzstatic.com/us/r30/Music/f4/c6/87/mzi.fkogqksw.1200x1200-75.jpg", "http://a4.mzstatic.com/us/r30/Music/1a/8b/d6/mzi.zuocxcuw.1200x1200-75.jpg", "http://a1.mzstatic.com/us/r30/Features/v4/7c/f8/42/7cf842c8-e417-7829-420c-75e3ea33ee61/dj.ewuwbxwz.1200x1200-75.jpg", "http://a1.mzstatic.com/us/r30/Music/5d/de/40/mzi.wjiamyhx.1200x1200-75.jpg", "http://a2.mzstatic.com/us/r30/Music/v4/c6/fb/bf/c6fbbffc-5e9d-4d7e-7186-1b4ebecdd4c1/859708849363_cover.1200x1200-75.jpg", "http://a4.mzstatic.com/us/r30/Features/v4/aa/be/cd/aabecdf4-57fa-b2cb-9074-0b1298eb7250/dj.vkmqtcob.1200x1200-75.jpg", "http://a1.mzstatic.com/us/r30/Features4/v4/49/ea/73/49ea73e7-0e46-28af-331e-908a323b0749/dj.asydfdnp.1200x1200-75.jpg", "http://a2.mzstatic.com/us/r30/Music/dd/f0/8d/mzi.uahdynle.1200x1200-75.jpg", "http://a5.mzstatic.com/us/r30/Music/07/da/6f/mzi.txvkljta.1200x1200-75.jpg", "http://a2.mzstatic.com/us/r30/Music/73/23/1f/mzi.ewtqaimm.1200x1200-75.jpg", "http://a4.mzstatic.com/us/r30/Music/y2005/m05/d27/h09/s05.ffljbhax.1200x1200-75.jpg", "http://a2.mzstatic.com/us/r30/Music/v4/ae/c9/08/aec9082d-96b9-1185-eb0a-9c42e10c865f/603497987740.1200x1200-75.jpg", "http://a1.mzstatic.com/us/r30/Features/de/de/7c/dj.nalblsxb.1200x1200-75.jpg", "http://a3.mzstatic.com/us/r30/Music/43/6d/6f/mzi.cjjvagpv.1200x1200-75.jpg", "http://a1.mzstatic.com/us/r30/Music/90/5f/80/mzi.vcspkfke.1200x1200-75.jpg", "http://a3.mzstatic.com/us/r30/Music/a0/74/91/mzi.bylygjif.1200x1200-75.jpg", "http://a4.mzstatic.com/us/r30/Music/1b/db/19/mzi.sjplsuzs.1200x1200-75.jpg", "http://a2.mzstatic.com/us/r30/Music/v4/31/6e/da/316edad0-d336-64e4-2f68-09b54d9cc074/888003213272.1200x1200-75.jpg", "http://a1.mzstatic.com/us/r30/Music/0a/9d/39/mzi.stndncyd.1200x1200-75.jpg", "http://a5.mzstatic.com/us/r30/Features/9a/16/47/dj.nzfzpbrt.1200x1200-75.jpg", "http://a2.mzstatic.com/us/r30/Music/1a/c1/c9/mzi.qybptvxz.1200x1200-75.jpg", "http://a4.mzstatic.com/us/r30/Music/e3/56/b9/mzi.pxjeygey.1200x1200-75.jpg", "http://a2.mzstatic.com/us/r30/Music/4d/7a/10/mzi.lgzvrzmi.1200x1200-75.jpg", "http://a1.mzstatic.com/us/r30/Music/y2003/m10/d03/h17/s03.feenwsrn.1200x1200-75.jpg", "http://a4.mzstatic.com/us/r30/Music/47/2e/b5/mzi.khhreowd.1200x1200-75.jpg", "http://a2.mzstatic.com/us/r30/Music5/v4/37/96/50/379650ca-f24f-8fd1-4cd3-efd8611b2774/603497898558.1200x1200-75.jpg", "http://a1.mzstatic.com/us/r30/Features/e1/8e/8b/dj.hrvniybh.1200x1200-75.jpg", "http://a4.mzstatic.com/us/r30/Music/3c/00/d4/mzi.upyrlwcu.1200x1200-75.jpg"]
|
121
|
+
end
|
122
|
+
end
|
123
|
+
|
124
|
+
describe "#photonet" do
|
125
|
+
let(:inst) {Nokaya::Photonet.new(['spec/mock/photonet.page'])}
|
126
|
+
it "gets pic from photonet page" do
|
127
|
+
expect(inst.urls).to eq ["http://gallery.photo.net/photo/17682029-lg.jpg", "http://gallery.photo.net/photo/17717900-lg.jpg", "http://gallery.photo.net/photo/17675953-lg.jpg", "http://gallery.photo.net/photo/17656882-lg.jpg", "http://gallery.photo.net/photo/17807326-lg.jpg", "http://gallery.photo.net/photo/17796287-lg.jpg", "http://gallery.photo.net/photo/17566504-lg.jpg", "http://gallery.photo.net/photo/17577989-lg.jpg", "http://gallery.photo.net/photo/17840391-lg.jpg", "http://gallery.photo.net/photo/17589626-lg.jpg", "http://gallery.photo.net/photo/17824120-lg.jpg", "http://gallery.photo.net/photo/17638453-lg.jpg"]
|
128
|
+
expect(inst.filenames).to eq ["photonet-17682029.jpg", "photonet-17717900.jpg", "photonet-17675953.jpg", "photonet-17656882.jpg", "photonet-17807326.jpg", "photonet-17796287.jpg", "photonet-17566504.jpg", "photonet-17577989.jpg", "photonet-17840391.jpg", "photonet-17589626.jpg", "photonet-17824120.jpg", "photonet-17638453.jpg"]
|
129
|
+
end
|
130
|
+
end
|
131
|
+
|
132
|
+
describe "#tumblr" do
|
133
|
+
let(:inst) {Nokaya::Tumblr.new(['spec/mock/tumblr.page'])}
|
134
|
+
it "gets pic from tumblr page" do
|
135
|
+
expect(inst.urls).to eq ["http://38.media.tumblr.com/tumblr_lvc8r6wD1b1qe59oxo1_1280.jpg"]
|
136
|
+
expect(inst.filenames).to eq ["tumblr-lvc8r6wD1b1qe59oxo1_1280.jpg"]
|
137
|
+
expect(inst.name).to eq "lvc8r6wD1b1qe59oxo1_1280.jpg"
|
138
|
+
end
|
139
|
+
end
|
140
|
+
|
141
|
+
describe "#TumblrAlbum" do
|
142
|
+
let(:inst) {Nokaya::TumblrAlbum.new(['spec/mock/tumblralbum.page'])}
|
143
|
+
it "gets pic from tumblr album" do
|
144
|
+
expect(inst.urls).to eq ["http://33.media.tumblr.com/b2bbe634f4cbb78d3365633fb5e930e4/tumblr_nc6hinQsBE1rrpvcmo1_400.png", "http://33.media.tumblr.com/a0abad018c8979e0c133a7dd750c5d54/tumblr_nba7i54ibe1rrpvcmo1_400.png", "http://33.media.tumblr.com/865dee2bbb8ae1c260f3222c487571d2/tumblr_n9nkqcVWBq1rwq85xo1_400.jpg", "http://31.media.tumblr.com/5b5cef6c58ce9e4fa7600b415c9a4ede/tumblr_n9msnjdlUU1qazbepo1_400.png", "http://31.media.tumblr.com/a90d1b8e7dd797730384fb8fdd4b3f33/tumblr_n149bpwg5Z1r2s3h9o1_400.jpg", "http://38.media.tumblr.com/3dd4386525a154a5cf979c602dc15753/tumblr_mvjvd0kHAZ1rwq85xo1_400.jpg", "http://38.media.tumblr.com/fad89b8915466bd35727b517f02bfe77/tumblr_mz0c0moH8L1r215w7o1_400.png", "http://38.media.tumblr.com/42a0dda24bd7def21fe68aadd2c640e6/tumblr_mxova9ESmY1qiyg21o1_400.jpg", "http://38.media.tumblr.com/a876e46eedb39527e251ea019f61bc26/tumblr_my165sUxQj1qztcdbo1_400.jpg", "http://33.media.tumblr.com/4b610a1b0313fd57c25e3e4778d27777/tumblr_mwbecfrXd61qlnsfyo1_400.jpg", "http://31.media.tumblr.com/67e552c8148ac1854d2472c031a352a0/tumblr_n7prudDx2p1r6ja9oo1_400.jpg", "http://38.media.tumblr.com/fa30a0cb8f02263911111d203b0dc466/tumblr_n9eancksJr1rrpvcmo1_400.png", "http://33.media.tumblr.com/9ce5414b09fae24873d5941d66f21e36/tumblr_n0z0m1Zgx21rgfuxjo1_400.jpg"]
|
145
|
+
expect(inst.filenames).to eq ["tumblr-nc6hinQsBE1rrpvcmo1_400.png", "tumblr-nba7i54ibe1rrpvcmo1_400.png", "tumblr-n9nkqcVWBq1rwq85xo1_400.jpg", "tumblr-n9msnjdlUU1qazbepo1_400.png", "tumblr-n149bpwg5Z1r2s3h9o1_400.jpg", "tumblr-mvjvd0kHAZ1rwq85xo1_400.jpg", "tumblr-mz0c0moH8L1r215w7o1_400.png", "tumblr-mxova9ESmY1qiyg21o1_400.jpg", "tumblr-my165sUxQj1qztcdbo1_400.jpg", "tumblr-mwbecfrXd61qlnsfyo1_400.jpg", "tumblr-n7prudDx2p1r6ja9oo1_400.jpg", "tumblr-n9eancksJr1rrpvcmo1_400.png", "tumblr-n0z0m1Zgx21rgfuxjo1_400.jpg"]
|
146
|
+
end
|
147
|
+
end
|
148
|
+
|
149
|
+
end
|
data/spec/spec_helper.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: nokaya
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.5
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Eric Dejonckheere
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-
|
11
|
+
date: 2014-09-21 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: thor
|
@@ -52,6 +52,20 @@ dependencies:
|
|
52
52
|
- - "~>"
|
53
53
|
- !ruby/object:Gem::Version
|
54
54
|
version: '0.8'
|
55
|
+
- !ruby/object:Gem::Dependency
|
56
|
+
name: tvdb_party
|
57
|
+
requirement: !ruby/object:Gem::Requirement
|
58
|
+
requirements:
|
59
|
+
- - "~>"
|
60
|
+
- !ruby/object:Gem::Version
|
61
|
+
version: '0.7'
|
62
|
+
type: :runtime
|
63
|
+
prerelease: false
|
64
|
+
version_requirements: !ruby/object:Gem::Requirement
|
65
|
+
requirements:
|
66
|
+
- - "~>"
|
67
|
+
- !ruby/object:Gem::Version
|
68
|
+
version: '0.7'
|
55
69
|
- !ruby/object:Gem::Dependency
|
56
70
|
name: bundler
|
57
71
|
requirement: !ruby/object:Gem::Requirement
|
@@ -122,6 +136,20 @@ dependencies:
|
|
122
136
|
- - "~>"
|
123
137
|
- !ruby/object:Gem::Version
|
124
138
|
version: '4.3'
|
139
|
+
- !ruby/object:Gem::Dependency
|
140
|
+
name: coveralls
|
141
|
+
requirement: !ruby/object:Gem::Requirement
|
142
|
+
requirements:
|
143
|
+
- - ">="
|
144
|
+
- !ruby/object:Gem::Version
|
145
|
+
version: '0'
|
146
|
+
type: :development
|
147
|
+
prerelease: false
|
148
|
+
version_requirements: !ruby/object:Gem::Requirement
|
149
|
+
requirements:
|
150
|
+
- - ">="
|
151
|
+
- !ruby/object:Gem::Version
|
152
|
+
version: '0'
|
125
153
|
description: CLI to download photos from several online services including Instagram,
|
126
154
|
Imgur albums, Flickr albums, Tumblr, App,net, etc.
|
127
155
|
email:
|
@@ -131,7 +159,10 @@ executables:
|
|
131
159
|
extensions: []
|
132
160
|
extra_rdoc_files: []
|
133
161
|
files:
|
162
|
+
- ".coveralls.yml"
|
134
163
|
- ".gitignore"
|
164
|
+
- ".rspec"
|
165
|
+
- ".travis.yml"
|
135
166
|
- CHANGELOG.md
|
136
167
|
- Gemfile
|
137
168
|
- Guardfile
|
@@ -158,9 +189,21 @@ files:
|
|
158
189
|
- lib/nokaya/status.rb
|
159
190
|
- lib/nokaya/tumblr.rb
|
160
191
|
- lib/nokaya/tumblr_album.rb
|
192
|
+
- lib/nokaya/tvshow.rb
|
161
193
|
- lib/nokaya/version.rb
|
162
194
|
- lib/nokaya/workers.rb
|
163
195
|
- nokaya.gemspec
|
196
|
+
- spec/mock/adn.page
|
197
|
+
- spec/mock/deviantart.page
|
198
|
+
- spec/mock/favd.page
|
199
|
+
- spec/mock/flickr.page
|
200
|
+
- spec/mock/imguralbum.page
|
201
|
+
- spec/mock/instagram.page
|
202
|
+
- spec/mock/movie.marshal
|
203
|
+
- spec/mock/musicstore.json
|
204
|
+
- spec/mock/photonet.page
|
205
|
+
- spec/mock/tumblr.page
|
206
|
+
- spec/mock/tumblralbum.page
|
164
207
|
- spec/nokaya_spec.rb
|
165
208
|
- spec/spec_helper.rb
|
166
209
|
homepage: http://github.com/ericdke/nokaya
|
@@ -188,5 +231,16 @@ signing_key:
|
|
188
231
|
specification_version: 4
|
189
232
|
summary: Download photos from several online services.
|
190
233
|
test_files:
|
234
|
+
- spec/mock/adn.page
|
235
|
+
- spec/mock/deviantart.page
|
236
|
+
- spec/mock/favd.page
|
237
|
+
- spec/mock/flickr.page
|
238
|
+
- spec/mock/imguralbum.page
|
239
|
+
- spec/mock/instagram.page
|
240
|
+
- spec/mock/movie.marshal
|
241
|
+
- spec/mock/musicstore.json
|
242
|
+
- spec/mock/photonet.page
|
243
|
+
- spec/mock/tumblr.page
|
244
|
+
- spec/mock/tumblralbum.page
|
191
245
|
- spec/nokaya_spec.rb
|
192
246
|
- spec/spec_helper.rb
|