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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
- SHA256:
3
- metadata.gz: 19a10bec089537426870e1faf6373b1ad2268fbde29ed5fc912bc21ce5b3526e
4
- data.tar.gz: 7a356aa8a0a28ebbc59bc68e2b995ffc2ee3d0d4db32ae4df154c02c7dfb05e4
2
+ SHA1:
3
+ metadata.gz: f72a7e530a665693c47a5b7da6ae000d965c44bd
4
+ data.tar.gz: d2f7c4c346b909c0bff5c9b0d5e5a6e6ee017068
5
5
  SHA512:
6
- metadata.gz: f81d5e2a1a8fb16fb7a9bca7a47711ffd3c042ac17ad57aae3b24c6278a718bacb818077716ac09a827baa9d039612b0c8922e9937eacbe1886834cb211e2231
7
- data.tar.gz: 87d8a4dcd81a38b415d6d45ce17491aa0c30fcd382a523e0ef0ed978ff1771735d90b3ec9c3c7c89a9ca911a5b957cd6fe7ed75c765f06af71788ce7c7fac3db
6
+ metadata.gz: 0427e7620531e3cba9c3301e78ad73bcabaf07411ed6ad56c9070d76f566b511f301e02d9e1bfab63b331d7d2298bf20b3c5691751cd39ef6ca1b3a6a6e4bb10
7
+ data.tar.gz: be0a98dd98e6459103c059e14fb66ba7d93fb526c64ee21d45b0e358450cebde233ae3cf003f84b56673a159c6a5372dae831c0df223379ca0e391711404b763
@@ -102,22 +102,20 @@ module SportsSouth
102
102
  protected
103
103
 
104
104
  def map_hash(node, full_product = false)
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
-
108
- model = content_for(node, 'IMODEL')
109
- series = content_for(node, 'SERIES')
110
- mfg_number = content_for(node, 'MFGINO')
111
-
112
- if features[:caliber]
113
- caliber = features[:caliber]
114
- elsif features[:gauge]
115
- caliber = features[:gauge]
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: UNITS_OF_MEASURE.fetch(content_for(node, 'UOM'), nil)
137
+ unit_of_measure: unit_of_measure,
140
138
  }
141
139
  end
142
140
 
@@ -1,3 +1,3 @@
1
1
  module SportsSouth
2
- VERSION = '5.0.0'.freeze
2
+ VERSION = '5.0.1'.freeze
3
3
  end
@@ -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", "~> 10.0"
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.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: 2019-08-27 00:00:00.000000000 Z
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: '10.0'
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: '10.0'
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.7.7
163
+ rubygems_version: 2.6.14.1
164
164
  signing_key:
165
165
  specification_version: 4
166
166
  summary: Sports South API Ruby library.