the_tvdb 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.
- data/lib/the_tvdb.rb +4 -5
- data/lib/the_tvdb/version.rb +1 -1
- data/spec/lib/the_tvdb/episode_spec.rb +5 -6
- data/spec/lib/the_tvdb/show_spec.rb +2 -3
- metadata +2 -2
data/lib/the_tvdb.rb
CHANGED
@@ -5,11 +5,11 @@ require "the_tvdb/show"
|
|
5
5
|
require "the_tvdb/episode"
|
6
6
|
|
7
7
|
module TheTvdb
|
8
|
-
|
8
|
+
|
9
9
|
def self.setup
|
10
10
|
yield self.configuration
|
11
11
|
end
|
12
|
-
|
12
|
+
|
13
13
|
def self.configuration
|
14
14
|
@config ||= Configuration.instance
|
15
15
|
end
|
@@ -17,7 +17,7 @@ module TheTvdb
|
|
17
17
|
def self.gateway
|
18
18
|
@gateway ||= Gateway.instance
|
19
19
|
end
|
20
|
-
|
20
|
+
|
21
21
|
# Starting from the last update recorded on the gateway, a hash with the new
|
22
22
|
# update time and the updated shows are returned
|
23
23
|
#
|
@@ -36,7 +36,6 @@ module TheTvdb
|
|
36
36
|
end
|
37
37
|
end
|
38
38
|
gateway.last_updated = result[:time]
|
39
|
-
p result
|
40
39
|
result
|
41
40
|
end
|
42
41
|
|
@@ -44,6 +43,6 @@ end
|
|
44
43
|
|
45
44
|
class String
|
46
45
|
def to_tvdb_array
|
47
|
-
gsub(/^\|/, '').split('|')
|
46
|
+
gsub(/^\|/, '').split('|').map(&:strip)
|
48
47
|
end
|
49
48
|
end
|
data/lib/the_tvdb/version.rb
CHANGED
@@ -9,15 +9,15 @@ describe TheTvdb::Episode do
|
|
9
9
|
before do
|
10
10
|
VCR.insert_cassette 'episodes', record: :new_episodes
|
11
11
|
end
|
12
|
-
|
12
|
+
|
13
13
|
after do
|
14
14
|
VCR.eject_cassette
|
15
15
|
end
|
16
|
-
|
16
|
+
|
17
17
|
describe ".find" do
|
18
18
|
|
19
19
|
let(:episode) { TheTvdb::Episode.find(4245778) }
|
20
|
-
|
20
|
+
|
21
21
|
it "should return all the info of the episode" do
|
22
22
|
episode.name.should == 'Blackwater'
|
23
23
|
episode.number.should == 9
|
@@ -43,7 +43,7 @@ describe TheTvdb::Episode do
|
|
43
43
|
# RatingCount is not included in the detail data, just in the series package
|
44
44
|
# episode.rating_count.should == 282
|
45
45
|
end
|
46
|
-
|
46
|
+
|
47
47
|
end
|
48
48
|
|
49
49
|
end
|
@@ -53,10 +53,9 @@ describe "Weird case episode" do
|
|
53
53
|
before do
|
54
54
|
VCR.insert_cassette 'weird_episode', record: :new_episodes
|
55
55
|
end
|
56
|
-
|
56
|
+
|
57
57
|
after do
|
58
58
|
VCR.eject_cassette
|
59
59
|
end
|
60
|
-
|
61
60
|
|
62
61
|
end
|
@@ -77,13 +77,12 @@ describe TheTvdb::Show do
|
|
77
77
|
end
|
78
78
|
|
79
79
|
end
|
80
|
-
|
80
|
+
|
81
81
|
it "should return an array of episodes even if there is just one episode" do
|
82
82
|
one_episode_show = TheTvdb::Show.find(77856)
|
83
83
|
one_episode_show.episodes.size.should == 1
|
84
84
|
end
|
85
|
-
|
86
|
-
|
85
|
+
|
87
86
|
end
|
88
87
|
|
89
88
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: the_tvdb
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.5
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2013-01-
|
12
|
+
date: 2013-01-05 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: nokogiri
|