tvrage_api 0.1.1 → 0.2.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.travis.yml +1 -1
- data/README.md +38 -8
- data/lib/tvrage_api/base.rb +8 -3
- data/lib/tvrage_api/client.rb +23 -3
- data/lib/tvrage_api/info.rb +19 -0
- data/lib/tvrage_api/recap.rb +47 -0
- data/lib/tvrage_api/schedule.rb +35 -0
- data/lib/tvrage_api/search.rb +30 -4
- data/lib/tvrage_api/show.rb +70 -8
- data/lib/tvrage_api/update.rb +16 -2
- data/lib/tvrage_api/version.rb +1 -1
- data/lib/tvrage_api.rb +3 -0
- data/spec/fixtures/all_recaps.xml +8 -0
- data/spec/fixtures/episode_info.xml +1 -0
- data/spec/fixtures/episode_list.xml +21 -0
- data/spec/fixtures/full_schedule.xml +60 -0
- data/spec/fixtures/full_search.xml +53 -0
- data/spec/fixtures/full_show_info.xml +36 -0
- data/spec/fixtures/last_recaps.xml +18 -0
- data/spec/fixtures/last_updates.xml +6 -0
- data/spec/fixtures/quick_info.txt +13 -0
- data/spec/fixtures/quick_schedule.txt +1 -0
- data/spec/fixtures/search.xml +39 -0
- data/spec/fixtures/show_info.xml +21 -0
- data/spec/fixtures/show_list.xml +5 -0
- data/spec/fixtures/show_recaps.xml +47 -0
- data/spec/functionals/info_spec.rb +30 -0
- data/spec/functionals/recap_spec.rb +66 -0
- data/spec/functionals/schedule_spec.rb +48 -0
- data/spec/functionals/search_spec.rb +48 -0
- data/spec/functionals/show_spec.rb +102 -0
- data/spec/functionals/update_spec.rb +30 -0
- data/spec/integrations/info_spec.rb +14 -0
- data/spec/integrations/recap_spec.rb +26 -0
- data/spec/integrations/schedule_spec.rb +20 -0
- data/spec/integrations/search_spec.rb +4 -3
- data/spec/integrations/show_spec.rb +12 -5
- data/spec/integrations/update_spec.rb +3 -2
- data/tvrage_api.gemspec +1 -1
- metadata +57 -18
- data/spec/integrations/client_spec.rb +0 -55
- data/spec/tvrage_api/client_spec.rb +0 -23
- data/spec/tvrage_api/search_spec.rb +0 -22
- data/spec/tvrage_api/show_spec.rb +0 -38
- data/spec/tvrage_api/update_spec.rb +0 -14
metadata
CHANGED
@@ -1,29 +1,29 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: tvrage_api
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.2.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Krzysztof Wawer
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2014-06-25 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
|
-
name:
|
14
|
+
name: service_api
|
15
15
|
requirement: !ruby/object:Gem::Requirement
|
16
16
|
requirements:
|
17
|
-
- -
|
17
|
+
- - ~>
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version: 0.
|
19
|
+
version: 0.0.4
|
20
20
|
type: :runtime
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
|
-
- -
|
24
|
+
- - ~>
|
25
25
|
- !ruby/object:Gem::Version
|
26
|
-
version: 0.
|
26
|
+
version: 0.0.4
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: bundler
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
@@ -96,19 +96,40 @@ files:
|
|
96
96
|
- lib/tvrage_api.rb
|
97
97
|
- lib/tvrage_api/base.rb
|
98
98
|
- lib/tvrage_api/client.rb
|
99
|
+
- lib/tvrage_api/info.rb
|
100
|
+
- lib/tvrage_api/recap.rb
|
101
|
+
- lib/tvrage_api/schedule.rb
|
99
102
|
- lib/tvrage_api/search.rb
|
100
103
|
- lib/tvrage_api/show.rb
|
101
104
|
- lib/tvrage_api/update.rb
|
102
105
|
- lib/tvrage_api/version.rb
|
103
|
-
- spec/
|
106
|
+
- spec/fixtures/all_recaps.xml
|
107
|
+
- spec/fixtures/episode_info.xml
|
108
|
+
- spec/fixtures/episode_list.xml
|
109
|
+
- spec/fixtures/full_schedule.xml
|
110
|
+
- spec/fixtures/full_search.xml
|
111
|
+
- spec/fixtures/full_show_info.xml
|
112
|
+
- spec/fixtures/last_recaps.xml
|
113
|
+
- spec/fixtures/last_updates.xml
|
114
|
+
- spec/fixtures/quick_info.txt
|
115
|
+
- spec/fixtures/quick_schedule.txt
|
116
|
+
- spec/fixtures/search.xml
|
117
|
+
- spec/fixtures/show_info.xml
|
118
|
+
- spec/fixtures/show_list.xml
|
119
|
+
- spec/fixtures/show_recaps.xml
|
120
|
+
- spec/functionals/info_spec.rb
|
121
|
+
- spec/functionals/recap_spec.rb
|
122
|
+
- spec/functionals/schedule_spec.rb
|
123
|
+
- spec/functionals/search_spec.rb
|
124
|
+
- spec/functionals/show_spec.rb
|
125
|
+
- spec/functionals/update_spec.rb
|
126
|
+
- spec/integrations/info_spec.rb
|
127
|
+
- spec/integrations/recap_spec.rb
|
128
|
+
- spec/integrations/schedule_spec.rb
|
104
129
|
- spec/integrations/search_spec.rb
|
105
130
|
- spec/integrations/show_spec.rb
|
106
131
|
- spec/integrations/update_spec.rb
|
107
132
|
- spec/spec_helper.rb
|
108
|
-
- spec/tvrage_api/client_spec.rb
|
109
|
-
- spec/tvrage_api/search_spec.rb
|
110
|
-
- spec/tvrage_api/show_spec.rb
|
111
|
-
- spec/tvrage_api/update_spec.rb
|
112
133
|
- tvrage_api.gemspec
|
113
134
|
homepage: http://github.com/wafcio/tvrage_api
|
114
135
|
licenses:
|
@@ -130,17 +151,35 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
130
151
|
version: '0'
|
131
152
|
requirements: []
|
132
153
|
rubyforge_project:
|
133
|
-
rubygems_version: 2.0.
|
154
|
+
rubygems_version: 2.0.3
|
134
155
|
signing_key:
|
135
156
|
specification_version: 4
|
136
157
|
summary: Ruby client for tvrage.com API
|
137
158
|
test_files:
|
138
|
-
- spec/
|
159
|
+
- spec/fixtures/all_recaps.xml
|
160
|
+
- spec/fixtures/episode_info.xml
|
161
|
+
- spec/fixtures/episode_list.xml
|
162
|
+
- spec/fixtures/full_schedule.xml
|
163
|
+
- spec/fixtures/full_search.xml
|
164
|
+
- spec/fixtures/full_show_info.xml
|
165
|
+
- spec/fixtures/last_recaps.xml
|
166
|
+
- spec/fixtures/last_updates.xml
|
167
|
+
- spec/fixtures/quick_info.txt
|
168
|
+
- spec/fixtures/quick_schedule.txt
|
169
|
+
- spec/fixtures/search.xml
|
170
|
+
- spec/fixtures/show_info.xml
|
171
|
+
- spec/fixtures/show_list.xml
|
172
|
+
- spec/fixtures/show_recaps.xml
|
173
|
+
- spec/functionals/info_spec.rb
|
174
|
+
- spec/functionals/recap_spec.rb
|
175
|
+
- spec/functionals/schedule_spec.rb
|
176
|
+
- spec/functionals/search_spec.rb
|
177
|
+
- spec/functionals/show_spec.rb
|
178
|
+
- spec/functionals/update_spec.rb
|
179
|
+
- spec/integrations/info_spec.rb
|
180
|
+
- spec/integrations/recap_spec.rb
|
181
|
+
- spec/integrations/schedule_spec.rb
|
139
182
|
- spec/integrations/search_spec.rb
|
140
183
|
- spec/integrations/show_spec.rb
|
141
184
|
- spec/integrations/update_spec.rb
|
142
185
|
- spec/spec_helper.rb
|
143
|
-
- spec/tvrage_api/client_spec.rb
|
144
|
-
- spec/tvrage_api/search_spec.rb
|
145
|
-
- spec/tvrage_api/show_spec.rb
|
146
|
-
- spec/tvrage_api/update_spec.rb
|
@@ -1,55 +0,0 @@
|
|
1
|
-
require 'spec_helper'
|
2
|
-
|
3
|
-
describe TvrageApi::Client do
|
4
|
-
let(:client) { TvrageApi::Client.new }
|
5
|
-
|
6
|
-
describe 'real request' do
|
7
|
-
describe '.search' do
|
8
|
-
describe '.by_name' do
|
9
|
-
it 'should return response class' do
|
10
|
-
client.search.by_name('buffy').class.should == HTTParty::Response
|
11
|
-
end
|
12
|
-
end
|
13
|
-
|
14
|
-
describe '.full_by_name' do
|
15
|
-
it 'should return response class' do
|
16
|
-
client.search.full_by_name('buffy').class.should == HTTParty::Response
|
17
|
-
end
|
18
|
-
end
|
19
|
-
end
|
20
|
-
|
21
|
-
describe '.show' do
|
22
|
-
describe '.find' do
|
23
|
-
it 'should return response class' do
|
24
|
-
client.show.find('2930').class.should == HTTParty::Response
|
25
|
-
end
|
26
|
-
end
|
27
|
-
|
28
|
-
describe '.find_full' do
|
29
|
-
it 'should return response class' do
|
30
|
-
client.show.find_full('2930').class.should == HTTParty::Response
|
31
|
-
end
|
32
|
-
end
|
33
|
-
|
34
|
-
describe '.episodes' do
|
35
|
-
it 'should return response class' do
|
36
|
-
client.show.episodes('2930').class.should == HTTParty::Response
|
37
|
-
end
|
38
|
-
end
|
39
|
-
|
40
|
-
describe '.episode' do
|
41
|
-
it 'should return response class' do
|
42
|
-
client.show.episode('2930', '2', '4').class.should == HTTParty::Response
|
43
|
-
end
|
44
|
-
end
|
45
|
-
end
|
46
|
-
|
47
|
-
describe '.update' do
|
48
|
-
describe '.all' do
|
49
|
-
it 'should return response class' do
|
50
|
-
client.update.all.class.should == HTTParty::Response
|
51
|
-
end
|
52
|
-
end
|
53
|
-
end
|
54
|
-
end
|
55
|
-
end
|
@@ -1,23 +0,0 @@
|
|
1
|
-
require 'spec_helper'
|
2
|
-
|
3
|
-
describe TvrageApi::Client do
|
4
|
-
let(:model) { TvrageApi::Client.new }
|
5
|
-
|
6
|
-
describe '.search' do
|
7
|
-
it 'should return search class' do
|
8
|
-
model.search.class.should == TvrageApi::Search
|
9
|
-
end
|
10
|
-
end
|
11
|
-
|
12
|
-
describe '.show' do
|
13
|
-
it 'should return show class' do
|
14
|
-
model.show.class.should == TvrageApi::Show
|
15
|
-
end
|
16
|
-
end
|
17
|
-
|
18
|
-
describe '.update' do
|
19
|
-
it 'should return update class' do
|
20
|
-
model.update.class.should == TvrageApi::Update
|
21
|
-
end
|
22
|
-
end
|
23
|
-
end
|
@@ -1,22 +0,0 @@
|
|
1
|
-
require 'spec_helper'
|
2
|
-
|
3
|
-
describe TvrageApi::Search do
|
4
|
-
let(:klass) { TvrageApi::Search }
|
5
|
-
let(:model) { klass.new }
|
6
|
-
|
7
|
-
describe '#find' do
|
8
|
-
it 'should call new with specific params' do
|
9
|
-
klass.should_receive(:get).with('search.php', show: 'buffy')
|
10
|
-
|
11
|
-
model.by_name('buffy')
|
12
|
-
end
|
13
|
-
end
|
14
|
-
|
15
|
-
describe '#find_full' do
|
16
|
-
it 'should call new with specific params' do
|
17
|
-
klass.should_receive(:get).with('full_search.php', show: 'buffy')
|
18
|
-
|
19
|
-
model.full_by_name('buffy')
|
20
|
-
end
|
21
|
-
end
|
22
|
-
end
|
@@ -1,38 +0,0 @@
|
|
1
|
-
require 'spec_helper'
|
2
|
-
|
3
|
-
describe TvrageApi::Show do
|
4
|
-
let(:klass) { TvrageApi::Show }
|
5
|
-
let(:model) { klass.new }
|
6
|
-
|
7
|
-
describe '#find' do
|
8
|
-
it 'should call new with specific params' do
|
9
|
-
klass.should_receive(:get).with('showinfo.php', sid: 123)
|
10
|
-
|
11
|
-
model.find(123)
|
12
|
-
end
|
13
|
-
end
|
14
|
-
|
15
|
-
describe '#find_full' do
|
16
|
-
it 'should call new with specific params' do
|
17
|
-
klass.should_receive(:get).with('full_show_info.php', sid: 123)
|
18
|
-
|
19
|
-
model.find_full(123)
|
20
|
-
end
|
21
|
-
end
|
22
|
-
|
23
|
-
describe '#episodes' do
|
24
|
-
it 'should call new with specific params' do
|
25
|
-
klass.should_receive(:get).with('episode_list.php', sid: 123)
|
26
|
-
|
27
|
-
model.episodes(123)
|
28
|
-
end
|
29
|
-
end
|
30
|
-
|
31
|
-
describe '#episode' do
|
32
|
-
it 'should call new with specific params' do
|
33
|
-
klass.should_receive(:get).with('episodeinfo.php', sid: 123, ep: '1x2')
|
34
|
-
|
35
|
-
model.episode(123, 1, 2)
|
36
|
-
end
|
37
|
-
end
|
38
|
-
end
|
@@ -1,14 +0,0 @@
|
|
1
|
-
require 'spec_helper'
|
2
|
-
|
3
|
-
describe TvrageApi::Update do
|
4
|
-
let(:klass) { TvrageApi::Update }
|
5
|
-
let(:model) { klass.new }
|
6
|
-
|
7
|
-
describe '#all' do
|
8
|
-
it 'should call new with specific params' do
|
9
|
-
klass.should_receive(:get).with('show_list.php')
|
10
|
-
|
11
|
-
model.all
|
12
|
-
end
|
13
|
-
end
|
14
|
-
end
|