spotlite 0.8.1 → 0.8.2

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 134e3ae7a3f3dec1308f74fbee0ce0af7639998d
4
- data.tar.gz: a7653e348661e4d335b4b54099b7218aabb6c3e8
3
+ metadata.gz: 42b6d7da0103a2f748b6ae6538dff22250514052
4
+ data.tar.gz: d85ae3e8043976bd0cffb516a76b2b1018588555
5
5
  SHA512:
6
- metadata.gz: 24cfd13b33bc0644300e54886f2ad9b646ae61d29b76ed117090e68f9db2dc241f5bddcd0b147845788a947b579b34c8aafa52e6351953f8641eb401ee056c07
7
- data.tar.gz: db041e16c4c7405a22297fe789622ad61e0f4997ef7e8e1e17e12534cc68f883a29c34ee76183db54170361db4f20b21410baa59078fb4075fdfdae8a4893549
6
+ metadata.gz: aa3593e02c8f945dc50da2f092ea92da9346fea75792561dba6677633b6498cae7c87c5135d2ddfa92c080f1fc8555559aac59058742f1fcb11660938e24b562
7
+ data.tar.gz: 5f058b249fa75382094d3e3a3429f14322611d699a21c40f2d9fe3f5640e9425f497ea8b41907c0677fe6d0da1a5b9edbece1c305eb97a714af7c08c8227a686
data/CHANGELOG.md CHANGED
@@ -1,3 +1,7 @@
1
+ ## v0.8.2 18-Jul-2014
2
+
3
+ * Clean some junk from credits text (particularly writers credits)
4
+
1
5
  ## v0.8.1 12-Jul-2014
2
6
 
3
7
  * Added specs for `#find` and `#search` of `Movie` and `Person` classes
@@ -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
@@ -1,3 +1,3 @@
1
1
  module Spotlite
2
- VERSION = '0.8.1'
2
+ VERSION = '0.8.2'
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.1
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-12 00:00:00.000000000 Z
11
+ date: 2014-07-18 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: nokogiri