overdrive 0.1.1 → 0.1.2
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/VERSION +1 -1
- data/lib/lexicon.rb +1 -1
- data/test/fixtures/test.rss +8 -1
- data/test/unit/lexicon.rb +9 -0
- metadata +2 -2
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.1.
|
1
|
+
0.1.2
|
data/lib/lexicon.rb
CHANGED
@@ -28,7 +28,7 @@ class Lexicon
|
|
28
28
|
parsed[:series] = Regexp.last_match[1].to_i
|
29
29
|
parsed[:episode] = Regexp.last_match[2].to_i
|
30
30
|
state = :done
|
31
|
-
elsif token =~ /^(\d)x?(\d\d)$/i
|
31
|
+
elsif token =~ /^(\d\d?)x?(\d\d)$/i
|
32
32
|
parsed[:series] = Regexp.last_match[1].to_i
|
33
33
|
parsed[:episode] = Regexp.last_match[2].to_i
|
34
34
|
state = :done
|
data/test/fixtures/test.rss
CHANGED
@@ -219,7 +219,14 @@ Category: (Portable TV Episodes)
|
|
219
219
|
Category: Maury
|
220
220
|
Size: 349.14 MB
|
221
221
|
</description>
|
222
|
-
|
222
|
+
</item>
|
223
|
+
<item><title>Top Gear.14x05.720p HDTV x264-FoV</title>
|
224
|
+
<link>http://www.mytorrentsite.com/download/top_gear.14x05.720p_hdtv_x264-fov.mkv.torrent</link>
|
225
|
+
<pubDate>Sun, 20 Dec 2009 22:13:18 -0600</pubDate>
|
226
|
+
<description>
|
227
|
+
Category: TopGear
|
228
|
+
Size: 1.46 GB
|
229
|
+
</description>
|
223
230
|
</item>
|
224
231
|
</channel>
|
225
232
|
</rss>
|
data/test/unit/lexicon.rb
CHANGED
@@ -108,5 +108,14 @@ class LexiconTest < Test::Unit::TestCase
|
|
108
108
|
assert_equal 4, parsed[:episode]
|
109
109
|
assert !parsed[:high_def]
|
110
110
|
end
|
111
|
+
|
112
|
+
should 'parse Top Gear.14x05.720p HDTV x264-FoV' do
|
113
|
+
@item.stubs(:title).returns('Top Gear.14x05.720p HDTV x264-FoV')
|
114
|
+
parsed = Lexicon::parse(@item)
|
115
|
+
assert_equal 'Top Gear', parsed[:title]
|
116
|
+
assert_equal 14, parsed[:series]
|
117
|
+
assert_equal 5, parsed[:episode]
|
118
|
+
assert parsed[:high_def]
|
119
|
+
end
|
111
120
|
end
|
112
121
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: overdrive
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Myles Eftos
|
@@ -9,7 +9,7 @@ autorequire:
|
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
11
|
|
12
|
-
date: 2009-12-
|
12
|
+
date: 2009-12-21 00:00:00 +08:00
|
13
13
|
default_executable: overdrive
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|