sjunkieex 0.1.2 → 0.1.3
Sign up to get free protection for your applications and to get access to all the features.
- data/Gemfile +3 -0
- data/Guardfile +9 -0
- data/lib/sjunkieex/interface.rb +7 -5
- data/lib/sjunkieex/version.rb +1 -1
- data/test/seriesindex_example.xml +6 -0
- data/test/site_dumps/homepage_with_wrong_links.html +9337 -0
- data/test/test_interface.rb +7 -9
- metadata +5 -2
data/test/test_interface.rb
CHANGED
@@ -49,17 +49,15 @@ class TestInterface < Test::Unit::TestCase
|
|
49
49
|
assert_equal "Shameless US", links["http://serienjunkies.org/serie/shameless-us/"]
|
50
50
|
end
|
51
51
|
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
# links = interface.look_for_new_episodes()
|
52
|
+
def test_that_the_right_links_get_extracted_for_a_series
|
53
|
+
filename = File.dirname(__FILE__) + '/site_dumps/homepage_with_wrong_links.html'
|
54
|
+
interface = Sjunkieex::Interface.new(@series_index, url: filename)
|
57
55
|
|
58
|
-
|
56
|
+
links = interface.look_for_new_episodes
|
59
57
|
|
60
|
-
|
61
|
-
|
62
|
-
|
58
|
+
assert_equal false, links.include?("http://serienjunkies.org/serie/person-of-interest/")
|
59
|
+
assert_equal true, links.include?("http://serienjunkies.org/serie/good-wife/")
|
60
|
+
end
|
63
61
|
|
64
62
|
def test_parse_chase_series_page
|
65
63
|
interface = Sjunkieex::Interface.new(@series_index)
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: sjunkieex
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.3
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2013-
|
12
|
+
date: 2013-03-12 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: nokogiri
|
@@ -70,6 +70,7 @@ files:
|
|
70
70
|
- .gitignore
|
71
71
|
- .travis.yml
|
72
72
|
- Gemfile
|
73
|
+
- Guardfile
|
73
74
|
- LICENSE
|
74
75
|
- README.md
|
75
76
|
- Rakefile
|
@@ -82,6 +83,7 @@ files:
|
|
82
83
|
- test/site_dumps/chase.html
|
83
84
|
- test/site_dumps/homepage.html
|
84
85
|
- test/site_dumps/homepage_with_white_collar.html
|
86
|
+
- test/site_dumps/homepage_with_wrong_links.html
|
85
87
|
- test/site_dumps/rizzoli_and_isles.html
|
86
88
|
- test/site_dumps/the_big_bang_theory.html
|
87
89
|
- test/test_helper.rb
|
@@ -115,6 +117,7 @@ test_files:
|
|
115
117
|
- test/site_dumps/chase.html
|
116
118
|
- test/site_dumps/homepage.html
|
117
119
|
- test/site_dumps/homepage_with_white_collar.html
|
120
|
+
- test/site_dumps/homepage_with_wrong_links.html
|
118
121
|
- test/site_dumps/rizzoli_and_isles.html
|
119
122
|
- test/site_dumps/the_big_bang_theory.html
|
120
123
|
- test/test_helper.rb
|