memo_rage 0.0.5 → 0.0.6

Sign up to get free protection for your applications and to get access to all the features.
@@ -10,6 +10,7 @@ module MemoRage
10
10
  end
11
11
 
12
12
  def to_array(name)
13
+ return [] unless @entry.elements[name.to_s]
13
14
  @entry.elements[name.to_s].elements.collect do |text|
14
15
  text.text
15
16
  end
@@ -1,3 +1,3 @@
1
1
  module MemoRage
2
- VERSION = "0.0.5"
2
+ VERSION = "0.0.6"
3
3
  end
@@ -25,5 +25,12 @@ describe MemoRage::Parser::ShowInfo do
25
25
  show.akas =~ [ "Buffy & vampyrerna", "Buffy - Im Bann der Dämonen", "Buffy - Vampyrenes skrekk", "Buffy a vámpírok réme", "Buffy Contre les Vampires", "Buffy l'Ammazza Vampiri", "Buffy postrach wampirów", "Buffy, a Caça-Vampiros", "Buffy, a Caçadora de Vampiros", "Buffy, Cazavampiros", "Buffy, ubojica vampira", "Buffy, vampyyrintappaja", "Vampiiritapja Buffy", "Vampírubaninn Buffy" ]
26
26
  end
27
27
  end
28
+
29
+ it 'should handle empty/missing show info' do
30
+ mock_api :get, 'showinfo', 'show_info_empty', :params => client.params.merge(:sid => "22303") do
31
+ show = client.show_info("22303")
32
+ show.genres.should == []
33
+ end
34
+ end
28
35
  end
29
36
 
@@ -0,0 +1,20 @@
1
+ <?xml version="1.0" encoding="UTF-8" ?>
2
+
3
+ <Showinfo>
4
+ <showid>22303</showid>
5
+ <showname>Alcatraz: The Whole Shocking Story</showname>
6
+ <showlink>http://www.tvrage.com/shows/id-22303</showlink>
7
+ <seasons>1</seasons>
8
+ <image>http://images.tvrage.com/shows/23/22303.jpg</image>
9
+ <started>1980</started>
10
+ <startdate>Nov/05/1980</startdate>
11
+
12
+ <ended>Nov/06/1980</ended>
13
+ <origin_country>US</origin_country>
14
+ <status>Canceled/Ended</status>
15
+ <classification>Mini-Series</classification>
16
+ <runtime>240</runtime>
17
+ <network country="US">NBC</network>
18
+ <airtime>12:00</airtime>
19
+ <timezone>GMT-5 +DST</timezone>
20
+ </Showinfo>
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: memo_rage
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.5
4
+ version: 0.0.6
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -143,6 +143,7 @@ files:
143
143
  - spec/mock_xml/episode_list.xml
144
144
  - spec/mock_xml/episode_list_empty.xml
145
145
  - spec/mock_xml/show_info.xml
146
+ - spec/mock_xml/show_info_empty.xml
146
147
  - spec/mock_xml/show_search.xml
147
148
  - spec/spec_helper.rb
148
149
  homepage: http://github.com/appsbakery/memo_rage