feedbag 0.9.5 → 0.9.6

Sign up to get free protection for your applications and to get access to all the features.
Files changed (4) hide show
  1. checksums.yaml +4 -4
  2. data/README.markdown +1 -1
  3. data/lib/feedbag.rb +3 -2
  4. metadata +17 -3
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: e3a032f802145ef18b064ce596a770ad953d7935
4
- data.tar.gz: 8ba5026551852b8f1e062df8728ab75ceb30967e
3
+ metadata.gz: 9698260f809a5f86915b8dbd281555903884fd4e
4
+ data.tar.gz: 62d1b97a453ca8df4583159b68202c6abe62a473
5
5
  SHA512:
6
- metadata.gz: 2273fde749da4219a7b1e33bcf4b974c9c2ab9421666eddc44f64cbefe3019327032048a966e265304fc30355e0bf70f3a7cdb1128fcf4dcbffa2d639039c3d6
7
- data.tar.gz: f71c4d23befa67c1648cd0f6aaa15b1db3ba187b713250fe4dfe0b660cde9a47ee9795080156e3e00f1a88c7e8577f2961015807313d6fc4e0bbdadefa6c6396
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](http://github.com/damog/feedbag/master/COPYING) for more information.
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|rdf|rss)$|feed=(rss|atom)|(atom|feed)\/?$)/i
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.5
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: 2014-10-16 00:00:00.000000000 Z
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-discoverty tool
76
+ description: Ruby's favorite feed auto-discovery tool
63
77
  email: david@axiombox.com
64
78
  executables:
65
79
  - feedbag