cb_nitride 0.0.11 → 0.0.12

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: 853c9239f7d0c5f8ee1c55685544da0df498aa83
4
- data.tar.gz: 3f29081e660c4e6b859b45d7118edd651d1644aa
3
+ metadata.gz: 3edd87b689777f2a1199b31017885998415f9db6
4
+ data.tar.gz: 005e8ee645753507ec4e225242b424e7c62abf81
5
5
  SHA512:
6
- metadata.gz: 94efdb867dc1333d2ace5a729d84015a012f28e67de4f2c010a9b56d05ad841c78f28d689266ccf2d27753f4ee02573c8c62d13fa4eb5cd04e4bde934f59073c
7
- data.tar.gz: a3c4175f1058d6e9b45959e2ec570f0e04b5ba756d04c751115be6b7ddfd00a6df67dfe914da4c7bc69ba75376d1ef13452971128c7bfb57c897d98b6193142b
6
+ metadata.gz: 31e269b364747300d566dc80076c58e56982b64cd0f67d88af871dcba265deac36964d12e883dee91581087e96ab5abf43d295ffe0bceb3f32afd0c0cca4c485
7
+ data.tar.gz: 8b40c7c9824a2362defb30c9cffd91e4524e7eba7729909eec7b072f236add0e784c5959943f24cdfb105e1815ef141d7e5be1a9324aff40899777870ef455b1
@@ -12,7 +12,12 @@ module CbNitride
12
12
  end
13
13
 
14
14
  def get_image_url(base_url, image_class)
15
- base_url + item_page.css(image_class).children[1].attributes["src"].value
15
+ image_container = item_page.css(image_class)
16
+ if image_container.empty?
17
+ errors_array << "No Image"
18
+ else
19
+ (base_url + item_page.css(image_class)).children[1].attributes["src"].value
20
+ end
16
21
  end
17
22
 
18
23
  def clean_price_float(price)
@@ -1,3 +1,3 @@
1
1
  module CbNitride
2
- VERSION = "0.0.11"
2
+ VERSION = "0.0.12"
3
3
  end
data/lib/cb_nitride.rb CHANGED
@@ -13,10 +13,10 @@ require "cb_nitride/diamond_number_generator"
13
13
 
14
14
  module CbNitride
15
15
  def self.item(diamond_number, options = {})
16
- unless qualified?
17
- PublicHasher.item(diamond_number)
16
+ if qualified?
17
+ PrivateHasher.item(diamond_number, options[:agent] || DiamondLogin.agent)
18
18
  else
19
- PrivateHasher.item(diamond_number, options[:agent])
19
+ PublicHasher.item(diamond_number)
20
20
  end
21
21
  end
22
22
 
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.0.11
4
+ version: 0.0.12
5
5
  platform: ruby
6
6
  authors:
7
7
  - Alex Jarvis