google_movies47 0.1.5 → 0.1.6

Sign up to get free protection for your applications and to get access to all the features.
data/README.md CHANGED
@@ -1,4 +1,4 @@
1
- # MovieShowTimes
1
+ # GoogleMovies47
2
2
 
3
3
  Get Movies Show Times for all theaters near a given location.
4
4
 
@@ -8,7 +8,7 @@ The gem crawls and parses Google Movies pages.
8
8
 
9
9
  Add this line to your application's Gemfile:
10
10
 
11
- gem 'movie_show_times'
11
+ gem 'google_movies47'
12
12
 
13
13
  And then execute:
14
14
 
@@ -16,7 +16,7 @@ And then execute:
16
16
 
17
17
  Or install it yourself as:
18
18
 
19
- $ gem install movie_show_times
19
+ $ gem install google_movies47
20
20
 
21
21
  ## Usage
22
22
 
@@ -27,9 +27,9 @@ Or install it yourself as:
27
27
 
28
28
  A location is required to initialize the crawling. By default, it gets show times for the current date in English.
29
29
 
30
- movieShowTimes = MovieShowTimes::Crawler.new({ :city => 'Buenos Aires', :state => 'Argentina' })
30
+ movieShowTimes = GoogleMovies47::Crawler.new({ :city => 'Buenos Aires', :state => 'Argentina' })
31
31
 
32
- theater = movieShowTimes.theaters['Monumental']
32
+ theater = movieShowTimes.theaters[0]
33
33
  puts theater # => { :name => 'Monumental', :info => 'Lavalle 780, Buenos Aires, Argentina - 0-11-4393-9008',
34
34
  :movies => [ ... ]
35
35
  }
@@ -45,13 +45,13 @@ A location is required to initialize the crawling. By default, it gets show time
45
45
 
46
46
  You can retrieve movie show times for following days. There is no definition for how far in the future will this information be available, so use with caution as it may be the cause for retrieving no show times at all.
47
47
 
48
- movieShowTimes = MovieShowTimes::Crawler.new({ :city => 'Buenos Aires', :state => 'Argentina',
48
+ movieShowTimes = GoogleMovies47::Crawler.new({ :city => 'Buenos Aires', :state => 'Argentina',
49
49
  :days_ahead => 2
50
50
  })
51
51
 
52
52
  Getting show times info in Spanish:
53
53
 
54
- movieShowTimes = MovieShowTimes::Crawler.new({
54
+ movieShowTimes = GoogleMovies47::Crawler.new({
55
55
  :city => 'Buenos Aires',
56
56
  :state => 'Argentina',
57
57
  :language => 'es'
@@ -20,7 +20,7 @@ module GoogleMovies47
20
20
  @parser = GoogleMovies47::Parser.new(language)
21
21
 
22
22
  search_url = "http://www.google.com/movies?hl=#{language}" \
23
- "&near=#{CGI.escape(options[:city])}+#{CGI.escape(options[:state])}&date=#{days_ahead}"
23
+ "&near=#{options[:city]}%2C+#{options[:state]}&date=#{days_ahead}"
24
24
 
25
25
  @agent = Mechanize.new
26
26
  page = @agent.get(search_url)
@@ -1,3 +1,3 @@
1
1
  module GoogleMovies47
2
- VERSION = "0.1.5"
2
+ VERSION = "0.1.6"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: google_movies47
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.5
4
+ version: 0.1.6
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -10,7 +10,7 @@ authors:
10
10
  autorequire:
11
11
  bindir: bin
12
12
  cert_chain: []
13
- date: 2012-06-30 00:00:00.000000000 Z
13
+ date: 2012-07-12 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: mechanize