feedbag 0.9.8 → 0.10

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.
Files changed (4) hide show
  1. checksums.yaml +4 -4
  2. data/README.markdown +15 -13
  3. data/lib/feedbag.rb +4 -4
  4. metadata +11 -5
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: d849beafed42f6eaf06f5847d525b284990ea308
4
- data.tar.gz: 59de9e7d7692ef586d82812bec5086b7570e75e1
3
+ metadata.gz: 2f4a18f05a16a8b2b8bc186f4fe114c3257f9fb5
4
+ data.tar.gz: f37fbb42c262877603597a7aa302641611099aa1
5
5
  SHA512:
6
- metadata.gz: 9a3d98e90e7f48bcbb44a461ff35f674737b2c4d93c09f137e33b3afdba4fdfb69221681ae43778aa39c7724d5305ca12ae38f258d83ff08294d1799d8374819
7
- data.tar.gz: 367c78e9308d3e8ec85d3576c41d4f56057bc42766c5660d7adbdf7e6b52ccf3e4bd6062216b3031c240655168e557f37e55042584d2607d64ed530c84e90a17
6
+ metadata.gz: f3690a18905ace1fd0abf19c6b1c9cc47e20a696e51865a5cfb7ffb03ccbd884f9ff4a75a6da6feba48a07627ceb5d451daf2afb079cc33ffe13714bfae0615c
7
+ data.tar.gz: babb742f5e7a301bc59de0cdfefd28eb8b7df73b0640bed71033ae1a8d95434f56a9164279eb231af1c4d2737b7a2c1a5e2a668cd4945b58d1c4becd65036b8e
@@ -5,14 +5,16 @@ Feedbag is Ruby's favorite auto-discovery tool/library!
5
5
 
6
6
  ### Quick synopsis
7
7
 
8
- >> require "feedbag"
9
- => true
10
- >> Feedbag.find "damog.net/blog"
11
- => ["http://damog.net/blog/index.rss", "http://damog.net/blog/tags/feed", "http://damog.net/blog/tags/rfeed"]
12
- >> Feedbag.feed? "perl.org"
13
- => false
14
- >> Feedbag.feed?("http://jobs.perl.org/rss/standard.rss")
15
- => true
8
+ ```ruby
9
+ >> require "feedbag"
10
+ => true
11
+ >> Feedbag.find "damog.net/blog"
12
+ => ["http://damog.net/blog/atom.xml"]
13
+ >> Feedbag.feed? "perl.org"
14
+ => false
15
+ >> Feedbag.feed?("https://m.signalvnoise.com/feed")
16
+ => true
17
+ ```
16
18
 
17
19
  ### Installation
18
20
 
@@ -20,13 +22,13 @@ Feedbag is Ruby's favorite auto-discovery tool/library!
20
22
 
21
23
  Or just grab feedbag.rb and use it on your own project:
22
24
 
23
- $ wget http://github.com/damog/feedbag/raw/master/lib/feedbag.rb
25
+ $ wget https://raw.githubusercontent.com/damog/feedbag/master/lib/feedbag.rb
24
26
 
25
27
  You can also use the command line tool for quick queries, if you install the gem:
26
28
 
27
- $ feedbag http://rubygems.org/profiles/damog
28
- == http://rubygems.org/profiles/damog:
29
- - http://feeds.feedburner.com/gemcutter-latest
29
+ » feedbag https://www.ruby-lang.org/en/
30
+ == https://www.ruby-lang.org/en/:
31
+ - https://www.ruby-lang.org/en/feeds/news.rss
30
32
 
31
33
  ### Why should you use it?
32
34
 
@@ -41,7 +43,7 @@ You can also use the command line tool for quick queries, if you install the gem
41
43
 
42
44
  ### Donations
43
45
 
44
- ![Superfeedr](http://damog.net/files/misc/superfeedr_150.png)
46
+ ![Superfeedr](https://raw.githubusercontent.com/damog/feedbag/master/img/superfeedr_150.png)
45
47
 
46
48
  [Superfeedr](http://superfeedr.com) has kindly financially [supported](https://github.com/damog/feedbag/issues/9) the development of Feedbag.
47
49
 
@@ -1,6 +1,6 @@
1
1
  #!/usr/bin/ruby
2
2
 
3
- # Copyright (c) 2008-2014 David Moreno <david@axiombox.com>
3
+ # Copyright (c) 2008-2019 David Moreno <david@axiombox.com>
4
4
  #
5
5
  # Permission is hereby granted, free of charge, to any person obtaining
6
6
  # a copy of this software and associated documentation files (the
@@ -36,7 +36,7 @@ class Feedbag
36
36
  'text/xml',
37
37
  'application/rss+xml',
38
38
  'application/rdf+xml',
39
- 'application/json',
39
+ 'application/json',
40
40
  ].freeze
41
41
 
42
42
  def self.feed?(url)
@@ -128,7 +128,7 @@ class Feedbag
128
128
  end
129
129
  end
130
130
 
131
- doc.xpath("//link[@rel='alternate' and @type='application/json'][@href]").each do |e|
131
+ doc.xpath("//link[@rel='alternate' and @type='application/json'][@href]").each do |e|
132
132
  self.add_feed(e['href'], url, @base_uri) if self.looks_like_feed?(e['href'])
133
133
  end
134
134
 
@@ -166,7 +166,7 @@ class Feedbag
166
166
  end
167
167
 
168
168
  def looks_like_feed?(url)
169
- if url =~ /(\.(rdf|xml|rss)$|feed=(rss|atom)|(atom|feed)\/?$)/i
169
+ if url =~ /(\.(rdf|xml|rss)(\?([\w'\-%]?(=[\w'\-%.]*)?(&|#)?)+)?(:[\w'\-%]+)?$|feed=(rss|atom)|(atom|feed)\/?$)/i
170
170
  true
171
171
  else
172
172
  false
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: feedbag
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.9.8
4
+ version: '0.10'
5
5
  platform: ruby
6
6
  authors:
7
7
  - David Moreno
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2017-06-18 00:00:00.000000000 Z
11
+ date: 2019-01-13 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: nokogiri
@@ -16,14 +16,20 @@ dependencies:
16
16
  requirements:
17
17
  - - "~>"
18
18
  - !ruby/object:Gem::Version
19
- version: '1.0'
19
+ version: '1.8'
20
+ - - ">="
21
+ - !ruby/object:Gem::Version
22
+ version: 1.8.2
20
23
  type: :runtime
21
24
  prerelease: false
22
25
  version_requirements: !ruby/object:Gem::Requirement
23
26
  requirements:
24
27
  - - "~>"
25
28
  - !ruby/object:Gem::Version
26
- version: '1.0'
29
+ version: '1.8'
30
+ - - ">="
31
+ - !ruby/object:Gem::Version
32
+ version: 1.8.2
27
33
  - !ruby/object:Gem::Dependency
28
34
  name: open_uri_redirections
29
35
  requirement: !ruby/object:Gem::Requirement
@@ -125,5 +131,5 @@ rubyforge_project: feedbag
125
131
  rubygems_version: 2.6.11
126
132
  signing_key:
127
133
  specification_version: 4
128
- summary: Ruby's favorite feed auto-discovery tool
134
+ summary: RSS/Atom feed auto-discovery tool
129
135
  test_files: []