memo_rage 0.0.8 → 0.0.9
Sign up to get free protection for your applications and to get access to all the features.
@@ -2,12 +2,10 @@ module MemoRage
|
|
2
2
|
module Parser
|
3
3
|
class EpisodeList < Base
|
4
4
|
def parse_content
|
5
|
-
|
6
|
-
doc = Nokogiri::XML(@content.body)
|
7
|
-
doc.xpath('//Show//Episodelist//Season//episode').each do |record|
|
5
|
+
episodes = @doc.xpath('//Show//Episodelist//Season//episode').collect do |record|
|
8
6
|
season = record.parent.at("@no").text.to_i
|
9
7
|
episode = Entry.new(record)
|
10
|
-
|
8
|
+
MemoRage::Episode.new(
|
11
9
|
:id => episode.link.match(/[0-9]+$/).to_a.first.to_i,
|
12
10
|
:num => episode.epnum,
|
13
11
|
:season => season,
|
@@ -22,9 +20,9 @@ module MemoRage
|
|
22
20
|
end
|
23
21
|
|
24
22
|
MemoRage::Show.new(
|
25
|
-
:name => doc.at('//Show//name').text,
|
26
|
-
:seasons => doc.at('//Show//totalseasons').text.to_i,
|
27
|
-
:episodes =>
|
23
|
+
:name => @doc.at('//Show//name').text,
|
24
|
+
:seasons => @doc.at('//Show//totalseasons').text.to_i,
|
25
|
+
:episodes => episodes
|
28
26
|
)
|
29
27
|
end
|
30
28
|
end
|
@@ -2,8 +2,7 @@ module MemoRage
|
|
2
2
|
module Parser
|
3
3
|
class ShowInfo < Base
|
4
4
|
def parse_content
|
5
|
-
|
6
|
-
result = doc.at("Showinfo")
|
5
|
+
result = @doc.at("Showinfo")
|
7
6
|
return nil if result.blank? || result.text.blank?
|
8
7
|
|
9
8
|
entry = MemoRage::Parser::Entry.new(result)
|
@@ -2,8 +2,7 @@ module MemoRage
|
|
2
2
|
module Parser
|
3
3
|
class ShowSearch < Base
|
4
4
|
def parse_content
|
5
|
-
doc
|
6
|
-
doc.xpath("//Results//show").collect do |entry|
|
5
|
+
@doc.xpath("//Results//show").collect do |entry|
|
7
6
|
entry = MemoRage::Parser::Entry.new(entry)
|
8
7
|
MemoRage::Show.new(
|
9
8
|
:id => entry.showid.to_i,
|
data/lib/memo_rage/version.rb
CHANGED
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
|
+
version: 0.0.9
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -10,7 +10,7 @@ authors:
|
|
10
10
|
autorequire:
|
11
11
|
bindir: bin
|
12
12
|
cert_chain: []
|
13
|
-
date: 2012-06-
|
13
|
+
date: 2012-06-13 00:00:00.000000000 Z
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
16
16
|
name: nokogiri
|
@@ -178,7 +178,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
178
178
|
version: '0'
|
179
179
|
segments:
|
180
180
|
- 0
|
181
|
-
hash: -
|
181
|
+
hash: -70678833
|
182
182
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
183
183
|
none: false
|
184
184
|
requirements:
|
@@ -187,7 +187,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
187
187
|
version: '0'
|
188
188
|
segments:
|
189
189
|
- 0
|
190
|
-
hash: -
|
190
|
+
hash: -70678833
|
191
191
|
requirements: []
|
192
192
|
rubyforge_project: memo_rage
|
193
193
|
rubygems_version: 1.8.24
|