sports_south 2.0.21 → 2.0.22
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/sports_south/base.rb +2 -0
- data/lib/sports_south/catalog.rb +13 -9
- data/lib/sports_south/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 24224e8811abc6e53b5c768ff5060d23fc909244
|
4
|
+
data.tar.gz: 915e75bae112af3001ff4c2e208a015f3d21b500
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: bc9970620237510f7494b24c0a5a5be0d136c9839d0bafc81690a31504094890dd5b3400135a93345c376ce70ae23cafc6ff469f93a0bb022d6401b052a5400e
|
7
|
+
data.tar.gz: a85313d2b025ef5e4e8eeeb337ea0f486f24dd487528f7136551a6adf4cbcb733e2ffe993ad37d7ac9839700c9dbc004a216bd478e26573dfa868c0228550598
|
data/lib/sports_south/base.rb
CHANGED
data/lib/sports_south/catalog.rb
CHANGED
@@ -33,7 +33,7 @@ module SportsSouth
|
|
33
33
|
def self.all(chunk_size = 15, options = {}, &block)
|
34
34
|
requires!(options, :username, :password)
|
35
35
|
|
36
|
-
if options[:last_updated]
|
36
|
+
if options[:last_updated]
|
37
37
|
options[:last_updated] = options[:last_updated].strftime("%-m/%-d/%Y")
|
38
38
|
else
|
39
39
|
options[:last_updated] ||= '1/1/1990'
|
@@ -68,7 +68,7 @@ module SportsSouth
|
|
68
68
|
|
69
69
|
chunker.reset!
|
70
70
|
else
|
71
|
-
chunker.add(map_hash(item,
|
71
|
+
chunker.add(map_hash(item, !@options[:full_product].nil?))
|
72
72
|
end
|
73
73
|
end
|
74
74
|
|
@@ -97,13 +97,17 @@ module SportsSouth
|
|
97
97
|
brand = @brands.find { |brand| brand[:brand_id] == content_for(node, 'ITBRDNO') }
|
98
98
|
features = self.map_features(category.except(:category_id, :department_id, :department_description, :description), node)
|
99
99
|
|
100
|
-
|
100
|
+
model = content_for(node, 'IMODEL')
|
101
|
+
series = content_for(node, 'SERIES')
|
102
|
+
mfg_number = content_for(node, 'MFGINO')
|
103
|
+
|
104
|
+
if features[:caliber]
|
101
105
|
caliber = features[:caliber]
|
102
|
-
elsif features[:gauge]
|
106
|
+
elsif features[:gauge]
|
103
107
|
caliber = features[:gauge]
|
104
108
|
end
|
105
109
|
|
106
|
-
if features[:action]
|
110
|
+
if features[:action]
|
107
111
|
action = features[:action]
|
108
112
|
end
|
109
113
|
|
@@ -114,12 +118,12 @@ module SportsSouth
|
|
114
118
|
end
|
115
119
|
|
116
120
|
if features.respond_to?(:[]=)
|
117
|
-
features[:series] =
|
121
|
+
features[:series] = series
|
118
122
|
end
|
119
123
|
|
120
124
|
{
|
121
|
-
name:
|
122
|
-
model:
|
125
|
+
name: "#{model} #{series} #{mfg_number}".gsub(/\s+/, ' ').rstrip,
|
126
|
+
model: model,
|
123
127
|
upc: content_for(node, 'ITUPC').rjust(12, "0"),
|
124
128
|
item_identifier: content_for(node, 'ITEMNO'),
|
125
129
|
quantity: content_for(node, 'QTYOH').to_i,
|
@@ -128,7 +132,7 @@ module SportsSouth
|
|
128
132
|
long_description: long_description,
|
129
133
|
category: category[:description],
|
130
134
|
product_type: ITEM_TYPES[content_for(node, 'ITYPE')],
|
131
|
-
mfg_number:
|
135
|
+
mfg_number: mfg_number,
|
132
136
|
weight: content_for(node, 'WTPBX'),
|
133
137
|
caliber: caliber,
|
134
138
|
action: action,
|
data/lib/sports_south/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: sports_south
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.0.
|
4
|
+
version: 2.0.22
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Dale Campbell
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2018-01-
|
11
|
+
date: 2018-01-05 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: nokogiri
|