yayimdbs 0.2.0 → 0.2.1
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.
- data/lib/yay_imdbs.rb +2 -2
- data/lib/yayimdbs.rb +1 -0
- metadata +3 -2
data/lib/yay_imdbs.rb
CHANGED
|
@@ -35,7 +35,7 @@ class YayImdbs
|
|
|
35
35
|
|
|
36
36
|
search_results.each do |result|
|
|
37
37
|
# Ensure result is the correct video type
|
|
38
|
-
next if type && (result[:video_type] != type)
|
|
38
|
+
next if type && (result[:video_type].to_s != type.to_s)
|
|
39
39
|
|
|
40
40
|
# If no year provided just return first result
|
|
41
41
|
return result[:imdb_id] if year.nil? || result[:year] == year
|
|
@@ -140,7 +140,7 @@ class YayImdbs
|
|
|
140
140
|
raw_key = h4.inner_text
|
|
141
141
|
key = raw_key.sub(':', '').strip.downcase
|
|
142
142
|
value = div.inner_text[((div.inner_text =~ /#{Regexp.escape(raw_key)}/) + raw_key.length).. -1]
|
|
143
|
-
value = value.gsub(/\302\240\302\273/u, '').strip.gsub(/(See more)|(see all)|(See all certifications)$/, '').strip
|
|
143
|
+
value = value.gsub(/\302\240\302\273/u, '').strip.gsub(/(See more)|(see all)|(See all certifications)|(See full summary)$/, '').strip
|
|
144
144
|
|
|
145
145
|
symbol_key = key.downcase.gsub(/[^a-zA-Z0-9 ]/, '').gsub(/\s/, '_').to_sym
|
|
146
146
|
|
data/lib/yayimdbs.rb
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
require File.dirname(__FILE__) + '/yay_imdbs'
|
metadata
CHANGED
|
@@ -5,8 +5,8 @@ version: !ruby/object:Gem::Version
|
|
|
5
5
|
segments:
|
|
6
6
|
- 0
|
|
7
7
|
- 2
|
|
8
|
-
-
|
|
9
|
-
version: 0.2.
|
|
8
|
+
- 1
|
|
9
|
+
version: 0.2.1
|
|
10
10
|
platform: ruby
|
|
11
11
|
authors:
|
|
12
12
|
- Sam Cavenagh
|
|
@@ -71,6 +71,7 @@ extra_rdoc_files:
|
|
|
71
71
|
files:
|
|
72
72
|
- README.md
|
|
73
73
|
- lib/yay_imdbs.rb
|
|
74
|
+
- lib/yayimdbs.rb
|
|
74
75
|
has_rdoc: true
|
|
75
76
|
homepage: http://github.com/o-sam-o/yayimdbs
|
|
76
77
|
licenses: []
|