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 +4 -4
- data/lib/worth_watching/aggregator.rb +2 -3
- data/lib/worth_watching/version.rb +1 -1
- data/worth_watching.gemspec +2 -2
- metadata +5 -5
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 8625dab449c3f89b26961b8a19958909187bf6fe
|
4
|
+
data.tar.gz: 55669a5c1404095f1a8ddfe9846fbc61e2597ce3
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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(
|
118
|
-
|
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)}"
|
data/worth_watching.gemspec
CHANGED
@@ -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/
|
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/
|
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
|
+
version: 0.1.5
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
|
-
- http://github.com/
|
7
|
+
- http://github.com/alssndro
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-
|
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/
|
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.
|
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
|