sports_south 5.0.0 → 5.0.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +5 -5
- data/lib/sports_south/catalog.rb +13 -15
- data/lib/sports_south/version.rb +1 -1
- data/sports_south.gemspec +1 -1
- metadata +7 -7
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
2
|
+
SHA1:
|
3
|
+
metadata.gz: f72a7e530a665693c47a5b7da6ae000d965c44bd
|
4
|
+
data.tar.gz: d2f7c4c346b909c0bff5c9b0d5e5a6e6ee017068
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 0427e7620531e3cba9c3301e78ad73bcabaf07411ed6ad56c9070d76f566b511f301e02d9e1bfab63b331d7d2298bf20b3c5691751cd39ef6ca1b3a6a6e4bb10
|
7
|
+
data.tar.gz: be0a98dd98e6459103c059e14fb66ba7d93fb526c64ee21d45b0e358450cebde233ae3cf003f84b56673a159c6a5372dae831c0df223379ca0e391711404b763
|
data/lib/sports_south/catalog.rb
CHANGED
@@ -102,22 +102,20 @@ module SportsSouth
|
|
102
102
|
protected
|
103
103
|
|
104
104
|
def map_hash(node, full_product = false)
|
105
|
-
category
|
106
|
-
features
|
107
|
-
|
108
|
-
|
109
|
-
|
110
|
-
|
111
|
-
|
112
|
-
|
113
|
-
|
114
|
-
|
115
|
-
|
105
|
+
category = @categories.find { |category| category[:category_id] == content_for(node, 'CATID') }
|
106
|
+
features = self.map_features(category.except(:category_id, :department_id, :department_description, :description), node)
|
107
|
+
model = content_for(node, 'IMODEL')
|
108
|
+
series = content_for(node, 'SERIES')
|
109
|
+
mfg_number = content_for(node, 'MFGINO')
|
110
|
+
caliber = features[:caliber].presence || features[:gauge].presence
|
111
|
+
action = features[:action].presence
|
112
|
+
unit_of_measure = UNITS_OF_MEASURE.fetch(content_for(node, 'UOM'), nil)
|
113
|
+
|
114
|
+
if features.respond_to?(:[]=)
|
115
|
+
features[:series] = series
|
116
|
+
features[:unit_of_measure] = unit_of_measure
|
116
117
|
end
|
117
118
|
|
118
|
-
action = features[:action] if features[:action]
|
119
|
-
features[:series] = series if features.respond_to?(:[]=)
|
120
|
-
|
121
119
|
{
|
122
120
|
name: "#{model} #{series} #{mfg_number}".gsub(/\s+/, ' ').strip,
|
123
121
|
model: model,
|
@@ -136,7 +134,7 @@ module SportsSouth
|
|
136
134
|
map_price: content_for(node, 'MFPRC'),
|
137
135
|
brand: content_for(node, 'ITBRDNO').presence,
|
138
136
|
features: features,
|
139
|
-
unit_of_measure:
|
137
|
+
unit_of_measure: unit_of_measure,
|
140
138
|
}
|
141
139
|
end
|
142
140
|
|
data/lib/sports_south/version.rb
CHANGED
data/sports_south.gemspec
CHANGED
@@ -23,7 +23,7 @@ Gem::Specification.new do |spec|
|
|
23
23
|
spec.add_development_dependency "activesupport", "~> 5"
|
24
24
|
spec.add_development_dependency "bundler", "~> 1.12"
|
25
25
|
spec.add_development_dependency "net-http-spy", "~> 0.2"
|
26
|
-
spec.add_development_dependency "rake", "
|
26
|
+
spec.add_development_dependency "rake", ">= 12.3.3"
|
27
27
|
spec.add_development_dependency "rspec", "~> 3.3"
|
28
28
|
spec.add_development_dependency "webmock", "~> 1.20"
|
29
29
|
end
|
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: 5.0.
|
4
|
+
version: 5.0.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Dale Campbell
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2020-07-16 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: nokogiri
|
@@ -70,16 +70,16 @@ dependencies:
|
|
70
70
|
name: rake
|
71
71
|
requirement: !ruby/object:Gem::Requirement
|
72
72
|
requirements:
|
73
|
-
- - "
|
73
|
+
- - ">="
|
74
74
|
- !ruby/object:Gem::Version
|
75
|
-
version:
|
75
|
+
version: 12.3.3
|
76
76
|
type: :development
|
77
77
|
prerelease: false
|
78
78
|
version_requirements: !ruby/object:Gem::Requirement
|
79
79
|
requirements:
|
80
|
-
- - "
|
80
|
+
- - ">="
|
81
81
|
- !ruby/object:Gem::Version
|
82
|
-
version:
|
82
|
+
version: 12.3.3
|
83
83
|
- !ruby/object:Gem::Dependency
|
84
84
|
name: rspec
|
85
85
|
requirement: !ruby/object:Gem::Requirement
|
@@ -160,7 +160,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
160
160
|
version: '0'
|
161
161
|
requirements: []
|
162
162
|
rubyforge_project:
|
163
|
-
rubygems_version: 2.
|
163
|
+
rubygems_version: 2.6.14.1
|
164
164
|
signing_key:
|
165
165
|
specification_version: 4
|
166
166
|
summary: Sports South API Ruby library.
|