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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 3140b48d396618d90f8ee491aaa7ed74638d83da
4
- data.tar.gz: d00fe8d6d1c0e29faff92ada7046f291496a41de
3
+ metadata.gz: 9a096e16f26b58f39fdc128fe2d1c3957d3c930b
4
+ data.tar.gz: 7f4ea489ee277e24df05d063515fd2205ca43583
5
5
  SHA512:
6
- metadata.gz: 9a4253b4cb8fbf044f6fca5aa4bdc1999ca4bebba704a090f5b6053eee783d6ef4dc4664036b90d8717136dd66087c42f048c6c7918437527d29e374b6ab8e63
7
- data.tar.gz: d23380787f165b21020b2dc8068f6135d4ed9bcecc761d5bf5853cadf90966b99f304049032594b0ffe588c7d8de2cdd77f112bfff200df0096e75303013eaa6
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.match(/\d+[.]\d+/).to_s.to_f
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)
@@ -1,3 +1,3 @@
1
1
  module CbNitride
2
- VERSION = "0.1.28"
2
+ VERSION = "0.1.29"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: cb_nitride
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.28
4
+ version: 0.1.29
5
5
  platform: ruby
6
6
  authors:
7
7
  - Alex Jarvis