spotlite 0.8.8 → 0.8.9

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: cbb73c69f03b2b369f8b30c52b0b6ee25192d12c
4
- data.tar.gz: 56e6b89a40800aacb5b1de371d5109750d6325fd
3
+ metadata.gz: 5e966ca60bb8bde30a0dc55d69bbb2b9fc8b6a04
4
+ data.tar.gz: 05876aeca48ee0c0a44603128fa54aa4a2316729
5
5
  SHA512:
6
- metadata.gz: 727afe4f08445d691fcba285e02a29f50b04cbe4226a68bd23b93080d79465084a40d75b128f3223763f37f9cf68a548304884c51dab1192728d64a864268ebd
7
- data.tar.gz: 14c8e3af3cdb0dad3591511516201c3e59e82e5090a9aaa23c45c0066aa4785a937b309ead1727d3f4c28d130ec6c698ea3a3c55b63e6d4d4a5931ef4f6ff6d0
6
+ metadata.gz: 6ebb4fc73c70a17434c24329e4745f63eff42ca498cca61a88410868a0368d32c8f3310f556af712dc28221b8c88d1701f7df3f56799dfae7b22dee019e4e0a1
7
+ data.tar.gz: e6ef5ddd24b683af81eb595a8f3114c1fbdf56fc451d5d1b4e450b36735890a4a26441670741a82d020ad394db295c02c590e2d165273a464070a6b64add0fe2
@@ -1,3 +1,7 @@
1
+ ## v0.8.9 08-Jun-2016
2
+
3
+ * Added critic review source URL parsing
4
+
1
5
  ## v0.8.8 22-May-2016
2
6
 
3
7
  * Ignore missing taglines placeholder
@@ -320,10 +320,17 @@ module Spotlite
320
320
  reviews.css("tr[itemprop='reviews']").map do |review|
321
321
  source = review.at("b[itemprop='publisher'] span[itemprop='name']").text
322
322
  author = review.at("span[itemprop='author'] span[itemprop='name']").text
323
+ url = review.at("a[itemprop='url']")['href'] rescue nil
323
324
  excerpt = review.at("div[itemprop='reviewbody']").text.strip
324
325
  score = review.at("span[itemprop='ratingValue']").text.to_i
325
326
 
326
- array << { :source => source, :author => author, :excerpt => excerpt, :score => score }
327
+ array << {
328
+ source: source.empty? ? nil : source,
329
+ author: author.empty? ? nil : author,
330
+ url: url,
331
+ excerpt: excerpt,
332
+ score: score
333
+ }
327
334
  end
328
335
 
329
336
  array
@@ -1,3 +1,3 @@
1
1
  module Spotlite
2
- VERSION = '0.8.8'
2
+ VERSION = '0.8.9'
3
3
  end
@@ -164,6 +164,7 @@ describe "Spotlite::Movie" do
164
164
  {
165
165
  :source => "Chicago Sun-Times",
166
166
  :author => "Roger Ebert",
167
+ :url => nil,
167
168
  :excerpt => "A visually dazzling cyberadventure, full of kinetic excitement, but it retreats to formula just when it's getting interesting.",
168
169
  :score => 75
169
170
  }
@@ -171,7 +172,8 @@ describe "Spotlite::Movie" do
171
172
  @movie.critic_reviews.should include(
172
173
  {
173
174
  :source => "Chicago Tribune",
174
- :author => "",
175
+ :author => nil,
176
+ :url => "http://metromix.com/top/1,1419,M-Metromix-Home-X!ArticleDetail-3409,00.html?search_area=Articles&channel=Home",
175
177
  :excerpt => "The writing remains more intelligent than most thrillers, and the action is executed with such panache that even if you don't buy the reality of The Matrix, it's a helluva place to visit.",
176
178
  :score => 75
177
179
  }
@@ -181,6 +183,7 @@ describe "Spotlite::Movie" do
181
183
  {
182
184
  :source => "Los Angeles Times",
183
185
  :author => "Kenneth Turan",
186
+ :url => "http://www.calendarlive.com/top/1,1419,L-LATimes-Movies-X!ArticleDetail-5096,00.html?search_area=Movies&channel=Movies",
184
187
  :excerpt => "A wildly cinematic futuristic thriller that is determined to overpower the imagination, The Matrix combines traditional science-fiction premises with spanking new visual technology in a way that almost defies description.",
185
188
  :score => 90
186
189
  }
@@ -19,6 +19,7 @@ Gem::Specification.new do |gem|
19
19
 
20
20
  gem.add_dependency 'httparty'
21
21
  gem.add_dependency 'nokogiri', '~> 1.6'
22
+ gem.add_development_dependency 'rake'
22
23
  gem.add_development_dependency 'rspec', '~> 2.14'
23
24
  gem.add_development_dependency 'fakeweb', '~> 1.3'
24
25
  gem.add_development_dependency 'pry'
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: spotlite
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.8.8
4
+ version: 0.8.9
5
5
  platform: ruby
6
6
  authors:
7
7
  - Artem Pakk
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-05-22 00:00:00.000000000 Z
11
+ date: 2016-06-08 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: httparty
@@ -38,6 +38,20 @@ dependencies:
38
38
  - - "~>"
39
39
  - !ruby/object:Gem::Version
40
40
  version: '1.6'
41
+ - !ruby/object:Gem::Dependency
42
+ name: rake
43
+ requirement: !ruby/object:Gem::Requirement
44
+ requirements:
45
+ - - ">="
46
+ - !ruby/object:Gem::Version
47
+ version: '0'
48
+ type: :development
49
+ prerelease: false
50
+ version_requirements: !ruby/object:Gem::Requirement
51
+ requirements:
52
+ - - ">="
53
+ - !ruby/object:Gem::Version
54
+ version: '0'
41
55
  - !ruby/object:Gem::Dependency
42
56
  name: rspec
43
57
  requirement: !ruby/object:Gem::Requirement