feed_searcher 0.0.2 → 0.0.3
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/lib/feed_searcher.rb +2 -1
- data/lib/feed_searcher/version.rb +1 -1
- data/spec/feed_searcher_spec.rb +3 -1
- metadata +2 -2
data/lib/feed_searcher.rb
CHANGED
@@ -1,6 +1,7 @@
|
|
1
1
|
require "feed_searcher/version"
|
2
2
|
require "feed_searcher/fetcher"
|
3
3
|
require "feed_searcher/page"
|
4
|
+
require "uri"
|
4
5
|
require "mechanize"
|
5
6
|
require "nokogiri"
|
6
7
|
|
@@ -17,7 +18,7 @@ class FeedSearcher
|
|
17
18
|
end
|
18
19
|
|
19
20
|
def search
|
20
|
-
fetch.feed_urls
|
21
|
+
fetch.feed_urls.map {|feed_url| URI.join(url, feed_url).to_s }
|
21
22
|
end
|
22
23
|
|
23
24
|
private
|
data/spec/feed_searcher_spec.rb
CHANGED
@@ -10,7 +10,8 @@ describe FeedSearcher do
|
|
10
10
|
<head>
|
11
11
|
<meta charset="UTF-8">
|
12
12
|
<link href="http://example.com/rss.atom" rel="alternate" title="example" type="application/atom+xml" />
|
13
|
-
<link href="http://example.com/rss.
|
13
|
+
<link href="http://rss.example.com/rss.atom" rel="alternate" title="example" type="application/atom+xml" />
|
14
|
+
<link href="/rss.xml" rel="alternate" title="example" type="application/atom+xml" />
|
14
15
|
</head>
|
15
16
|
<body>
|
16
17
|
example
|
@@ -23,6 +24,7 @@ describe FeedSearcher do
|
|
23
24
|
it "returns feed URLs from given URL" do
|
24
25
|
FeedSearcher.search("http://example.com/").should == %w[
|
25
26
|
http://example.com/rss.atom
|
27
|
+
http://rss.example.com/rss.atom
|
26
28
|
http://example.com/rss.xml
|
27
29
|
]
|
28
30
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: feed_searcher
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.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-03-
|
12
|
+
date: 2013-03-17 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: mechanize
|