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.
- checksums.yaml +4 -4
- data/README.markdown +15 -13
- data/lib/feedbag.rb +4 -4
- metadata +11 -5
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 2f4a18f05a16a8b2b8bc186f4fe114c3257f9fb5
|
4
|
+
data.tar.gz: f37fbb42c262877603597a7aa302641611099aa1
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f3690a18905ace1fd0abf19c6b1c9cc47e20a696e51865a5cfb7ffb03ccbd884f9ff4a75a6da6feba48a07627ceb5d451daf2afb079cc33ffe13714bfae0615c
|
7
|
+
data.tar.gz: babb742f5e7a301bc59de0cdfefd28eb8b7df73b0640bed71033ae1a8d95434f56a9164279eb231af1c4d2737b7a2c1a5e2a668cd4945b58d1c4becd65036b8e
|
data/README.markdown
CHANGED
@@ -5,14 +5,16 @@ Feedbag is Ruby's favorite auto-discovery tool/library!
|
|
5
5
|
|
6
6
|
### Quick synopsis
|
7
7
|
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
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
|
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
|
-
|
28
|
-
==
|
29
|
-
|
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
|
-

|
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
|
|
data/lib/feedbag.rb
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
#!/usr/bin/ruby
|
2
2
|
|
3
|
-
# Copyright (c) 2008-
|
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)
|
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.
|
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:
|
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.
|
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.
|
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:
|
134
|
+
summary: RSS/Atom feed auto-discovery tool
|
129
135
|
test_files: []
|