bill_hicks 1.1.8 → 1.1.9.pre
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/bill_hicks.rb +1 -0
- data/lib/bill_hicks/brand_converter.rb +399 -0
- data/lib/bill_hicks/catalog.rb +6 -0
- data/lib/bill_hicks/inventory.rb +6 -1
- data/lib/bill_hicks/version.rb +1 -1
- metadata +5 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 34765bd8c0c00e65f2651eb06acc5ed73e6bef1f
|
4
|
+
data.tar.gz: 379b300b9021da3492dac476f657f80a51d1070c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 82198ccab5d89f6b1362d6d05fad3087e9f39978c5ec9a0714a88c8c868fb3cd17722ec73632921869878c6d161feb5d5053a7f4a8e87c2836fe423ec03b5bfd
|
7
|
+
data.tar.gz: 348b923ca4808917cec23448e6d290974704001222eb7981b2555d235d8e9004e3bfb26c0a437c426756da5b11f8ee6f84d1a87e9d3777ba853e904c0206fa23
|
data/lib/bill_hicks.rb
CHANGED
@@ -0,0 +1,399 @@
|
|
1
|
+
module BillHicks
|
2
|
+
class BrandConverter
|
3
|
+
def self.convert(value)
|
4
|
+
if brand = @brands.detect {|brand| brand[:prefix] == value.split[0] }
|
5
|
+
brand[:company].empty? ? value.split[0] : brand[:company]
|
6
|
+
else
|
7
|
+
value.split[0]
|
8
|
+
end
|
9
|
+
end
|
10
|
+
|
11
|
+
@brands = [
|
12
|
+
{"prefix":"2A","company":"2A ARMAMENT"},
|
13
|
+
{"prefix":"AAE","company":"AA&E"},
|
14
|
+
{"prefix":"ADAMS","company":"ADAMS ARMS"},
|
15
|
+
{"prefix":"AAC","company":"ADVANCED ARMAMENT"},
|
16
|
+
{"prefix":"AT","company":"ADVANCED TECHNOLOGY, INC."},
|
17
|
+
{"prefix":"AMK","company":"TENDER CORPORATION-US"},
|
18
|
+
{"prefix":"AGU","company":"TEXAS ARMAMENT & TECHNOLOGY"},
|
19
|
+
{"prefix":"AS","company":"AIMSHOT"},
|
20
|
+
{"prefix":"AIM","company":"AIMTECH MOUNT SYSTEMS"},
|
21
|
+
{"prefix":"APF","company":"ALEX PRO FIREARMS LLC"},
|
22
|
+
{"prefix":"KIT","company":"ALEX PRO FIREARMS LLC"},
|
23
|
+
{"prefix":"ALLEN","company":"ALLEN COMPANY INC."},
|
24
|
+
{"prefix":"ATI","company":"AMERICAN TACTICAL IMPORTS"},
|
25
|
+
{"prefix":"AM","company":"ANDERSON MANUFACTURING"},
|
26
|
+
{"prefix":"ARMA","company":"ARMALITE INC."},
|
27
|
+
{"prefix":"APO","company":"ARROW PRECISION, LLC"},
|
28
|
+
{"prefix":"ARS","company":"ARSENAL, INC."},
|
29
|
+
{"prefix":"ATN","company":"ATN"},
|
30
|
+
{"prefix":"AO","company":"AUTO-ORDNANCE"},
|
31
|
+
{"prefix":"BAR","company":"BARNES BULLETS, INC."},
|
32
|
+
{"prefix":"BARN","company":"BARNETT CROSSBOWS"},
|
33
|
+
{"prefix":"BARR","company":"BARRETT FIREARMS MFG INC"},
|
34
|
+
{"prefix":"BARS","company":"BARSKA OPTICS"},
|
35
|
+
{"prefix":"BARSKA","company":"BARSKA OPTICS"},
|
36
|
+
{"prefix":"BOG","company":"BATTENFELD"},
|
37
|
+
{"prefix":"CW","company":"BATTENFELD"},
|
38
|
+
{"prefix":"FRANK","company":"BATTENFELD"},
|
39
|
+
{"prefix":"HOOY","company":"BATTENFELD"},
|
40
|
+
{"prefix":"LD","company":"BATTENFELD"},
|
41
|
+
{"prefix":"TIP","company":"BATTENFELD"},
|
42
|
+
{"prefix":"WH","company":"BATTENFELD"},
|
43
|
+
{"prefix":"BXB","company":"BEAR ARCHERY"},
|
44
|
+
{"prefix":"BER","company":"BERETTA USA"},
|
45
|
+
{"prefix":"BM","company":"BERRY'S MANUFACTURING"},
|
46
|
+
{"prefix":"BC","company":"BIRCHWOOD LABORATORIES, INC."},
|
47
|
+
{"prefix":"SL","company":"BIRCHWOOD LABORATORIES, INC."},
|
48
|
+
{"prefix":"BR","company":"BLACK RAIN ORDNANCE, INC."},
|
49
|
+
{"prefix":"BH","company":"BLACKHAWK"},
|
50
|
+
{"prefix":"KNOXX","company":"BLACKHAWK"},
|
51
|
+
{"prefix":"BB","company":"BLUE BOOK PUBLICATIONS"},
|
52
|
+
{"prefix":"BOB","company":"BOBERG ARMS CORPORATION"},
|
53
|
+
{"prefix":"BOND","company":"BOND ARMS, INC."},
|
54
|
+
{"prefix":"BRO","company":"BROWNING"},
|
55
|
+
{"prefix":"BSA","company":"BSA OPTICS"},
|
56
|
+
{"prefix":"BUCK","company":"BUCK KNIVES INC"},
|
57
|
+
{"prefix":"BD","company":"BULLDOG CASES"},
|
58
|
+
{"prefix":"BUR","company":"BURRIS COMPANY, INC"},
|
59
|
+
{"prefix":"BF","company":"BUSHMASTER"},
|
60
|
+
{"prefix":"BUS","company":"BUSHNELL INC."},
|
61
|
+
{"prefix":"MILLET","company":"BUSHNELL INC."},
|
62
|
+
{"prefix":"RUB","company":"BUSHNELL INC."},
|
63
|
+
{"prefix":"SIM","company":"BUSHNELL INC."},
|
64
|
+
{"prefix":"TAS","company":"BUSHNELL INC."},
|
65
|
+
{"prefix":"BS","company":"BUSHNELL INC."},
|
66
|
+
{"prefix":"BUT","company":"BUSHNELL INC."},
|
67
|
+
{"prefix":"GM","company":"BUSHNELL INC."},
|
68
|
+
{"prefix":"HOP","company":"BUSHNELL INC."},
|
69
|
+
{"prefix":"SP","company":"BUSHNELL INC."},
|
70
|
+
{"prefix":"UM","company":"BUSHNELL INC."},
|
71
|
+
{"prefix":"CPD","company":"C PRODUCTS DEFENSE, INC."},
|
72
|
+
{"prefix":"CAA","company":"ME TECHNOLOGY, INC."},
|
73
|
+
{"prefix":"C4F","company":"2517 INC"},
|
74
|
+
{"prefix":"CE","company":"EASTMAN OUTDOORS, INC."},
|
75
|
+
{"prefix":"CDLY","company":"KBI INC"},
|
76
|
+
{"prefix":"CARL","company":"CARLSON'S"},
|
77
|
+
{"prefix":"CP","company":"CENTER POINT"},
|
78
|
+
{"prefix":"CA","company":"CHARTER ARMS"},
|
79
|
+
{"prefix":"CF","company":"CHIAPPA FIREARMS USA, LTD."},
|
80
|
+
{"prefix":"CIM","company":"CIMARRON FIREARMS CO INC."},
|
81
|
+
{"prefix":"CFA","company":"CIVILIAN FORCE ARMS"},
|
82
|
+
{"prefix":"CMC","company":"CMC"},
|
83
|
+
{"prefix":"CMMG","company":"COMMERCIAL MARKETING LLC"},
|
84
|
+
{"prefix":"COBRA","company":"COBRA"},
|
85
|
+
{"prefix":"CLT","company":"COLT'S MANUFACTURING"},
|
86
|
+
{"prefix":"TALO CLT","company":"COLT'S MANUFACTURING"},
|
87
|
+
{"prefix":"CR","company":"BOLD IDEAS"},
|
88
|
+
{"prefix":"COR","company":"CORBON AMMO"},
|
89
|
+
{"prefix":"GLASER","company":"CORBON AMMO"},
|
90
|
+
{"prefix":"C15","company":"GOOD TIME OUTDOORS INC"},
|
91
|
+
{"prefix":"COV","company":"COVERT"},
|
92
|
+
{"prefix":"KSA","company":"KEYSTONE SPORTING ARMS, LLC"},
|
93
|
+
{"prefix":"CTC","company":"CRIMSON TRACE CORPORATION"},
|
94
|
+
{"prefix":"BEN","company":"CROSMAN CORPORATION"},
|
95
|
+
{"prefix":"CROS","company":"CROSMAN CORPORATION"},
|
96
|
+
{"prefix":"NT","company":"NON TYPICAL (CUDDEBACK)"},
|
97
|
+
{"prefix":"BERG","company":"BPI OUTDOORS"},
|
98
|
+
{"prefix":"BGA","company":"BPI OUTDOORS"},
|
99
|
+
{"prefix":"CVA","company":"BPI OUTDOORS"},
|
100
|
+
{"prefix":"QUA","company":"BPI OUTDOORS"},
|
101
|
+
{"prefix":"CZ","company":"CZ-USA"},
|
102
|
+
{"prefix":"DAISY","company":"DAISY OUTDOOR PRODUCTS"},
|
103
|
+
{"prefix":"DDI","company":"DESTRUCTIVE DEVICES INDUSTRIES"},
|
104
|
+
{"prefix":"DAIR","company":"BP FIREARMS COMPANY, LLC"},
|
105
|
+
{"prefix":"DTI","company":"DEL-TON, INC."},
|
106
|
+
{"prefix":"DES","company":"DESANTIS HOLSTER & LEATHER"},
|
107
|
+
{"prefix":"DBF","company":"DIAMONDBACK FIREARM LLC"},
|
108
|
+
{"prefix":"TALO DBF","company":"DIAMONDBACK FIREARM LLC"},
|
109
|
+
{"prefix":"DH","company":"DIAMONDHEAD USA, INC."},
|
110
|
+
{"prefix":"DA","company":"DICKINSON, LLC"},
|
111
|
+
{"prefix":"BEAR","company":"DKG TRADING INC."},
|
112
|
+
{"prefix":"CENT","company":"DKG TRADING INC."},
|
113
|
+
{"prefix":"DKG","company":"DKG TRADING INC."},
|
114
|
+
{"prefix":"FM","company":"DKG TRADING INC."},
|
115
|
+
{"prefix":"NS","company":"DKG TRADING INC."},
|
116
|
+
{"prefix":"DAT","company":"DO-ALL OUTDOORS"},
|
117
|
+
{"prefix":"DOG","company":"DOGTRA COMPANY"},
|
118
|
+
{"prefix":"DSC","company":"DOUBLESTAR CORPORATION"},
|
119
|
+
{"prefix":"DTD","company":"DOUBLETAP DEFENSE LLC."},
|
120
|
+
{"prefix":"DPMS","company":"DPMS FIREARMS"},
|
121
|
+
{"prefix":"DRA","company":"DRAGO GEAR"},
|
122
|
+
{"prefix":"DSA","company":"DSA, INC."},
|
123
|
+
{"prefix":"DT","company":"DT SYSTEMS, INC."},
|
124
|
+
{"prefix":"EAA","company":"EAA, CORP"},
|
125
|
+
{"prefix":"EI","company":"EAGLE IMPORTS INC (BERSA)"},
|
126
|
+
{"prefix":"EOT","company":"L-3 COMMUNICATIONS-EO TECH"},
|
127
|
+
{"prefix":"ERGO","company":"FALCON INDUSTRIES INC"},
|
128
|
+
{"prefix":"EST","company":"FEDERAL AMMO"},
|
129
|
+
{"prefix":"FED","company":"FEDERAL AMMO"},
|
130
|
+
{"prefix":"IND","company":"FEDERAL AMMO"},
|
131
|
+
{"prefix":"FIO","company":"FIOCCHI OF AMERICA"},
|
132
|
+
{"prefix":"WILL","company":"WILLIAMS GUN SIGHT COMPANY"},
|
133
|
+
{"prefix":"FC","company":"FLIPPIN CRITTERS"},
|
134
|
+
{"prefix":"FLITZ","company":"FLITZ INTERNATIONAL LTD"},
|
135
|
+
{"prefix":"FMK","company":"FMK FIREARMS, INC."},
|
136
|
+
{"prefix":"FNH","company":"FN AMERICA, LLC"},
|
137
|
+
{"prefix":"FOBUS","company":"FIRST SAMCO/FOBUS HOLSTER"},
|
138
|
+
{"prefix":"FA","company":"FRANKLIN ARMORY"},
|
139
|
+
{"prefix":"G2R","company":"G2 RESEARCH, INC"},
|
140
|
+
{"prefix":"G96","company":"G96 PRODUCTS CO INC."},
|
141
|
+
{"prefix":"GAL","company":"GALCO GUNLEATHER"},
|
142
|
+
{"prefix":"GAMO","company":"GAMO OUTDOOR USA"},
|
143
|
+
{"prefix":"GATCO","company":"GATCO"},
|
144
|
+
{"prefix":"TIMB","company":"GATCO"},
|
145
|
+
{"prefix":"GEM","company":"GEM-TECH"},
|
146
|
+
{"prefix":"GERBER","company":"FISKARS BRANDS, INC."},
|
147
|
+
{"prefix":"GMG","company":"GLOBAL MILITARY GEAR"},
|
148
|
+
{"prefix":"GLOCK","company":"GLOCK"},
|
149
|
+
{"prefix":"MISC","company":"GLOCK"},
|
150
|
+
{"prefix":"TALO GLOCK","company":"GLOCK"},
|
151
|
+
{"prefix":"GOAL","company":"GOAL ZERO, LLC"},
|
152
|
+
{"prefix":"GRAB","company":"GRABBER INC"},
|
153
|
+
{"prefix":"GRIF","company":""},
|
154
|
+
{"prefix":"GT","company":"GROVTEC US, INC."},
|
155
|
+
{"prefix":"CYC","company":"GSM, LLC"},
|
156
|
+
{"prefix":"STC","company":"GSM, LLC"},
|
157
|
+
{"prefix":"WALK","company":"GSM, LLC"},
|
158
|
+
{"prefix":"WRC","company":"GSM, LLC"},
|
159
|
+
{"prefix":"GV","company":"GUNVAULT"},
|
160
|
+
{"prefix":"HK","company":"HECKLER & KOCH, INC."},
|
161
|
+
{"prefix":"NEF","company":"H & R 1871"},
|
162
|
+
{"prefix":"HAR","company":"HARRIS BIPODS"},
|
163
|
+
{"prefix":"HWK","company":"HAWKE SPORT OPTICS"},
|
164
|
+
{"prefix":"HC","company":"HC MAGS, LLC"},
|
165
|
+
{"prefix":"HD","company":"HEIZER DEFENSE LLC"},
|
166
|
+
{"prefix":"HRAC","company":"HENRY REPEATING ARMS COMPANY"},
|
167
|
+
{"prefix":"TALO HRAC","company":"HENRY REPEATING ARMS COMPANY"},
|
168
|
+
{"prefix":"HRACW","company":"HENRY WISCONSIN LLC"},
|
169
|
+
{"prefix":"HTG","company":"HERITAGE MANUFACTURING, INC."},
|
170
|
+
{"prefix":"HEX","company":"HEXMAG"},
|
171
|
+
{"prefix":"MKS","company":"MKS SUPPLY, LLC."},
|
172
|
+
{"prefix":"HIVIZ","company":"NORTH PASS LTD (HIVIZ)"},
|
173
|
+
{"prefix":"HKS","company":"HKS PRODUCTS"},
|
174
|
+
{"prefix":"HOG","company":"HOGUE GRIPS"},
|
175
|
+
{"prefix":"HOLO","company":"HOLOSUN"},
|
176
|
+
{"prefix":"HDEF","company":"HONOR DEFENSE"},
|
177
|
+
{"prefix":"HOOY","company":"HOOYMAN"},
|
178
|
+
{"prefix":"HORN","company":"HORNADY"},
|
179
|
+
{"prefix":"HL","company":"HONEYWELL SAFETY PRODUCTS US"},
|
180
|
+
{"prefix":"HPR","company":"HPR AMMUNITION"},
|
181
|
+
{"prefix":"HSPI","company":"H-S PRECISION, INC."},
|
182
|
+
{"prefix":"HUN","company":"HUNTER COMPANY"},
|
183
|
+
{"prefix":"HSP","company":"HUNTER'S SPECIALTIES, INC."},
|
184
|
+
{"prefix":"JS","company":"HUNTER'S SPECIALTIES, INC."},
|
185
|
+
{"prefix":"HSM","company":"HSM/HUNTING SHACK INC."},
|
186
|
+
{"prefix":"HUSK","company":"HUSKEMAW OPTICS"},
|
187
|
+
{"prefix":"IFG","company":"IFG LLC"},
|
188
|
+
{"prefix":"IO","company":"INTER ORDNANCE"},
|
189
|
+
{"prefix":"IAC","company":"INTERSTATE ARMS CORPORATION"},
|
190
|
+
{"prefix":"ITS","company":"INTREPID TACTICAL SOLUTIONS"},
|
191
|
+
{"prefix":"IOSSO","company":"IOSSO PRODUCTS"},
|
192
|
+
{"prefix":"HOLDEN","company":"IRONSIGHTER CO."},
|
193
|
+
{"prefix":"ITH","company":"ITHACA GUN COMPANY"},
|
194
|
+
{"prefix":"IWI","company":"IWI US, INC."},
|
195
|
+
{"prefix":"JBA","company":"CAPTECH INTERNATIONAL LLC"},
|
196
|
+
{"prefix":"JRC","company":"LDB SUPPLY LLC"},
|
197
|
+
{"prefix":"KA","company":"KAHR ARMS"},
|
198
|
+
{"prefix":"KEL","company":"KEL-TEC CNC INDUSTRIES, INC."},
|
199
|
+
{"prefix":"KER","company":"KERSHAW KNIVES"},
|
200
|
+
{"prefix":"KING","company":"KINGSTON ARMORY"},
|
201
|
+
{"prefix":"KON","company":"KONUS"},
|
202
|
+
{"prefix":"KRISS","company":"KRISS USA, INC"},
|
203
|
+
{"prefix":"LN","company":"LANCER SYSTEMS, LP"},
|
204
|
+
{"prefix":"LS","company":"LANSKY SHARPENERS"},
|
205
|
+
{"prefix":"LANTAC","company":"LANTAC USA LLC"},
|
206
|
+
{"prefix":"LG","company":"LASER GENETICS"},
|
207
|
+
{"prefix":"LL","company":"LASERLYTE"},
|
208
|
+
{"prefix":"LM","company":"LASERMAX"},
|
209
|
+
{"prefix":"UTG","company":"LEAPERS, INC."},
|
210
|
+
{"prefix":"LEE","company":"LEE PRECISION INC"},
|
211
|
+
{"prefix":"ISSC","company":"LEGACY SPORTS INT'L, LLC"},
|
212
|
+
{"prefix":"LSI","company":"LEGACY SPORTS INT'L, LLC"},
|
213
|
+
{"prefix":"LEU","company":"LEUPOLD & STEVENS INC"},
|
214
|
+
{"prefix":"RED","company":"LEUPOLD & STEVENS INC"},
|
215
|
+
{"prefix":"LIB","company":"LIBERTY AMMUNITION"},
|
216
|
+
{"prefix":"LAI","company":"LIBERTY ARMS INTERNATIONAL LLC"},
|
217
|
+
{"prefix":"LF","company":"LIGHTFIELD AMMUNITION CORP"},
|
218
|
+
{"prefix":"LH","company":"LIONHEART INDUSTRIES, LLC"},
|
219
|
+
{"prefix":"LWRC","company":"LWRC INTERNATIONAL"},
|
220
|
+
{"prefix":"ADTAC","company":"LYMAN"},
|
221
|
+
{"prefix":"AZOOM","company":"LYMAN"},
|
222
|
+
{"prefix":"LYM","company":"LYMAN"},
|
223
|
+
{"prefix":"PAC","company":"LYMAN"},
|
224
|
+
{"prefix":"TAC","company":"LYMAN"},
|
225
|
+
{"prefix":"TRIUS","company":"LYMAN"},
|
226
|
+
{"prefix":"MM","company":"M&M LLC (Cogunsales)"},
|
227
|
+
{"prefix":"MACE","company":"MACE PERSONAL DEFENSE &"},
|
228
|
+
{"prefix":"LULA","company":"MAGLULA LTD."},
|
229
|
+
{"prefix":"MR","company":"MAGNUM RESEARCH, INC"},
|
230
|
+
{"prefix":"MTA","company":"MAGTECH AMMUNITION CO INC"},
|
231
|
+
{"prefix":"SB","company":"MAGTECH AMMUNITION CO INC"},
|
232
|
+
{"prefix":"MAKO","company":"MAKO GROUP, THE"},
|
233
|
+
{"prefix":"MANTA","company":"MANTA"},
|
234
|
+
{"prefix":"MAR","company":"MARLIN FIREARMS"},
|
235
|
+
{"prefix":"ML","company":"MASTER LOCK COMPANY LLC"},
|
236
|
+
{"prefix":"MPA","company":"MASTERPIECE ARMS"},
|
237
|
+
{"prefix":"MEC","company":"MAYVILLE ENGINEERING (MEC)"},
|
238
|
+
{"prefix":"MECGAR","company":"MEC-GAR USA, INC."},
|
239
|
+
{"prefix":"MGI","company":"MG INDUSTRIES, INC."},
|
240
|
+
{"prefix":"MI","company":"MI-MIDWEST INDUSTRIES, INC."},
|
241
|
+
{"prefix":"MNX","company":"MINOX USA, INC."},
|
242
|
+
{"prefix":"MFT","company":"MISSION FIRST TACTICAL"},
|
243
|
+
{"prefix":"MK","company":"MOISTURE KING"},
|
244
|
+
{"prefix":"FIME","company":"FIME GROUP"},
|
245
|
+
{"prefix":"MAV","company":"O.F. MOSSBERG & SONS INC"},
|
246
|
+
{"prefix":"MOSS","company":"O.F. MOSSBERG & SONS INC"},
|
247
|
+
{"prefix":"TALO MOSS","company":"O.F. MOSSBERG & SONS INC"},
|
248
|
+
{"prefix":"MOUL","company":"PRADCO OUTDOOR BRANDS"},
|
249
|
+
{"prefix":"MTM","company":"MTM MOLDED PRODUCTS CO"},
|
250
|
+
{"prefix":"NIKKO","company":"CENTURION INTERNATIONAL, LTD"},
|
251
|
+
{"prefix":"NIK","company":"NIKON INC"},
|
252
|
+
{"prefix":"NORD","company":"NORDIC COMPONENTS"},
|
253
|
+
{"prefix":"NOREEN","company":"NOREEN FIREARMS"},
|
254
|
+
{"prefix":"NAA","company":"NORTH AMERICAN ARMS INC"},
|
255
|
+
{"prefix":"TALO NAA","company":"NORTH AMERICAN ARMS INC"},
|
256
|
+
{"prefix":"NOS","company":"NOSLER INCORPORATED"},
|
257
|
+
{"prefix":"SSA","company":"NOSLER INCORPORATED"},
|
258
|
+
{"prefix":"OEM","company":"OEM"},
|
259
|
+
{"prefix":"OAI","company":"OLYMPIC ARMS INC."},
|
260
|
+
{"prefix":"OSS","company":"OPERATORS SUPPRESSOR SYSTEMS"},
|
261
|
+
{"prefix":"OTIS","company":"OTIS TECHNOLOGY, INC."},
|
262
|
+
{"prefix":"OBF","company":"OUTBACK FLASHLIGHTS"},
|
263
|
+
{"prefix":"OC","company":"OUTDOOR CONNECTION"},
|
264
|
+
{"prefix":"OZON","company":"OZONICS"},
|
265
|
+
{"prefix":"PAL","company":"PALCO SPORTS"},
|
266
|
+
{"prefix":"PO","company":"PARA USA"},
|
267
|
+
{"prefix":"POF","company":"PATRIOT ORDNANCE FACTORY"},
|
268
|
+
{"prefix":"PEARCE","company":"PEARCE GRIP, INC"},
|
269
|
+
{"prefix":"PELICAN","company":"PELICAN"},
|
270
|
+
{"prefix":"PEL","company":"3M COMPANY"},
|
271
|
+
{"prefix":"PR","company":"PETE RICKARD INC"},
|
272
|
+
{"prefix":"PT","company":"PHOENIX TECHNOLOGY LTD."},
|
273
|
+
{"prefix":"PLANO","company":"PLANO MOLDING CO."},
|
274
|
+
{"prefix":"PMC","company":"PMC AMMUNITION, INC."},
|
275
|
+
{"prefix":"PRED","company":"PREDATOR TACTICS"},
|
276
|
+
{"prefix":"PRIMOS","company":"BUSHNELL INC."},
|
277
|
+
{"prefix":"PE","company":"ALTUS BRANDS LLC"},
|
278
|
+
{"prefix":"PM","company":"PRO-MAG MFG INC"},
|
279
|
+
{"prefix":"PRO","company":"PRO SHOT PRODUCTS"},
|
280
|
+
{"prefix":"PTAC","company":"STEEL WILL INVESTMENTS INC"},
|
281
|
+
{"prefix":"PTR","company":"PTR INDUSTRIES, INC."},
|
282
|
+
{"prefix":"PYRA","company":"PYRAMEX SAFETY PRODUCTS"},
|
283
|
+
{"prefix":"RAD","company":"RADIANS"},
|
284
|
+
{"prefix":"REAL","company":"REVO BRAND GROUP, LLC"},
|
285
|
+
{"prefix":"RWB","company":"RED, WHITE & BLUE, LLC"},
|
286
|
+
{"prefix":"REM","company":"REMINGTON ARMS COMPANY"},
|
287
|
+
{"prefix":"RG","company":"RGUNS"},
|
288
|
+
{"prefix":"ROB","company":"ROBERTS DEFENSE"},
|
289
|
+
{"prefix":"AUA","company":"ARMSCOR PRECISION INTERNATIONA"},
|
290
|
+
{"prefix":"RIA","company":"ARMSCOR PRECISION INTERNATIONA"},
|
291
|
+
{"prefix":"RRA","company":"ROCK RIVER ARMS, INC."},
|
292
|
+
{"prefix":"ROG","company":"ROGERS HOLSTER COMPANY, LLC"},
|
293
|
+
{"prefix":"ROS","company":"BRAZTECH INTL (ROSSI)"},
|
294
|
+
{"prefix":"RUG","company":"STURM, RUGER & COMPANY, INC"},
|
295
|
+
{"prefix":"TALO RUG","company":"STURM, RUGER & COMPANY, INC"},
|
296
|
+
{"prefix":"TPD","company":"TORNADO PERSONAL DEFENSE"},
|
297
|
+
{"prefix":"RS","company":"RUGGED SUPRESSORS"},
|
298
|
+
{"prefix":"RAA","company":"ICON MARKETING GROUP"},
|
299
|
+
{"prefix":"RWC","company":"TRANSPORTATION ALLIANCE BANK"},
|
300
|
+
{"prefix":"SAB","company":"SECURITY EQUIPMENT CORP"},
|
301
|
+
{"prefix":"SACK","company":"SACK-UPS"},
|
302
|
+
{"prefix":"BIA","company":"SAFARILAND,LLC"},
|
303
|
+
{"prefix":"BREAK","company":"SAFARILAND,LLC"},
|
304
|
+
{"prefix":"BSQ","company":"SAFARILAND,LLC"},
|
305
|
+
{"prefix":"KB","company":"SAFARILAND,LLC"},
|
306
|
+
{"prefix":"SAF","company":"SAFARILAND,LLC"},
|
307
|
+
{"prefix":"SAGEN","company":"SAGEN INC."},
|
308
|
+
{"prefix":"SAV","company":"SAVAGE ARMS, INC."},
|
309
|
+
{"prefix":"SCCY","company":"SCCY INDUSTRIES, LLC"},
|
310
|
+
{"prefix":"SC","company":"VENTCO INC (SHOOTERS CHOICE)"},
|
311
|
+
{"prefix":"SIE","company":"SIERRA BULLETS, L.P."},
|
312
|
+
{"prefix":"SIG","company":"SIG SAUER, INC."},
|
313
|
+
{"prefix":"TALO SIG","company":"SIG SAUER, INC."},
|
314
|
+
{"prefix":"FF","company":"SELLMARK CORPORATION"},
|
315
|
+
{"prefix":"PULSAR","company":"SELLMARK CORPORATION"},
|
316
|
+
{"prefix":"SM","company":"SELLMARK CORPORATION"},
|
317
|
+
{"prefix":"ST","company":"SIGHTRON"},
|
318
|
+
{"prefix":"S9","company":"SIGNAL 9 DEFENSE"},
|
319
|
+
{"prefix":"SIL","company":"SILENCERCO, LLC"},
|
320
|
+
{"prefix":"SIMS","company":"SIMS VIBRATION LAB (LIMB SAV)"},
|
321
|
+
{"prefix":"SFS","company":"SLIDE FIRE SOLUTIONS, LP"},
|
322
|
+
{"prefix":"SW","company":"SMITH & WESSON"},
|
323
|
+
{"prefix":"TALO SW","company":"SMITH & WESSON"},
|
324
|
+
{"prefix":"SOG","company":"SOG"},
|
325
|
+
{"prefix":"SONIC","company":"SONIC BOOM EXPLODING TARGETS"},
|
326
|
+
{"prefix":"SBLOOM","company":"SOUTHERN BLOOMER MFG CO"},
|
327
|
+
{"prefix":"SPR","company":"SPRINGFIELD ARMORY"},
|
328
|
+
{"prefix":"SO","company":"STACK-ON PRODUCTS, CO."},
|
329
|
+
{"prefix":"SML","company":"STANDARD MANUFACTURING CO LLC"},
|
330
|
+
{"prefix":"STOP","company":"PHALANX DEFENSE SYSTEMS"},
|
331
|
+
{"prefix":"STEYR","company":"STEYR ARMS"},
|
332
|
+
{"prefix":"STORM","company":"PELICAN STORM CASES"},
|
333
|
+
{"prefix":"STREAM","company":"STREAMLIGHT, INC."},
|
334
|
+
{"prefix":"SUN","company":"SUN OPTICS USA"},
|
335
|
+
{"prefix":"SF","company":"SGM TACTICAL LLC"},
|
336
|
+
{"prefix":"SWIFT","company":"SWIFT BULLET COMPANY"},
|
337
|
+
{"prefix":"TANN","company":"TANNERITE"},
|
338
|
+
{"prefix":"TAPCO","company":"TAPCO"},
|
339
|
+
{"prefix":"TAFA","company":"TARGET-FACTORY"},
|
340
|
+
{"prefix":"TAU","company":"TAURUS INTERNATIONAL MFG"},
|
341
|
+
{"prefix":"SCHRADE","company":"TAYLOR BRANDS LLC"},
|
342
|
+
{"prefix":"TAY","company":"TAYLOR BRANDS LLC"},
|
343
|
+
{"prefix":"TF","company":"TAYLOR'S & COMPANY, INC."},
|
344
|
+
{"prefix":"TC","company":"THOMPSON CENTER"},
|
345
|
+
{"prefix":"TCLIP","company":"TECHNA CLIP"},
|
346
|
+
{"prefix":"TGM","company":"TECHNICAL GRINDING AND"},
|
347
|
+
{"prefix":"HORT","company":"TENPOINT CROSSBOW TECHNOLOGIES"},
|
348
|
+
{"prefix":"TP","company":"TENPOINT CROSSBOW TECHNOLOGIES"},
|
349
|
+
{"prefix":"SAKO","company":"BERETTA USA CORP (TIKKA)"},
|
350
|
+
{"prefix":"TIK","company":"BERETTA USA CORP (TIKKA)"},
|
351
|
+
{"prefix":"TINKS","company":"PAT ACQUISITON, LLC (TINKS)"},
|
352
|
+
{"prefix":"TRAD","company":"TRADITIONS MUZZLELOADING"},
|
353
|
+
{"prefix":"TRI","company":"TRIJICON, INC."},
|
354
|
+
{"prefix":"TRIMAG","company":"ALANGATOR, LLC"},
|
355
|
+
{"prefix":"TSA","company":"TRISTAR SPORTING ARMS, LTD"},
|
356
|
+
{"prefix":"TROY","company":"TROY INDUSTRIES"},
|
357
|
+
{"prefix":"TG","company":"TRUGLO"},
|
358
|
+
{"prefix":"MAXX","company":"TULAMMO USA, INC."},
|
359
|
+
{"prefix":"TA","company":"TULAMMO USA, INC."},
|
360
|
+
{"prefix":"TIF","company":"BUDS GUN SHOP"},
|
361
|
+
{"prefix":"UD","company":"ULTRADOT DISTRIBUTION"},
|
362
|
+
{"prefix":"UMAX","company":"ULTRAMAX AMMUNITION"},
|
363
|
+
{"prefix":"UMAREX","company":"UMAREX USA"},
|
364
|
+
{"prefix":"USFA","company":"USFA/ZIPFACTORY, LLC"},
|
365
|
+
{"prefix":"USPK","company":""},
|
366
|
+
{"prefix":"USSG","company":"USSG INC."},
|
367
|
+
{"prefix":"UTAS","company":"UTAS-USA"},
|
368
|
+
{"prefix":"VV","company":"PIONEER RESEARCH"},
|
369
|
+
{"prefix":"VC","company":"VERSACARRY"},
|
370
|
+
{"prefix":"LAS","company":"VIRIDIAN GREEN LASER SIGHTS"},
|
371
|
+
{"prefix":"BCMM","company":"VISTA OUTDOOR SALES LLC"},
|
372
|
+
{"prefix":"CCI","company":"VISTA OUTDOOR SALES LLC"},
|
373
|
+
{"prefix":"CHAMP","company":"VISTA OUTDOOR SALES LLC"},
|
374
|
+
{"prefix":"GUNS","company":"VISTA OUTDOOR SALES LLC"},
|
375
|
+
{"prefix":"OUTERS","company":"VISTA OUTDOOR SALES LLC"},
|
376
|
+
{"prefix":"RAM","company":"VISTA OUTDOOR SALES LLC"},
|
377
|
+
{"prefix":"RCBS","company":"VISTA OUTDOOR SALES LLC"},
|
378
|
+
{"prefix":"SHOOT","company":"VISTA OUTDOOR SALES LLC"},
|
379
|
+
{"prefix":"SPEER","company":"VISTA OUTDOOR SALES LLC"},
|
380
|
+
{"prefix":"TALO WAL","company":"WALTHER ARMS,INC."},
|
381
|
+
{"prefix":"WAL","company":"WALTHER ARMS,INC."},
|
382
|
+
{"prefix":"WAR","company":"WARNE"},
|
383
|
+
{"prefix":"WASP","company":"WASPCAM"},
|
384
|
+
{"prefix":"WBY","company":"WEATHERBY INC"},
|
385
|
+
{"prefix":"WEAVER","company":"WEAVER"},
|
386
|
+
{"prefix":"WR","company":"WILDLIFE RESEARCH CENTER, INC."},
|
387
|
+
{"prefix":"WIN","company":"WINCHESTER ARMS"},
|
388
|
+
{"prefix":"WW","company":"WINDHAM WEAPONRY"},
|
389
|
+
{"prefix":"WISE","company":"WISE FOODS"},
|
390
|
+
{"prefix":"WMD","company":"WMD GUNS"},
|
391
|
+
{"prefix":"WDY","company":"INVENTIVE DESIGN STUDIO LLC"},
|
392
|
+
{"prefix":"XP","company":"X PRODUCTS LLC"},
|
393
|
+
{"prefix":"YHM","company":"YANKEE HILL MACHINE CO., INC."},
|
394
|
+
{"prefix":"ZS","company":"CARL ZEISS SBE, LLC."},
|
395
|
+
{"prefix":"ZEN","company":"ZENITH FIREARMS"}
|
396
|
+
]
|
397
|
+
|
398
|
+
end
|
399
|
+
end
|
data/lib/bill_hicks/catalog.rb
CHANGED
@@ -53,6 +53,8 @@ module BillHicks
|
|
53
53
|
# Alias the ':universal_product_code' as ':upc'.
|
54
54
|
row_hash[:upc] = row_hash[:universal_product_code]
|
55
55
|
|
56
|
+
row_hash[:brand] = BillHicks::BrandConverter.convert(row_hash[:product_name])
|
57
|
+
|
56
58
|
catalog << row_hash
|
57
59
|
end
|
58
60
|
end
|
@@ -71,6 +73,10 @@ module BillHicks
|
|
71
73
|
ftp.getbinaryfile(CATALOG_FILENAME, temp_csv_file.path)
|
72
74
|
|
73
75
|
SmarterCSV.process(temp_csv_file, { :chunk_size => size, :force_utf8 => true, :convert_values_to_numeric => false }) do |chunk|
|
76
|
+
chunk.each do |item|
|
77
|
+
item[:brand] = BillHicks::BrandConverter.convert(item[:product_name])
|
78
|
+
end
|
79
|
+
|
74
80
|
yield(chunk)
|
75
81
|
end
|
76
82
|
|
data/lib/bill_hicks/inventory.rb
CHANGED
@@ -36,6 +36,7 @@ module BillHicks
|
|
36
36
|
|
37
37
|
CSV.parse(lines, headers: :first_row) do |row|
|
38
38
|
inventory << {
|
39
|
+
brand: BillHicks::BrandConverter.convert(row.fetch('Product')),
|
39
40
|
product: row.fetch('Product'),
|
40
41
|
upc: row.fetch('UPC'),
|
41
42
|
quantity: (Integer(row.fetch('Qty Avail')) rescue 0)
|
@@ -56,7 +57,11 @@ module BillHicks
|
|
56
57
|
ftp.chdir(BillHicks.config.top_level_dir)
|
57
58
|
ftp.getbinaryfile(INVENTORY_FILENAME, temp_csv_file.path)
|
58
59
|
|
59
|
-
SmarterCSV.process(temp_csv_file, { :chunk_size => size, :force_utf8 => true, :convert_values_to_numeric => false }) do |chunk|
|
60
|
+
SmarterCSV.process(temp_csv_file, { :chunk_size => size, :force_utf8 => true, :convert_values_to_numeric => false, }) do |chunk|
|
61
|
+
chunk.each do |item|
|
62
|
+
item[:brand] = BillHicks::BrandConverter.convert(item[:product])
|
63
|
+
end
|
64
|
+
|
60
65
|
yield(chunk)
|
61
66
|
end
|
62
67
|
|
data/lib/bill_hicks/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: bill_hicks
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.1.
|
4
|
+
version: 1.1.9.pre
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Dale Campbell
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2017-04-
|
11
|
+
date: 2017-04-17 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: smarter_csv
|
@@ -87,6 +87,7 @@ files:
|
|
87
87
|
- bin/setup
|
88
88
|
- lib/bill_hicks.rb
|
89
89
|
- lib/bill_hicks/base.rb
|
90
|
+
- lib/bill_hicks/brand_converter.rb
|
90
91
|
- lib/bill_hicks/catalog.rb
|
91
92
|
- lib/bill_hicks/category.rb
|
92
93
|
- lib/bill_hicks/inventory.rb
|
@@ -109,9 +110,9 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
109
110
|
version: '0'
|
110
111
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
111
112
|
requirements:
|
112
|
-
- - "
|
113
|
+
- - ">"
|
113
114
|
- !ruby/object:Gem::Version
|
114
|
-
version:
|
115
|
+
version: 1.3.1
|
115
116
|
requirements: []
|
116
117
|
rubyforge_project:
|
117
118
|
rubygems_version: 2.5.1
|