memo_rage 0.0.4 → 0.0.5

Sign up to get free protection for your applications and to get access to all the features.
@@ -16,4 +16,4 @@ module MemoRage
16
16
  end
17
17
  end
18
18
  end
19
- end
19
+ end
@@ -12,20 +12,23 @@ module MemoRage
12
12
 
13
13
  def parse_entry(entry)
14
14
  episodes = []
15
- entry.elements["Episodelist"].elements.each("Season") do |season|
16
- season.elements.each("episode") do |episode|
17
- episode = MemoRage::Parser::Entry.new(episode)
18
- episodes << MemoRage::Episode.new(
19
- :num => episode.epnum,
20
- :season => season.attributes["no"].to_i,
21
- :season_num => episode.seasonnum,
22
- :prod_num => episode.prodnum,
23
- :airdate => episode.airdate,
24
- :link => episode.link,
25
- :title => episode.title,
26
- :rating => episode.rating,
27
- :image => episode.screencap
28
- )
15
+
16
+ if entry.elements["Episodelist"]
17
+ entry.elements["Episodelist"].elements.each("Season") do |season|
18
+ season.elements.each("episode") do |episode|
19
+ episode = MemoRage::Parser::Entry.new(episode)
20
+ episodes << MemoRage::Episode.new(
21
+ :num => episode.epnum,
22
+ :season => season.attributes["no"].to_i,
23
+ :season_num => episode.seasonnum,
24
+ :prod_num => episode.prodnum,
25
+ :airdate => episode.airdate,
26
+ :link => episode.link,
27
+ :title => episode.title,
28
+ :rating => episode.rating,
29
+ :image => episode.screencap
30
+ )
31
+ end
29
32
  end
30
33
  end
31
34
 
@@ -1,3 +1,3 @@
1
1
  module MemoRage
2
- VERSION = "0.0.4"
2
+ VERSION = "0.0.5"
3
3
  end
data/memo_rage.gemspec CHANGED
@@ -7,9 +7,9 @@ Gem::Specification.new do |s|
7
7
  s.version = MemoRage::VERSION
8
8
  s.authors = ["Alex Ganov", "Todor Grudev"]
9
9
  s.email = ["aganov@gmail.com", "tagrudev@gmail.com"]
10
- s.homepage = ""
11
- s.summary = %q{Memo rage is an api wrapper for the http://services.tvrage.com/ The gem is created to fulfil the needs of the project http://watchmemo.com}
12
- s.description = %q{Find more information at https://github.com/appsbakery/memo_rage}
10
+ s.homepage = "http://github.com/appsbakery/memo_rage"
11
+ s.summary = %q{Ruby wrapper for the TVRage API}
12
+ s.description = %q{An object-oriented Ruby wrapper for the TVRage API http://services.tvrage.com/}
13
13
 
14
14
  s.rubyforge_project = "memo_rage"
15
15
 
@@ -11,4 +11,11 @@ describe MemoRage::Parser::EpisodeList do
11
11
  list.episodes.last.season.should == 7
12
12
  end
13
13
  end
14
+
15
+ it 'should handle empty episode list' do
16
+ mock_api :get, 'episode_list', 'episode_list_empty', :params => client.params.merge(:sid => "22303") do
17
+ list = client.episode_list("22303")
18
+ list.episodes.should == []
19
+ end
20
+ end
14
21
  end
@@ -0,0 +1,5 @@
1
+ <?xml version="1.0" encoding="UTF-8" ?>
2
+ <Show>
3
+ <name>Alcatraz: The Whole Shocking Story</name>
4
+ <totalseasons>1</totalseasons>
5
+ </Show>
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.4
4
+ version: 0.0.5
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -10,12 +10,11 @@ authors:
10
10
  autorequire:
11
11
  bindir: bin
12
12
  cert_chain: []
13
- date: 2012-03-13 00:00:00.000000000 +02:00
14
- default_executable:
13
+ date: 2012-03-15 00:00:00.000000000Z
15
14
  dependencies:
16
15
  - !ruby/object:Gem::Dependency
17
16
  name: httpclient
18
- requirement: &21924140 !ruby/object:Gem::Requirement
17
+ requirement: !ruby/object:Gem::Requirement
19
18
  none: false
20
19
  requirements:
21
20
  - - ! '>='
@@ -23,10 +22,15 @@ dependencies:
23
22
  version: 2.2.0.2
24
23
  type: :runtime
25
24
  prerelease: false
26
- version_requirements: *21924140
25
+ version_requirements: !ruby/object:Gem::Requirement
26
+ none: false
27
+ requirements:
28
+ - - ! '>='
29
+ - !ruby/object:Gem::Version
30
+ version: 2.2.0.2
27
31
  - !ruby/object:Gem::Dependency
28
32
  name: hashie
29
- requirement: &21923640 !ruby/object:Gem::Requirement
33
+ requirement: !ruby/object:Gem::Requirement
30
34
  none: false
31
35
  requirements:
32
36
  - - ! '>='
@@ -34,10 +38,15 @@ dependencies:
34
38
  version: 1.1.0
35
39
  type: :runtime
36
40
  prerelease: false
37
- version_requirements: *21923640
41
+ version_requirements: !ruby/object:Gem::Requirement
42
+ none: false
43
+ requirements:
44
+ - - ! '>='
45
+ - !ruby/object:Gem::Version
46
+ version: 1.1.0
38
47
  - !ruby/object:Gem::Dependency
39
48
  name: rake
40
- requirement: &21923180 !ruby/object:Gem::Requirement
49
+ requirement: !ruby/object:Gem::Requirement
41
50
  none: false
42
51
  requirements:
43
52
  - - ! '>='
@@ -45,10 +54,15 @@ dependencies:
45
54
  version: 0.8.7
46
55
  type: :development
47
56
  prerelease: false
48
- version_requirements: *21923180
57
+ version_requirements: !ruby/object:Gem::Requirement
58
+ none: false
59
+ requirements:
60
+ - - ! '>='
61
+ - !ruby/object:Gem::Version
62
+ version: 0.8.7
49
63
  - !ruby/object:Gem::Dependency
50
64
  name: rspec
51
- requirement: &21922720 !ruby/object:Gem::Requirement
65
+ requirement: !ruby/object:Gem::Requirement
52
66
  none: false
53
67
  requirements:
54
68
  - - ! '>='
@@ -56,10 +70,15 @@ dependencies:
56
70
  version: '2'
57
71
  type: :development
58
72
  prerelease: false
59
- version_requirements: *21922720
73
+ version_requirements: !ruby/object:Gem::Requirement
74
+ none: false
75
+ requirements:
76
+ - - ! '>='
77
+ - !ruby/object:Gem::Version
78
+ version: '2'
60
79
  - !ruby/object:Gem::Dependency
61
80
  name: webmock
62
- requirement: &21922260 !ruby/object:Gem::Requirement
81
+ requirement: !ruby/object:Gem::Requirement
63
82
  none: false
64
83
  requirements:
65
84
  - - ! '>='
@@ -67,10 +86,15 @@ dependencies:
67
86
  version: 1.6.2
68
87
  type: :development
69
88
  prerelease: false
70
- version_requirements: *21922260
89
+ version_requirements: !ruby/object:Gem::Requirement
90
+ none: false
91
+ requirements:
92
+ - - ! '>='
93
+ - !ruby/object:Gem::Version
94
+ version: 1.6.2
71
95
  - !ruby/object:Gem::Dependency
72
96
  name: timecop
73
- requirement: &21921800 !ruby/object:Gem::Requirement
97
+ requirement: !ruby/object:Gem::Requirement
74
98
  none: false
75
99
  requirements:
76
100
  - - ! '>='
@@ -78,8 +102,13 @@ dependencies:
78
102
  version: 0.3.5
79
103
  type: :development
80
104
  prerelease: false
81
- version_requirements: *21921800
82
- description: Find more information at https://github.com/appsbakery/memo_rage
105
+ version_requirements: !ruby/object:Gem::Requirement
106
+ none: false
107
+ requirements:
108
+ - - ! '>='
109
+ - !ruby/object:Gem::Version
110
+ version: 0.3.5
111
+ description: An object-oriented Ruby wrapper for the TVRage API http://services.tvrage.com/
83
112
  email:
84
113
  - aganov@gmail.com
85
114
  - tagrudev@gmail.com
@@ -112,11 +141,11 @@ files:
112
141
  - spec/memo_rage/parser/show_info_spec.rb
113
142
  - spec/memo_rage/parser/show_search_spec.rb
114
143
  - spec/mock_xml/episode_list.xml
144
+ - spec/mock_xml/episode_list_empty.xml
115
145
  - spec/mock_xml/show_info.xml
116
146
  - spec/mock_xml/show_search.xml
117
147
  - spec/spec_helper.rb
118
- has_rdoc: true
119
- homepage: ''
148
+ homepage: http://github.com/appsbakery/memo_rage
120
149
  licenses: []
121
150
  post_install_message:
122
151
  rdoc_options: []
@@ -136,9 +165,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
136
165
  version: '0'
137
166
  requirements: []
138
167
  rubyforge_project: memo_rage
139
- rubygems_version: 1.6.2
168
+ rubygems_version: 1.8.18
140
169
  signing_key:
141
170
  specification_version: 3
142
- summary: Memo rage is an api wrapper for the http://services.tvrage.com/ The gem is
143
- created to fulfil the needs of the project http://watchmemo.com
171
+ summary: Ruby wrapper for the TVRage API
144
172
  test_files: []