feedbag 0.9.5 → 0.9.6
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.markdown +1 -1
- data/lib/feedbag.rb +3 -2
- metadata +17 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 9698260f809a5f86915b8dbd281555903884fd4e
|
4
|
+
data.tar.gz: 62d1b97a453ca8df4583159b68202c6abe62a473
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c23b21e4885ce88fe32748f289afd5ae3b8ca03170399cb1958f5ae2627519424a3a9a9f6492d93492f3ff718932b745a815bd6647059d83b720f7496dcd1306
|
7
|
+
data.tar.gz: e01f337445faaf3a624e74c2d9c4fc7cb39fccf0e9aadf29c068e9e0942c7b4b84b732dda22cb268642e59ccb741e4c0cf5e4e482d701fc1f72d91f0f7ef400b
|
data/README.markdown
CHANGED
@@ -47,4 +47,4 @@ You can also use the command line tool for quick queries, if you install the gem
|
|
47
47
|
|
48
48
|
### Copyright
|
49
49
|
|
50
|
-
This is free software. See [COPYING](
|
50
|
+
This is free software. See [COPYING](https://raw.githubusercontent.com/damog/feedbag/master/COPYING) for more information.
|
data/lib/feedbag.rb
CHANGED
@@ -25,6 +25,7 @@ require "rubygems"
|
|
25
25
|
require "nokogiri"
|
26
26
|
require "open-uri"
|
27
27
|
require "net/http"
|
28
|
+
require "open_uri_redirections"
|
28
29
|
|
29
30
|
class Feedbag
|
30
31
|
|
@@ -95,7 +96,7 @@ class Feedbag
|
|
95
96
|
end
|
96
97
|
|
97
98
|
begin
|
98
|
-
html = open(url) do |f|
|
99
|
+
html = open(url, :allow_redirections => :all) do |f|
|
99
100
|
content_type = f.content_type.downcase
|
100
101
|
if content_type == "application/octet-stream" # open failed
|
101
102
|
content_type = f.meta["content-type"].gsub(/;.*$/, '')
|
@@ -161,7 +162,7 @@ class Feedbag
|
|
161
162
|
end
|
162
163
|
|
163
164
|
def looks_like_feed?(url)
|
164
|
-
if url =~ /(\.(rdf|xml|
|
165
|
+
if url =~ /(\.(rdf|xml|rss)$|feed=(rss|atom)|(atom|feed)\/?$)/i
|
165
166
|
true
|
166
167
|
else
|
167
168
|
false
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: feedbag
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.9.
|
4
|
+
version: 0.9.6
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- David Moreno
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date:
|
12
|
+
date: 2016-04-11 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: nokogiri
|
@@ -25,6 +25,20 @@ dependencies:
|
|
25
25
|
- - "~>"
|
26
26
|
- !ruby/object:Gem::Version
|
27
27
|
version: '1.0'
|
28
|
+
- !ruby/object:Gem::Dependency
|
29
|
+
name: open_uri_redirections
|
30
|
+
requirement: !ruby/object:Gem::Requirement
|
31
|
+
requirements:
|
32
|
+
- - "~>"
|
33
|
+
- !ruby/object:Gem::Version
|
34
|
+
version: '0.2'
|
35
|
+
type: :runtime
|
36
|
+
prerelease: false
|
37
|
+
version_requirements: !ruby/object:Gem::Requirement
|
38
|
+
requirements:
|
39
|
+
- - "~>"
|
40
|
+
- !ruby/object:Gem::Version
|
41
|
+
version: '0.2'
|
28
42
|
- !ruby/object:Gem::Dependency
|
29
43
|
name: shoulda
|
30
44
|
requirement: !ruby/object:Gem::Requirement
|
@@ -59,7 +73,7 @@ dependencies:
|
|
59
73
|
- - ">="
|
60
74
|
- !ruby/object:Gem::Version
|
61
75
|
version: 0.12.0
|
62
|
-
description: Ruby's favorite feed auto-
|
76
|
+
description: Ruby's favorite feed auto-discovery tool
|
63
77
|
email: david@axiombox.com
|
64
78
|
executables:
|
65
79
|
- feedbag
|