worth_watching 0.1.4 → 0.1.5

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: fbe2f73035e78be1cef282aed466d0c4c73cedd6
4
- data.tar.gz: 84ef48e063eaaccc5b2d703c44c13254d79b1901
3
+ metadata.gz: 8625dab449c3f89b26961b8a19958909187bf6fe
4
+ data.tar.gz: 55669a5c1404095f1a8ddfe9846fbc61e2597ce3
5
5
  SHA512:
6
- metadata.gz: 83ecc37172b01cb65dd9971a37e74abc5cd09a51662e240bc1e3c36ce337d8c192e4b4d7fa41fc1e2710f642a3f50826f98076741cc01355eef17cdfa8b17b16
7
- data.tar.gz: 63eda6ed675dfd738f3bf022de6989741a809972b30f46b8624b8d7f6d5d66fa883004fa2124609933fd95bc667ccae7c8a02b7ddaca7ae51d6966521509d34f
6
+ metadata.gz: c522013091038f067811b6003c0c5b7e3325952f7c2b810d61128582903d0f0ad5038f08579ae13d26704ff012151c4891cccdf4544ce79922b791f6c8a9a45e
7
+ data.tar.gz: 57cd2e5787a86ed258d8248a696d0343546dfb18e26c4a714a7db0124eb77f9a6ae91cfdc351a847eba19e0923c8fe0212aa8b86fe8aa73b0f32309d45bc7414
@@ -1,5 +1,4 @@
1
1
  require 'nokogiri'
2
- require 'open-uri'
3
2
  require 'typhoeus'
4
3
  require 'json'
5
4
 
@@ -114,8 +113,8 @@ module WorthWatching
114
113
 
115
114
  # Retrieves and updates the current movie's Metacritic rating and URL
116
115
  def retrieve_metacritic_info
117
- metacritic_page = Nokogiri::HTML(open("http://www.metacritic.com/search/"\
118
- "movie/#{CGI.escape(@movie.title)}/results"))
116
+ metacritic_page = Nokogiri::HTML(Typhoeus.get("http://www.metacritic.com/search/"\
117
+ "movie/#{CGI.escape(@movie.title)}/results").body)
119
118
 
120
119
  scraped_rating = metacritic_page.css('.first_result .metascore_w').text
121
120
  metacritic_url = "http://www.metacritic.com#{metacritic_page.at_css('.first_result a').attr(:href)}"
@@ -1,3 +1,3 @@
1
1
  module WorthWatching
2
- VERSION = "0.1.4"
2
+ VERSION = "0.1.5"
3
3
  end
@@ -6,13 +6,13 @@ require 'worth_watching/version'
6
6
  Gem::Specification.new do |spec|
7
7
  spec.name = "worth_watching"
8
8
  spec.version = WorthWatching::VERSION
9
- spec.authors = ["http://github.com/alessndro"]
9
+ spec.authors = ["http://github.com/alssndro"]
10
10
  spec.email = ["sandro@?.com"]
11
11
  spec.description = %q{Retrieve the ratings of a movie from IMDB, Rotten
12
12
  Tomatoes and Metacritic}
13
13
  spec.summary = %q{Retrieve the ratings of a movie from IMDB, Rotten
14
14
  Tomatoes and Metacritic}
15
- spec.homepage = "http://github.com/alessndro/worth_watching"
15
+ spec.homepage = "http://github.com/alssndro/worth_watching"
16
16
  spec.license = "MIT"
17
17
 
18
18
  spec.files = `git ls-files`.split($/)
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: worth_watching
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.4
4
+ version: 0.1.5
5
5
  platform: ruby
6
6
  authors:
7
- - http://github.com/alessndro
7
+ - http://github.com/alssndro
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-04-05 00:00:00.000000000 Z
11
+ date: 2014-08-02 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -156,7 +156,7 @@ files:
156
156
  - spec/unit/movie_spec.rb
157
157
  - spec/unit/written_review_spec.rb
158
158
  - worth_watching.gemspec
159
- homepage: http://github.com/alessndro/worth_watching
159
+ homepage: http://github.com/alssndro/worth_watching
160
160
  licenses:
161
161
  - MIT
162
162
  metadata: {}
@@ -176,7 +176,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
176
176
  version: '0'
177
177
  requirements: []
178
178
  rubyforge_project:
179
- rubygems_version: 2.2.0
179
+ rubygems_version: 2.4.1
180
180
  signing_key:
181
181
  specification_version: 4
182
182
  summary: Retrieve the ratings of a movie from IMDB, Rotten Tomatoes and Metacritic