feedjira 0.9.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/.gitignore +14 -0
- data/.rspec +1 -0
- data/.travis.yml +8 -0
- data/CHANGELOG.md +162 -0
- data/Gemfile +17 -0
- data/Guardfile +5 -0
- data/README.md +242 -0
- data/Rakefile +6 -0
- data/benchmarks/README.md +90 -0
- data/benchmarks/basic.rb +31 -0
- data/benchmarks/feed_list.txt +10 -0
- data/benchmarks/feed_xml/apple.xml +149 -0
- data/benchmarks/feed_xml/cnn.xml +278 -0
- data/benchmarks/feed_xml/daring_fireball.xml +1697 -0
- data/benchmarks/feed_xml/engadget.xml +604 -0
- data/benchmarks/feed_xml/feedjira_commits.xml +370 -0
- data/benchmarks/feed_xml/gizmodo.xml +2 -0
- data/benchmarks/feed_xml/loop.xml +441 -0
- data/benchmarks/feed_xml/rails.xml +1938 -0
- data/benchmarks/feed_xml/white_house.xml +951 -0
- data/benchmarks/feed_xml/xkcd.xml +2 -0
- data/benchmarks/fetching_systems.rb +23 -0
- data/benchmarks/other_libraries.rb +73 -0
- data/feedjira.gemspec +27 -0
- data/lib/feedjira.rb +16 -0
- data/lib/feedjira/core_ext.rb +3 -0
- data/lib/feedjira/core_ext/date.rb +19 -0
- data/lib/feedjira/core_ext/string.rb +9 -0
- data/lib/feedjira/core_ext/time.rb +31 -0
- data/lib/feedjira/feed.rb +459 -0
- data/lib/feedjira/feed_entry_utilities.rb +66 -0
- data/lib/feedjira/feed_utilities.rb +103 -0
- data/lib/feedjira/parser.rb +20 -0
- data/lib/feedjira/parser/atom.rb +61 -0
- data/lib/feedjira/parser/atom_entry.rb +34 -0
- data/lib/feedjira/parser/atom_feed_burner.rb +22 -0
- data/lib/feedjira/parser/atom_feed_burner_entry.rb +35 -0
- data/lib/feedjira/parser/google_docs_atom.rb +28 -0
- data/lib/feedjira/parser/google_docs_atom_entry.rb +29 -0
- data/lib/feedjira/parser/itunes_rss.rb +50 -0
- data/lib/feedjira/parser/itunes_rss_item.rb +41 -0
- data/lib/feedjira/parser/itunes_rss_owner.rb +12 -0
- data/lib/feedjira/parser/rss.rb +24 -0
- data/lib/feedjira/parser/rss_entry.rb +37 -0
- data/lib/feedjira/parser/rss_feed_burner.rb +23 -0
- data/lib/feedjira/parser/rss_feed_burner_entry.rb +43 -0
- data/lib/feedjira/version.rb +3 -0
- data/spec/feedjira/feed_entry_utilities_spec.rb +62 -0
- data/spec/feedjira/feed_spec.rb +762 -0
- data/spec/feedjira/feed_utilities_spec.rb +273 -0
- data/spec/feedjira/parser/atom_entry_spec.rb +86 -0
- data/spec/feedjira/parser/atom_feed_burner_entry_spec.rb +47 -0
- data/spec/feedjira/parser/atom_feed_burner_spec.rb +56 -0
- data/spec/feedjira/parser/atom_spec.rb +76 -0
- data/spec/feedjira/parser/google_docs_atom_entry_spec.rb +22 -0
- data/spec/feedjira/parser/google_docs_atom_spec.rb +31 -0
- data/spec/feedjira/parser/itunes_rss_item_spec.rb +63 -0
- data/spec/feedjira/parser/itunes_rss_owner_spec.rb +18 -0
- data/spec/feedjira/parser/itunes_rss_spec.rb +58 -0
- data/spec/feedjira/parser/rss_entry_spec.rb +85 -0
- data/spec/feedjira/parser/rss_feed_burner_entry_spec.rb +85 -0
- data/spec/feedjira/parser/rss_feed_burner_spec.rb +57 -0
- data/spec/feedjira/parser/rss_spec.rb +57 -0
- data/spec/sample_feeds/AmazonWebServicesBlog.xml +797 -0
- data/spec/sample_feeds/AmazonWebServicesBlogFirstEntryContent.xml +63 -0
- data/spec/sample_feeds/AtomFeedWithSpacesAroundEquals.xml +61 -0
- data/spec/sample_feeds/FeedBurnerUrlNoAlternate.xml +28 -0
- data/spec/sample_feeds/GoogleDocsList.xml +188 -0
- data/spec/sample_feeds/HREFConsideredHarmful.xml +314 -0
- data/spec/sample_feeds/HREFConsideredHarmfulFirstEntry.xml +22 -0
- data/spec/sample_feeds/ITunesWithSpacesInAttributes.xml +63 -0
- data/spec/sample_feeds/PaulDixExplainsNothing.xml +175 -0
- data/spec/sample_feeds/PaulDixExplainsNothingAlternate.xml +175 -0
- data/spec/sample_feeds/PaulDixExplainsNothingFirstEntryContent.xml +19 -0
- data/spec/sample_feeds/PaulDixExplainsNothingWFW.xml +174 -0
- data/spec/sample_feeds/SamRuby.xml +583 -0
- data/spec/sample_feeds/TechCrunch.xml +1515 -0
- data/spec/sample_feeds/TechCrunchFirstEntry.xml +9 -0
- data/spec/sample_feeds/TechCrunchFirstEntryDescription.xml +3 -0
- data/spec/sample_feeds/TenderLovemaking.xml +516 -0
- data/spec/sample_feeds/TenderLovemakingFirstEntry.xml +66 -0
- data/spec/sample_feeds/TrotterCashionHome.xml +611 -0
- data/spec/sample_feeds/TypePadNews.xml +368 -0
- data/spec/sample_feeds/atom_with_link_tag_for_url_unmarked.xml +31 -0
- data/spec/sample_feeds/itunes.xml +67 -0
- data/spec/sample_feeds/pet_atom.xml +497 -0
- data/spec/spec_helper.rb +88 -0
- metadata +229 -0
data/spec/spec_helper.rb
ADDED
@@ -0,0 +1,88 @@
|
|
1
|
+
begin
|
2
|
+
require 'simplecov'
|
3
|
+
require 'json'
|
4
|
+
SimpleCov.start do
|
5
|
+
add_filter "/spec/"
|
6
|
+
end
|
7
|
+
rescue LoadError
|
8
|
+
end
|
9
|
+
|
10
|
+
require File.expand_path(File.dirname(__FILE__) + '/../lib/feedjira')
|
11
|
+
|
12
|
+
def load_sample(filename)
|
13
|
+
File.read("#{File.dirname(__FILE__)}/sample_feeds/#{filename}")
|
14
|
+
end
|
15
|
+
|
16
|
+
def sample_atom_feed
|
17
|
+
load_sample("AmazonWebServicesBlog.xml")
|
18
|
+
end
|
19
|
+
|
20
|
+
def sample_atom_xhtml_feed
|
21
|
+
load_sample("pet_atom.xml")
|
22
|
+
end
|
23
|
+
|
24
|
+
def sample_atom_feed_line_breaks
|
25
|
+
load_sample("AtomFeedWithSpacesAroundEquals.xml")
|
26
|
+
end
|
27
|
+
|
28
|
+
def sample_atom_entry_content
|
29
|
+
load_sample("AmazonWebServicesBlogFirstEntryContent.xml")
|
30
|
+
end
|
31
|
+
|
32
|
+
def sample_itunes_feed
|
33
|
+
load_sample("itunes.xml")
|
34
|
+
end
|
35
|
+
|
36
|
+
def sample_itunes_feed_with_spaces
|
37
|
+
load_sample("ITunesWithSpacesInAttributes.xml")
|
38
|
+
end
|
39
|
+
|
40
|
+
def sample_rdf_feed
|
41
|
+
load_sample("HREFConsideredHarmful.xml")
|
42
|
+
end
|
43
|
+
|
44
|
+
def sample_rdf_entry_content
|
45
|
+
load_sample("HREFConsideredHarmfulFirstEntry.xml")
|
46
|
+
end
|
47
|
+
|
48
|
+
def sample_rss_feed_burner_feed
|
49
|
+
load_sample("TechCrunch.xml")
|
50
|
+
end
|
51
|
+
|
52
|
+
def sample_rss_feed_burner_entry_content
|
53
|
+
load_sample("TechCrunchFirstEntry.xml")
|
54
|
+
end
|
55
|
+
|
56
|
+
def sample_rss_feed_burner_entry_description
|
57
|
+
load_sample("TechCrunchFirstEntryDescription.xml")
|
58
|
+
end
|
59
|
+
|
60
|
+
def sample_rss_feed
|
61
|
+
load_sample("TenderLovemaking.xml")
|
62
|
+
end
|
63
|
+
|
64
|
+
def sample_rss_entry_content
|
65
|
+
load_sample("TenderLovemakingFirstEntry.xml")
|
66
|
+
end
|
67
|
+
|
68
|
+
def sample_feedburner_atom_feed
|
69
|
+
load_sample("PaulDixExplainsNothing.xml")
|
70
|
+
end
|
71
|
+
|
72
|
+
def sample_feedburner_atom_entry_content
|
73
|
+
load_sample("PaulDixExplainsNothingFirstEntryContent.xml")
|
74
|
+
end
|
75
|
+
|
76
|
+
def sample_wfw_feed
|
77
|
+
load_sample("PaulDixExplainsNothingWFW.xml")
|
78
|
+
end
|
79
|
+
|
80
|
+
def sample_google_docs_list_feed
|
81
|
+
load_sample("GoogleDocsList.xml")
|
82
|
+
end
|
83
|
+
|
84
|
+
RSpec.configure do |config|
|
85
|
+
config.treat_symbols_as_metadata_keys_with_true_values = true
|
86
|
+
config.run_all_when_everything_filtered = true
|
87
|
+
config.filter_run :focus
|
88
|
+
end
|
metadata
ADDED
@@ -0,0 +1,229 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: feedjira
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.9.0
|
5
|
+
platform: ruby
|
6
|
+
authors:
|
7
|
+
- Paul Dix
|
8
|
+
- Julien Kirch
|
9
|
+
- Ezekiel Templin
|
10
|
+
- Jon Allured
|
11
|
+
autorequire:
|
12
|
+
bindir: bin
|
13
|
+
cert_chain: []
|
14
|
+
date: 2014-03-17 00:00:00.000000000 Z
|
15
|
+
dependencies:
|
16
|
+
- !ruby/object:Gem::Dependency
|
17
|
+
name: sax-machine
|
18
|
+
requirement: !ruby/object:Gem::Requirement
|
19
|
+
requirements:
|
20
|
+
- - ~>
|
21
|
+
- !ruby/object:Gem::Version
|
22
|
+
version: 0.2.1
|
23
|
+
type: :runtime
|
24
|
+
prerelease: false
|
25
|
+
version_requirements: !ruby/object:Gem::Requirement
|
26
|
+
requirements:
|
27
|
+
- - ~>
|
28
|
+
- !ruby/object:Gem::Version
|
29
|
+
version: 0.2.1
|
30
|
+
- !ruby/object:Gem::Dependency
|
31
|
+
name: curb
|
32
|
+
requirement: !ruby/object:Gem::Requirement
|
33
|
+
requirements:
|
34
|
+
- - ~>
|
35
|
+
- !ruby/object:Gem::Version
|
36
|
+
version: 0.8.1
|
37
|
+
type: :runtime
|
38
|
+
prerelease: false
|
39
|
+
version_requirements: !ruby/object:Gem::Requirement
|
40
|
+
requirements:
|
41
|
+
- - ~>
|
42
|
+
- !ruby/object:Gem::Version
|
43
|
+
version: 0.8.1
|
44
|
+
- !ruby/object:Gem::Dependency
|
45
|
+
name: loofah
|
46
|
+
requirement: !ruby/object:Gem::Requirement
|
47
|
+
requirements:
|
48
|
+
- - ~>
|
49
|
+
- !ruby/object:Gem::Version
|
50
|
+
version: 1.2.1
|
51
|
+
type: :runtime
|
52
|
+
prerelease: false
|
53
|
+
version_requirements: !ruby/object:Gem::Requirement
|
54
|
+
requirements:
|
55
|
+
- - ~>
|
56
|
+
- !ruby/object:Gem::Version
|
57
|
+
version: 1.2.1
|
58
|
+
- !ruby/object:Gem::Dependency
|
59
|
+
name: rspec
|
60
|
+
requirement: !ruby/object:Gem::Requirement
|
61
|
+
requirements:
|
62
|
+
- - ~>
|
63
|
+
- !ruby/object:Gem::Version
|
64
|
+
version: 2.14.0
|
65
|
+
type: :development
|
66
|
+
prerelease: false
|
67
|
+
version_requirements: !ruby/object:Gem::Requirement
|
68
|
+
requirements:
|
69
|
+
- - ~>
|
70
|
+
- !ruby/object:Gem::Version
|
71
|
+
version: 2.14.0
|
72
|
+
description: A library designed to retrieve and parse feeds as quickly as possible
|
73
|
+
email: feedjira@gmail.com
|
74
|
+
executables: []
|
75
|
+
extensions: []
|
76
|
+
extra_rdoc_files: []
|
77
|
+
files:
|
78
|
+
- .gitignore
|
79
|
+
- .rspec
|
80
|
+
- .travis.yml
|
81
|
+
- CHANGELOG.md
|
82
|
+
- Gemfile
|
83
|
+
- Guardfile
|
84
|
+
- README.md
|
85
|
+
- Rakefile
|
86
|
+
- benchmarks/README.md
|
87
|
+
- benchmarks/basic.rb
|
88
|
+
- benchmarks/feed_list.txt
|
89
|
+
- benchmarks/feed_xml/apple.xml
|
90
|
+
- benchmarks/feed_xml/cnn.xml
|
91
|
+
- benchmarks/feed_xml/daring_fireball.xml
|
92
|
+
- benchmarks/feed_xml/engadget.xml
|
93
|
+
- benchmarks/feed_xml/feedjira_commits.xml
|
94
|
+
- benchmarks/feed_xml/gizmodo.xml
|
95
|
+
- benchmarks/feed_xml/loop.xml
|
96
|
+
- benchmarks/feed_xml/rails.xml
|
97
|
+
- benchmarks/feed_xml/white_house.xml
|
98
|
+
- benchmarks/feed_xml/xkcd.xml
|
99
|
+
- benchmarks/fetching_systems.rb
|
100
|
+
- benchmarks/other_libraries.rb
|
101
|
+
- feedjira.gemspec
|
102
|
+
- lib/feedjira.rb
|
103
|
+
- lib/feedjira/core_ext.rb
|
104
|
+
- lib/feedjira/core_ext/date.rb
|
105
|
+
- lib/feedjira/core_ext/string.rb
|
106
|
+
- lib/feedjira/core_ext/time.rb
|
107
|
+
- lib/feedjira/feed.rb
|
108
|
+
- lib/feedjira/feed_entry_utilities.rb
|
109
|
+
- lib/feedjira/feed_utilities.rb
|
110
|
+
- lib/feedjira/parser.rb
|
111
|
+
- lib/feedjira/parser/atom.rb
|
112
|
+
- lib/feedjira/parser/atom_entry.rb
|
113
|
+
- lib/feedjira/parser/atom_feed_burner.rb
|
114
|
+
- lib/feedjira/parser/atom_feed_burner_entry.rb
|
115
|
+
- lib/feedjira/parser/google_docs_atom.rb
|
116
|
+
- lib/feedjira/parser/google_docs_atom_entry.rb
|
117
|
+
- lib/feedjira/parser/itunes_rss.rb
|
118
|
+
- lib/feedjira/parser/itunes_rss_item.rb
|
119
|
+
- lib/feedjira/parser/itunes_rss_owner.rb
|
120
|
+
- lib/feedjira/parser/rss.rb
|
121
|
+
- lib/feedjira/parser/rss_entry.rb
|
122
|
+
- lib/feedjira/parser/rss_feed_burner.rb
|
123
|
+
- lib/feedjira/parser/rss_feed_burner_entry.rb
|
124
|
+
- lib/feedjira/version.rb
|
125
|
+
- spec/feedjira/feed_entry_utilities_spec.rb
|
126
|
+
- spec/feedjira/feed_spec.rb
|
127
|
+
- spec/feedjira/feed_utilities_spec.rb
|
128
|
+
- spec/feedjira/parser/atom_entry_spec.rb
|
129
|
+
- spec/feedjira/parser/atom_feed_burner_entry_spec.rb
|
130
|
+
- spec/feedjira/parser/atom_feed_burner_spec.rb
|
131
|
+
- spec/feedjira/parser/atom_spec.rb
|
132
|
+
- spec/feedjira/parser/google_docs_atom_entry_spec.rb
|
133
|
+
- spec/feedjira/parser/google_docs_atom_spec.rb
|
134
|
+
- spec/feedjira/parser/itunes_rss_item_spec.rb
|
135
|
+
- spec/feedjira/parser/itunes_rss_owner_spec.rb
|
136
|
+
- spec/feedjira/parser/itunes_rss_spec.rb
|
137
|
+
- spec/feedjira/parser/rss_entry_spec.rb
|
138
|
+
- spec/feedjira/parser/rss_feed_burner_entry_spec.rb
|
139
|
+
- spec/feedjira/parser/rss_feed_burner_spec.rb
|
140
|
+
- spec/feedjira/parser/rss_spec.rb
|
141
|
+
- spec/sample_feeds/AmazonWebServicesBlog.xml
|
142
|
+
- spec/sample_feeds/AmazonWebServicesBlogFirstEntryContent.xml
|
143
|
+
- spec/sample_feeds/AtomFeedWithSpacesAroundEquals.xml
|
144
|
+
- spec/sample_feeds/FeedBurnerUrlNoAlternate.xml
|
145
|
+
- spec/sample_feeds/GoogleDocsList.xml
|
146
|
+
- spec/sample_feeds/HREFConsideredHarmful.xml
|
147
|
+
- spec/sample_feeds/HREFConsideredHarmfulFirstEntry.xml
|
148
|
+
- spec/sample_feeds/ITunesWithSpacesInAttributes.xml
|
149
|
+
- spec/sample_feeds/PaulDixExplainsNothing.xml
|
150
|
+
- spec/sample_feeds/PaulDixExplainsNothingAlternate.xml
|
151
|
+
- spec/sample_feeds/PaulDixExplainsNothingFirstEntryContent.xml
|
152
|
+
- spec/sample_feeds/PaulDixExplainsNothingWFW.xml
|
153
|
+
- spec/sample_feeds/SamRuby.xml
|
154
|
+
- spec/sample_feeds/TechCrunch.xml
|
155
|
+
- spec/sample_feeds/TechCrunchFirstEntry.xml
|
156
|
+
- spec/sample_feeds/TechCrunchFirstEntryDescription.xml
|
157
|
+
- spec/sample_feeds/TenderLovemaking.xml
|
158
|
+
- spec/sample_feeds/TenderLovemakingFirstEntry.xml
|
159
|
+
- spec/sample_feeds/TrotterCashionHome.xml
|
160
|
+
- spec/sample_feeds/TypePadNews.xml
|
161
|
+
- spec/sample_feeds/atom_with_link_tag_for_url_unmarked.xml
|
162
|
+
- spec/sample_feeds/itunes.xml
|
163
|
+
- spec/sample_feeds/pet_atom.xml
|
164
|
+
- spec/spec_helper.rb
|
165
|
+
homepage: http://feedjira.com
|
166
|
+
licenses:
|
167
|
+
- MIT
|
168
|
+
metadata: {}
|
169
|
+
post_install_message:
|
170
|
+
rdoc_options: []
|
171
|
+
require_paths:
|
172
|
+
- lib
|
173
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
174
|
+
requirements:
|
175
|
+
- - '>='
|
176
|
+
- !ruby/object:Gem::Version
|
177
|
+
version: '0'
|
178
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
179
|
+
requirements:
|
180
|
+
- - '>='
|
181
|
+
- !ruby/object:Gem::Version
|
182
|
+
version: '0'
|
183
|
+
requirements: []
|
184
|
+
rubyforge_project:
|
185
|
+
rubygems_version: 2.1.11
|
186
|
+
signing_key:
|
187
|
+
specification_version: 4
|
188
|
+
summary: A feed fetching and parsing library
|
189
|
+
test_files:
|
190
|
+
- spec/feedjira/feed_entry_utilities_spec.rb
|
191
|
+
- spec/feedjira/feed_spec.rb
|
192
|
+
- spec/feedjira/feed_utilities_spec.rb
|
193
|
+
- spec/feedjira/parser/atom_entry_spec.rb
|
194
|
+
- spec/feedjira/parser/atom_feed_burner_entry_spec.rb
|
195
|
+
- spec/feedjira/parser/atom_feed_burner_spec.rb
|
196
|
+
- spec/feedjira/parser/atom_spec.rb
|
197
|
+
- spec/feedjira/parser/google_docs_atom_entry_spec.rb
|
198
|
+
- spec/feedjira/parser/google_docs_atom_spec.rb
|
199
|
+
- spec/feedjira/parser/itunes_rss_item_spec.rb
|
200
|
+
- spec/feedjira/parser/itunes_rss_owner_spec.rb
|
201
|
+
- spec/feedjira/parser/itunes_rss_spec.rb
|
202
|
+
- spec/feedjira/parser/rss_entry_spec.rb
|
203
|
+
- spec/feedjira/parser/rss_feed_burner_entry_spec.rb
|
204
|
+
- spec/feedjira/parser/rss_feed_burner_spec.rb
|
205
|
+
- spec/feedjira/parser/rss_spec.rb
|
206
|
+
- spec/sample_feeds/AmazonWebServicesBlog.xml
|
207
|
+
- spec/sample_feeds/AmazonWebServicesBlogFirstEntryContent.xml
|
208
|
+
- spec/sample_feeds/AtomFeedWithSpacesAroundEquals.xml
|
209
|
+
- spec/sample_feeds/FeedBurnerUrlNoAlternate.xml
|
210
|
+
- spec/sample_feeds/GoogleDocsList.xml
|
211
|
+
- spec/sample_feeds/HREFConsideredHarmful.xml
|
212
|
+
- spec/sample_feeds/HREFConsideredHarmfulFirstEntry.xml
|
213
|
+
- spec/sample_feeds/ITunesWithSpacesInAttributes.xml
|
214
|
+
- spec/sample_feeds/PaulDixExplainsNothing.xml
|
215
|
+
- spec/sample_feeds/PaulDixExplainsNothingAlternate.xml
|
216
|
+
- spec/sample_feeds/PaulDixExplainsNothingFirstEntryContent.xml
|
217
|
+
- spec/sample_feeds/PaulDixExplainsNothingWFW.xml
|
218
|
+
- spec/sample_feeds/SamRuby.xml
|
219
|
+
- spec/sample_feeds/TechCrunch.xml
|
220
|
+
- spec/sample_feeds/TechCrunchFirstEntry.xml
|
221
|
+
- spec/sample_feeds/TechCrunchFirstEntryDescription.xml
|
222
|
+
- spec/sample_feeds/TenderLovemaking.xml
|
223
|
+
- spec/sample_feeds/TenderLovemakingFirstEntry.xml
|
224
|
+
- spec/sample_feeds/TrotterCashionHome.xml
|
225
|
+
- spec/sample_feeds/TypePadNews.xml
|
226
|
+
- spec/sample_feeds/atom_with_link_tag_for_url_unmarked.xml
|
227
|
+
- spec/sample_feeds/itunes.xml
|
228
|
+
- spec/sample_feeds/pet_atom.xml
|
229
|
+
- spec/spec_helper.rb
|