spotlite 0.8.4 → 0.8.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/lib/spotlite/movie.rb +9 -0
- data/lib/spotlite/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: a779eb855e99311dbbe095769aaca6e4930d0f65
|
4
|
+
data.tar.gz: 44ca91ac0c99b9baa1bd2490de56383841d8b71d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 7c353938aafb07a674599a91495b7c7f09d5e3047559db1a7a631d7d86e8761b6974fecd08f8a275d7714063d55377eead4326191b15b2a6b89f6e6c3070202f
|
7
|
+
data.tar.gz: 9a00bf57db9d86049a3540a82c615fa54e61ded309686b080af33b184d758499e9a02e93da036f9a571d801dedecde8c963997fc41616f3e66df9bb5c0e0dbc5
|
data/lib/spotlite/movie.rb
CHANGED
@@ -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
|
data/lib/spotlite/version.rb
CHANGED
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
|
+
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-
|
11
|
+
date: 2015-11-22 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: httparty
|