spotlite 0.8.4 → 0.8.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: b8a1a68575db0eb0a8cb9084221a95453633e8a3
4
- data.tar.gz: ac533b22620de905879c7dfd5716ba44c0cfb349
3
+ metadata.gz: a779eb855e99311dbbe095769aaca6e4930d0f65
4
+ data.tar.gz: 44ca91ac0c99b9baa1bd2490de56383841d8b71d
5
5
  SHA512:
6
- metadata.gz: 51dfcd1dfef01f4a14bf98890817d1b9be9d8f761d41bfca6f5d7b7254980e4098de0c7d8bed6afd35d538052895eefb6693e82383257a3993703ae2881d8084
7
- data.tar.gz: 35bc385358ff3cd2a36b943fb4fcb9d9d8efb30e8b633a02263a8690ddbfa5f8c035a226e98f2ca456e9d634fb65ea19fb1f65d34ecdf4710f317b88855c5d63
6
+ metadata.gz: 7c353938aafb07a674599a91495b7c7f09d5e3047559db1a7a631d7d86e8761b6974fecd08f8a275d7714063d55377eead4326191b15b2a6b89f6e6c3070202f
7
+ data.tar.gz: 9a00bf57db9d86049a3540a82c615fa54e61ded309686b080af33b184d758499e9a02e93da036f9a571d801dedecde8c963997fc41616f3e66df9bb5c0e0dbc5
@@ -103,6 +103,11 @@ module Spotlite
103
103
  details.at("#titleStoryLine div[itemprop='description'] p").text.strip.clean_description rescue nil
104
104
  end
105
105
 
106
+ # Returns a list of plot summaries as an array of strings
107
+ def summaries
108
+ plot_summaries.css("p.plotSummary").map { |summary| summary.text.strip }
109
+ end
110
+
106
111
  # Returns content rating as a string
107
112
  def content_rating
108
113
  details.at(".infobar meta[itemprop='contentRating']")['content'] rescue nil
@@ -384,6 +389,10 @@ module Spotlite
384
389
  @technical_info ||= open_page('technical')
385
390
  end
386
391
 
392
+ def plot_summaries # :nodoc:
393
+ @plot_summaries ||= open_page('plotsummary')
394
+ end
395
+
387
396
  def open_page(page = nil, query = {}) # :nodoc:
388
397
  response = Spotlite::Client.get "#{@url}#{page}", query: query
389
398
  @response = { code: response.code, message: response.message } and response
@@ -1,3 +1,3 @@
1
1
  module Spotlite
2
- VERSION = '0.8.4'
2
+ VERSION = '0.8.5'
3
3
  end
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.4
4
+ version: 0.8.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Artem Pakk
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-11-17 00:00:00.000000000 Z
11
+ date: 2015-11-22 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: httparty