spotlite 0.8.1 → 0.8.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +4 -0
- data/lib/spotlite/movie.rb +1 -1
- data/lib/spotlite/string_extensions.rb +4 -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: 42b6d7da0103a2f748b6ae6538dff22250514052
|
4
|
+
data.tar.gz: d85ae3e8043976bd0cffb516a76b2b1018588555
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: aa3593e02c8f945dc50da2f092ea92da9346fea75792561dba6677633b6498cae7c87c5135d2ddfa92c080f1fc8555559aac59058742f1fcb11660938e24b562
|
7
|
+
data.tar.gz: 5f058b249fa75382094d3e3a3429f14322611d699a21c40f2d9fe3f5640e9425f497ea8b41907c0677fe6d0da1a5b9edbece1c305eb97a714af7c08c8227a686
|
data/CHANGELOG.md
CHANGED
data/lib/spotlite/movie.rb
CHANGED
@@ -234,7 +234,7 @@ module Spotlite
|
|
234
234
|
end.map do |row|
|
235
235
|
imdb_id = row.first_element_child.at('a')['href'].parse_imdb_id
|
236
236
|
name = row.first_element_child.at('a').text.strip_whitespace
|
237
|
-
credits_text = row.last_element_child.text.strip_whitespace
|
237
|
+
credits_text = row.last_element_child.text.strip_whitespace.clean_credits_text
|
238
238
|
|
239
239
|
[imdb_id, name, category, credits_text]
|
240
240
|
end.map do |values|
|
@@ -47,6 +47,10 @@ class String
|
|
47
47
|
gsub("\n", '').gsub(') (', ', ').gsub('(', '').gsub(')', '')
|
48
48
|
end
|
49
49
|
|
50
|
+
def clean_credits_text
|
51
|
+
gsub(' and', '').gsub(' &', '').gsub(') (', ', ').gsub('(', '').gsub(')', '')
|
52
|
+
end
|
53
|
+
|
50
54
|
# Strips "See full summary" and "Written by" in movie description and storyline
|
51
55
|
def clean_description
|
52
56
|
gsub(/((?:\sWritten by)(?!.*(?:\sWritten by)).*)/m, '').gsub(/((?:\sSee full summary)(?!.*(?:\sSee full summary)).*)/m, '').strip
|
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.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Artem Pakk
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-07-
|
11
|
+
date: 2014-07-18 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: nokogiri
|