tvdb_party 0.5.0 → 0.5.1

Sign up to get free protection for your applications and to get access to all the features.
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.5.0
1
+ 0.5.1
@@ -1,10 +1,9 @@
1
1
  module TvdbParty
2
2
  class Search
3
3
  include HTTParty
4
- # include HTTParty::Icebox
4
+ include HTTParty::Icebox
5
5
  attr_accessor :language
6
- format :xml
7
- # cache :store => 'file', :timeout => 120, :location => Dir.tmpdir
6
+ cache :store => 'file', :timeout => 120, :location => Dir.tmpdir
8
7
 
9
8
  base_uri 'www.thetvdb.com/api'
10
9
 
@@ -38,7 +37,6 @@ module TvdbParty
38
37
 
39
38
  def get_episode(series, season_number, episode_number, language = self.language)
40
39
  response = self.class.get("/#{@api_key}/series/#{series.id}/default/#{season_number}/#{episode_number}/#{language}.xml").parsed_response
41
- puts response.inspect
42
40
  if response["Data"] && response["Data"]["Episode"]
43
41
  Episode.new(response["Data"]["Episode"])
44
42
  else
@@ -17,6 +17,17 @@ class TvdbPartyTest < Test::Unit::TestCase
17
17
 
18
18
  end
19
19
 
20
+ context "search for episode that doesn't exist" do
21
+ setup do
22
+ @show = @tvdb.get_series_by_id(75700)
23
+ end
24
+
25
+ should "have handle 404 on episode query" do
26
+ assert_equal nil, @show.get_episode(1, 17)
27
+ end
28
+
29
+ end
30
+
20
31
  context "search for real show" do
21
32
  setup do
22
33
  @results = @tvdb.search("The Office US")
data/tvdb_party.gemspec CHANGED
@@ -5,7 +5,7 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = %q{tvdb_party}
8
- s.version = "0.5.0"
8
+ s.version = "0.5.1"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["Jon Maddox"]
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: tvdb_party
3
3
  version: !ruby/object:Gem::Version
4
- hash: 11
4
+ hash: 9
5
5
  prerelease: false
6
6
  segments:
7
7
  - 0
8
8
  - 5
9
- - 0
10
- version: 0.5.0
9
+ - 1
10
+ version: 0.5.1
11
11
  platform: ruby
12
12
  authors:
13
13
  - Jon Maddox