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 +4 -4
- data/lib/cb_nitride/version.rb +1 -1
- data/lib/cb_nitride.rb +8 -4
- 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: 57b10dbaa125a39bd94660934eff6aba52362196
|
4
|
+
data.tar.gz: 3156fc6a61b6c01279b326ea96ae3c48ba7a693b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 3e9a2c34f8f933a4d59ed12f9a1d943879bffb01ccddc56e2a793d6f398c73723a35920407b6fa528bd049e32adc01b119c5e9743dfb170b222c05055f0f4848
|
7
|
+
data.tar.gz: bbfa7cfdd20f7255974601f551f11aa810a1a0aaea29d7f8f7ecd37ed15c0d730799cf8aa75b21b031b350ddd237cfa267fb9804d5dc7659569b1e858a91afc0
|
data/lib/cb_nitride/version.rb
CHANGED
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
|
-
|
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
|