cb_nitride 0.0.9 → 0.0.10

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: 05e56189f0b36396c301b88df674c414226cb61a
4
- data.tar.gz: 7b6b6088bbe3d46774e310c96122f55d07206df0
3
+ metadata.gz: 57b10dbaa125a39bd94660934eff6aba52362196
4
+ data.tar.gz: 3156fc6a61b6c01279b326ea96ae3c48ba7a693b
5
5
  SHA512:
6
- metadata.gz: a40a466072f55170368f76d7dadae06973bce16627e688199a4f1021fc888291d795e506e226741c24ca3e97a82402a577226b24a27e930507b9fa98d40b7f1b
7
- data.tar.gz: 1e43ad66dc3eaadb58cf35642bb2a6ecb0c6436a6c83cdc9c5e3180406a1e15f2003f55052c77f0134da96ef0c985646f4ea54b9d19806bd34fa757f3c73ba24
6
+ metadata.gz: 3e9a2c34f8f933a4d59ed12f9a1d943879bffb01ccddc56e2a793d6f398c73723a35920407b6fa528bd049e32adc01b119c5e9743dfb170b222c05055f0f4848
7
+ data.tar.gz: bbfa7cfdd20f7255974601f551f11aa810a1a0aaea29d7f8f7ecd37ed15c0d730799cf8aa75b21b031b350ddd237cfa267fb9804d5dc7659569b1e858a91afc0
@@ -1,3 +1,3 @@
1
1
  module CbNitride
2
- VERSION = "0.0.9"
2
+ VERSION = "0.0.10"
3
3
  end
data/lib/cb_nitride.rb CHANGED
@@ -12,11 +12,11 @@ require "cb_nitride/diamond_item"
12
12
  require "cb_nitride/diamond_number_generator"
13
13
 
14
14
  module CbNitride
15
- def self.item(diamond_number)
15
+ def self.item(diamond_number, options = {})
16
16
  unless qualified?
17
17
  PublicHasher.item(diamond_number)
18
18
  else
19
- PrivateHasher.item(diamond_number)
19
+ PrivateHasher.item(diamond_number, options[:agent])
20
20
  end
21
21
  end
22
22
 
@@ -25,9 +25,13 @@ module CbNitride
25
25
  end
26
26
 
27
27
  def self.scrape_imminent!
28
- agent = DiamondLogin.agent
28
+ agent = DiamondLogin.agent if qualified?
29
29
  DiamondNumberGenerator.generate_imminent!.map do |diamond_number|
30
- diamond_item = item(diamond_number, agent)
30
+ if qualified?
31
+ diamond_item = item(diamond_number, agent: agent)
32
+ else
33
+ diamond_item = item (diamond_number)
34
+ end
31
35
  if diamond_item.nil?
32
36
  binding.pry
33
37
  else
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.9
4
+ version: 0.0.10
5
5
  platform: ruby
6
6
  authors:
7
7
  - Alex Jarvis