cb_nitride 0.1.28 → 0.1.29
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/cb_nitride/hasher_methods.rb +6 -2
- data/lib/cb_nitride/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 9a096e16f26b58f39fdc128fe2d1c3957d3c930b
|
4
|
+
data.tar.gz: 7f4ea489ee277e24df05d063515fd2205ca43583
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: df59f259c87593339eafcb109517efafc4d4225cd018dc579216b7d488f8663beb2d4e52a0a813a94f64c8fcfe2b8deeaf94b918be9a4afbc2c14a37105b3f60
|
7
|
+
data.tar.gz: 7565cf6278eec47a310aceae2be359cc89ad1b782a309b5eea7e8a084c27798ba8c23c98836c1200ef4540a1f57113aec096711f83f6a884a796dd9ca0fd072c
|
@@ -13,7 +13,7 @@ module CbNitride
|
|
13
13
|
|
14
14
|
def get_image_url(base_url, image_class)
|
15
15
|
image_container = item_page.css(image_class)
|
16
|
-
if image_container.empty?
|
16
|
+
if image_container.nil? || image_container.empty?
|
17
17
|
error_array << "No Image"
|
18
18
|
else
|
19
19
|
base_url + item_page.css(image_class).first.attributes["href"].value
|
@@ -21,7 +21,11 @@ module CbNitride
|
|
21
21
|
end
|
22
22
|
|
23
23
|
def clean_price_float(price)
|
24
|
-
price.
|
24
|
+
if price.nil?
|
25
|
+
error_array << "No price"
|
26
|
+
else
|
27
|
+
price.match(/\d+[.]\d+/).to_s.to_f
|
28
|
+
end
|
25
29
|
end
|
26
30
|
|
27
31
|
def clean_date_string(date)
|
data/lib/cb_nitride/version.rb
CHANGED