fandango 0.2.1 → 1.0.0
Sign up to get free protection for your applications and to get access to all the features.
- data/.irbrc +5 -0
- data/README.md +1 -3
- data/fandango.gemspec +4 -20
- data/lib/fandango.rb +27 -16
- data/lib/fandango/movie.rb +30 -0
- data/lib/fandango/parser.rb +34 -19
- data/lib/fandango/theater.rb +50 -0
- data/lib/fandango/version.rb +1 -1
- data/spec/fandango.spec.rb +23 -25
- data/spec/movie.spec.rb +24 -0
- data/spec/parser.spec.rb +12 -0
- data/spec/spec_helper.rb +5 -3
- data/spec/support/fixtures/item.html +1 -0
- data/spec/support/fixtures/movies_near_me_73142.rss +1 -1
- data/spec/support/fixtures/movies_near_me_73142.yaml +349 -0
- data/spec/support/helpers.rb +25 -0
- data/spec/support/vcr_cassettes/movies_near_me_123BADZIP.yml +48 -0
- data/spec/support/vcr_cassettes/movies_near_me_73142.yml +247 -0
- data/spec/theater.spec.rb +16 -0
- metadata +41 -130
- data/lib/fandango/parsers/movie.rb +0 -30
- data/lib/fandango/parsers/theater.rb +0 -37
- data/lib/feedzirra.rb +0 -4
- data/lib/vendor/feedzirra/.gitignore +0 -6
- data/lib/vendor/feedzirra/.rspec +0 -1
- data/lib/vendor/feedzirra/lib/feedzirra.rb +0 -19
- data/lib/vendor/feedzirra/lib/feedzirra/core_ext.rb +0 -3
- data/lib/vendor/feedzirra/lib/feedzirra/core_ext/date.rb +0 -19
- data/lib/vendor/feedzirra/lib/feedzirra/core_ext/string.rb +0 -9
- data/lib/vendor/feedzirra/lib/feedzirra/feed.rb +0 -383
- data/lib/vendor/feedzirra/lib/feedzirra/feed_entry_utilities.rb +0 -65
- data/lib/vendor/feedzirra/lib/feedzirra/feed_utilities.rb +0 -72
- data/lib/vendor/feedzirra/lib/feedzirra/parser.rb +0 -17
- data/lib/vendor/feedzirra/lib/feedzirra/parser/atom.rb +0 -29
- data/lib/vendor/feedzirra/lib/feedzirra/parser/atom_entry.rb +0 -30
- data/lib/vendor/feedzirra/lib/feedzirra/parser/atom_feed_burner.rb +0 -21
- data/lib/vendor/feedzirra/lib/feedzirra/parser/atom_feed_burner_entry.rb +0 -31
- data/lib/vendor/feedzirra/lib/feedzirra/parser/itunes_rss.rb +0 -50
- data/lib/vendor/feedzirra/lib/feedzirra/parser/itunes_rss_item.rb +0 -32
- data/lib/vendor/feedzirra/lib/feedzirra/parser/itunes_rss_owner.rb +0 -12
- data/lib/vendor/feedzirra/lib/feedzirra/parser/rss.rb +0 -22
- data/lib/vendor/feedzirra/lib/feedzirra/parser/rss_entry.rb +0 -34
- data/lib/vendor/feedzirra/lib/feedzirra/parser/rss_feed_burner.rb +0 -22
- data/lib/vendor/feedzirra/lib/feedzirra/parser/rss_feed_burner_entry.rb +0 -40
- data/lib/vendor/feedzirra/lib/feedzirra/version.rb +0 -3
- data/spec/support/macros.rb +0 -18
@@ -1,40 +0,0 @@
|
|
1
|
-
module Feedzirra
|
2
|
-
|
3
|
-
module Parser
|
4
|
-
# Parser for dealing with RDF feed entries.
|
5
|
-
class RSSFeedBurnerEntry
|
6
|
-
include SAXMachine
|
7
|
-
include FeedEntryUtilities
|
8
|
-
|
9
|
-
element :title
|
10
|
-
|
11
|
-
element :"feedburner:origLink", :as => :url
|
12
|
-
element :link, :as => :url
|
13
|
-
|
14
|
-
element :"dc:creator", :as => :author
|
15
|
-
element :author, :as => :author
|
16
|
-
element :"content:encoded", :as => :content
|
17
|
-
element :description, :as => :summary
|
18
|
-
|
19
|
-
element :pubDate, :as => :published
|
20
|
-
element :pubdate, :as => :published
|
21
|
-
element :"dc:date", :as => :published
|
22
|
-
element :"dc:Date", :as => :published
|
23
|
-
element :"dcterms:created", :as => :published
|
24
|
-
|
25
|
-
|
26
|
-
element :"dcterms:modified", :as => :updated
|
27
|
-
element :issued, :as => :published
|
28
|
-
elements :category, :as => :categories
|
29
|
-
|
30
|
-
element :guid, :as => :entry_id
|
31
|
-
|
32
|
-
def url
|
33
|
-
@url || @link
|
34
|
-
end
|
35
|
-
|
36
|
-
end
|
37
|
-
|
38
|
-
end
|
39
|
-
|
40
|
-
end
|
data/spec/support/macros.rb
DELETED
@@ -1,18 +0,0 @@
|
|
1
|
-
module Macros
|
2
|
-
|
3
|
-
def fixture_file(file_name)
|
4
|
-
File.open("spec/support/fixtures/#{file_name}")
|
5
|
-
end
|
6
|
-
|
7
|
-
# Stub Feedzirra response with stored fixture file content.
|
8
|
-
# This is a workaround because VCR doesn't support Feedzirra yet.
|
9
|
-
# File contents cannot be obtained from Safari because it translates
|
10
|
-
# it into HTML. Use Firefox to get original raw source.
|
11
|
-
def stub_feed(file_name)
|
12
|
-
Curl::Easy.expects(:new).never
|
13
|
-
file_content = fixture_file(file_name).read
|
14
|
-
feed = Feedzirra::Parser::RSS.parse(file_content)
|
15
|
-
Feedzirra::Feed.expects(:fetch_and_parse).returns(feed)
|
16
|
-
end
|
17
|
-
|
18
|
-
end
|