newegg_scraper_chsbr 0.2.5 → 0.2.6
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
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 3fbd42d7c10c468dc7425a30d88e29f8e6f268daa251709476c87e4ad071dc23
|
4
|
+
data.tar.gz: 02bd7b5230d23751a3904e2650ff50c7b0e6d761bd6f66c0d8179657963ee647
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 05cfd1984328242a0da29c958d612473aba871b97bb2d2b03c705a85d148c5b0d58a3b26856b7a60a12699b46d5148a4870f7d89162604ca4da205101ab699c8
|
7
|
+
data.tar.gz: 16cfc1c007ce8c374d7bf0dc8b9cd9147cb37b23c303c64a856cf17faeeb6e7f4f4495a1103ca582cbce571ceefaef6bb35b792e9ccd25afb9cc939abdefcbe0
|
@@ -7,12 +7,12 @@ class NeweggScraperChsbr::Cli
|
|
7
7
|
puts "Were you interested in purchasing some CPU's?"
|
8
8
|
puts "Please enter y to do so."
|
9
9
|
@counter = gets.strip
|
10
|
-
|
11
|
-
while
|
10
|
+
incorrect_input = control_bool
|
11
|
+
while incorrect_input
|
12
12
|
puts "Were you interested in purchasing some CPU's?"
|
13
13
|
puts "Please enter y to do so.\nPlease enter n or exit to quit."
|
14
14
|
@counter = gets.strip
|
15
|
-
|
15
|
+
incorrect_input = control_bool
|
16
16
|
end
|
17
17
|
while @counter == 'y'
|
18
18
|
get_price_range
|
@@ -28,14 +28,16 @@ class NeweggScraperChsbr::Cli
|
|
28
28
|
|
29
29
|
puts "If you would like to restart the program please enter : #{@counter}.\nTo exit type n or exit."
|
30
30
|
@counter = gets.strip
|
31
|
-
|
32
|
-
while
|
31
|
+
incorrect = control_bool
|
32
|
+
while incorrect
|
33
33
|
puts "Were you interested in purchasing some CPU's?"
|
34
34
|
puts "Please enter y to do so.\nPlease enter n or exit to quit."
|
35
35
|
@counter = gets.strip
|
36
|
-
|
36
|
+
incorrect = control_bool
|
37
37
|
end
|
38
|
-
|
38
|
+
clear_vars
|
39
|
+
@user.clear_chosen
|
40
|
+
self.call
|
39
41
|
end
|
40
42
|
puts "Thanks for using Chesbro's Scraper!"
|
41
43
|
end
|
@@ -102,30 +104,26 @@ class NeweggScraperChsbr::Cli
|
|
102
104
|
end
|
103
105
|
end
|
104
106
|
def control_bool
|
105
|
-
if @counter
|
106
|
-
false
|
107
|
-
elsif @counter.include?("exit")
|
107
|
+
if @counter == "y"
|
108
108
|
false
|
109
|
-
elsif @counter
|
109
|
+
elsif @counter == "exit" || @counter == "n"
|
110
110
|
false
|
111
111
|
else
|
112
112
|
true
|
113
113
|
end
|
114
114
|
end
|
115
115
|
def cpu_make_bool
|
116
|
-
if @cpu_make
|
117
|
-
@cpu_make = "x"
|
118
|
-
false
|
119
|
-
elsif @cpu_make.include?("a")
|
120
|
-
@cpu_make = "a"
|
121
|
-
false
|
122
|
-
elsif @cpu_make.include?("i")
|
123
|
-
@cpu_make = "i"
|
116
|
+
if @cpu_make == "x" || @cpu_make == "a" || @cpu_make == "i"
|
124
117
|
false
|
125
118
|
else
|
126
119
|
true
|
127
120
|
end
|
128
121
|
|
122
|
+
end
|
123
|
+
def clear_vars
|
124
|
+
@cpu_make = nil
|
125
|
+
@min_price = nil
|
126
|
+
@max_price = nil
|
129
127
|
end
|
130
128
|
# def choose_cpu(printed_cpus)
|
131
129
|
# puts "Please enter the number of the CPU you'd like to see more about."
|
@@ -70,7 +70,7 @@ class NeweggScraperChsbr::DataGrabber
|
|
70
70
|
end
|
71
71
|
end
|
72
72
|
def isCoolerOrMB?(name)
|
73
|
-
name.include?("Water") || name.include?("Air") || name.include?("Motherboard") || name.include?("AIO") || name.include?("FLY") || name.include?("Cooler")
|
73
|
+
name.include?("Water") || name.include?("Air") || name.include?("Motherboard") || name.include?("AIO") || name.include?("FLY") || name.include?("Cooler") || name.include?("Block")
|
74
74
|
end
|
75
75
|
def getPrice
|
76
76
|
scraped_info = NeweggScraperChsbr::Scraper.new
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: newegg_scraper_chsbr
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.
|
4
|
+
version: 0.2.6
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Lrd134
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2021-04-
|
11
|
+
date: 2021-04-28 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: nokogiri
|