worth_watching 0.1.3 → 0.1.4

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: 32db0def22b288bbdc91ff608a9a60d9fbdadc68
4
- data.tar.gz: 6a272b3d5c97d754a73598f3ebc57fb34c5f082b
3
+ metadata.gz: fbe2f73035e78be1cef282aed466d0c4c73cedd6
4
+ data.tar.gz: 84ef48e063eaaccc5b2d703c44c13254d79b1901
5
5
  SHA512:
6
- metadata.gz: 06de2383b5973961fa0b65066a17df9623d7589c44e250042474eea71c74ea0d8537c8aa29a52588cb225a86db45ed41b4caae4ba2b0bbc3fd9ffb5a0808d3d7
7
- data.tar.gz: 72713bed69935e3a25a90918cb0358208b0fdb7fa820876cc0df4ee1d4f3e93869b8ee9fea12af7a5f1a2fb9136fa888b14c68487c8db6661d35101b381bd724
6
+ metadata.gz: 83ecc37172b01cb65dd9971a37e74abc5cd09a51662e240bc1e3c36ce337d8c192e4b4d7fa41fc1e2710f642a3f50826f98076741cc01355eef17cdfa8b17b16
7
+ data.tar.gz: 63eda6ed675dfd738f3bf022de6989741a809972b30f46b8624b8d7f6d5d66fa883004fa2124609933fd95bc667ccae7c8a02b7ddaca7ae51d6966521509d34f
@@ -99,7 +99,7 @@ module WorthWatching
99
99
 
100
100
  # Retrieves and updates the current movie's IMDb rating
101
101
  def retrieve_imdb_info
102
- omdb_response = JSON.parse(Typhoeus.get("http://www.omdbapi.com/?i=tt#{@movie.imdb_id}/").body)
102
+ omdb_response = JSON.parse(Typhoeus.get("http://www.omdbapi.com/?i=tt#{@movie.imdb_id}").body)
103
103
 
104
104
  if omdb_response["Response"] == "True"
105
105
  if omdb_response["imdbRating"] == "N/A"
@@ -132,7 +132,7 @@ module WorthWatching
132
132
 
133
133
  # Scrapes and sets the IMDb rating of the current movie from its IMDb page
134
134
  def scrape_imdb_rating
135
- imdb_url = "http://m.imdb.com/title/tt#{@movie.imdb_id}"
135
+ imdb_url = "http://m.imdb.com/title/tt#{@movie.imdb_id}/"
136
136
 
137
137
  imdb_page = Nokogiri::HTML(Typhoeus.get(imdb_url).body)
138
138
 
@@ -1,3 +1,3 @@
1
1
  module WorthWatching
2
- VERSION = "0.1.3"
2
+ VERSION = "0.1.4"
3
3
  end
@@ -105,7 +105,7 @@ describe 'WorthWatching::Aggregator' do
105
105
  stub_request(:get, "http://www.metacritic.com/search/movie/Captain+America:+The+Winter+Soldier/results").to_return(:status => 200, :body => json_response,:headers => {"content-type"=>["text/html; charset=utf-8"]})
106
106
 
107
107
  json_response = File.read(File.dirname(__FILE__) + "/../support/html_responses/captain_america_imdb.html")
108
- stub_request(:get, "http://m.imdb.com/title/tt1843866").to_return(:status => 200, :body => json_response,:headers => {"content-type"=>["text/html; charset=utf-8"]})
108
+ stub_request(:get, "http://m.imdb.com/title/tt1843866/").to_return(:status => 200, :body => json_response,:headers => {"content-type"=>["text/html; charset=utf-8"]})
109
109
  end
110
110
 
111
111
  it "scrapes the rating directly from the movie's IMDb page" do
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: worth_watching
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.3
4
+ version: 0.1.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - http://github.com/alessndro