freight_kit 0.1.7 → 0.1.10

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: a1a16a176e2607d375974ecc445bd469ea7f75b4b40d6f7d52e1f2962968a96b
4
- data.tar.gz: adb1cca619f631ea4a336bc26fe760b8443ca50954e2582347051854180d9ddb
3
+ metadata.gz: 0ba121940e4aee8d935c8271965ae2e664b689e6bbd77b1384734dec700418b8
4
+ data.tar.gz: 4d16dff72f36cc1a0bbb0439c54924669afa5d58df9b13bc532d6bad7ca54c02
5
5
  SHA512:
6
- metadata.gz: 3f33596bfc559c2536859dc584f7b03566f9dcc6597f177babfebf3fc1e19365877b3282eb98753fdecfbc4ee32799c3805c292aafab89691f8dcd2a07090754
7
- data.tar.gz: 5ce3a8976040fcd069bed141be14ec4189247584de398f343ccf354bfaca617a243defcc57afc33bac05748bc75ab9fd4312412e71851e01688915f0baf6d34e
6
+ metadata.gz: 06b93550859d6e45c09d836a11f030f91844573aaafdc0407d4fee98664ec8807ced4752275780eda52cb926235e1ab3eeecd075eeeb766cb7a6bb254d67fb41
7
+ data.tar.gz: de761d4e2b158d605e864f42e35c374c1c3b4bfda369eb55994d47ea71f5a1cb65b3007dd85be5b5584fdc006dd03a48d1dfc4fea1ab983d8488aba1acce9c42
data/Gemfile.lock CHANGED
@@ -1,20 +1,20 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- freight_kit (0.1.7)
4
+ freight_kit (0.1.9)
5
5
  active_utils (>= 3.3.1, < 3.5.0)
6
- activemodel (>= 4.2, < 7.1.4)
7
- activesupport (>= 4.2, < 7.1.4)
6
+ activemodel (>= 4.2, < 8.0.1)
7
+ activesupport (>= 4.2, < 7.2.3)
8
8
  business_time (~> 0.13.0)
9
9
  httparty (~> 0.10)
10
- measured (>= 2.0, < 3.0.1)
10
+ measured (>= 2.0, < 3.1.1)
11
11
  mimemagic (~> 0.4.3)
12
12
  nokogiri (>= 1.6, < 1.17)
13
13
  place_kit (~> 0.0.2)
14
14
  savon (>= 2.0, < 2.16)
15
15
  tzinfo-data (~> 1.2023, >= 1.2023.3)
16
16
  watir (>= 7.0, < 7.4)
17
- zeitwerk (>= 2.6.0, < 2.6.16)
17
+ zeitwerk (>= 2.6.0, < 2.7.2)
18
18
 
19
19
  GEM
20
20
  remote: https://rubygems.org/
@@ -42,7 +42,7 @@ GEM
42
42
  tzinfo
43
43
  concurrent-ruby (1.2.2)
44
44
  diff-lcs (1.5.0)
45
- faker (3.4.1)
45
+ faker (3.5.1)
46
46
  i18n (>= 1.8.11, < 2)
47
47
  fastcsv (0.0.7)
48
48
  gyoku (1.4.0)
@@ -167,9 +167,10 @@ GEM
167
167
  PLATFORMS
168
168
  arm64-darwin-22
169
169
  arm64-darwin-23
170
+ arm64-darwin-24
170
171
 
171
172
  DEPENDENCIES
172
- faker (~> 3.4.1)
173
+ faker (~> 3.5.1)
173
174
  freight_kit!
174
175
  rake (~> 13.2.1)
175
176
  redcarpet (~> 3.6.0)
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.1.7
1
+ 0.1.10
data/freight_kit.gemspec CHANGED
@@ -28,26 +28,26 @@ Gem::Specification.new do |spec|
28
28
  Dir['test/**/*']
29
29
  spec.require_paths = ['lib']
30
30
 
31
- spec.add_development_dependency('faker', '~> 3.4.1')
31
+ spec.add_development_dependency('faker', '~> 3.5.1')
32
32
  spec.add_development_dependency('rake', '~> 13.2.1')
33
33
  spec.add_development_dependency('redcarpet', '~> 3.6.0') # for yard
34
34
  spec.add_development_dependency('rspec', '~> 3.12')
35
35
  spec.add_development_dependency('rubocop-next', '~> 1.0.7')
36
36
  spec.add_development_dependency('yard', '~> 0.9.28')
37
37
 
38
- spec.add_dependency('activemodel', '>= 4.2', '< 7.1.4')
39
- spec.add_dependency('activesupport', '>= 4.2', '< 7.1.4')
38
+ spec.add_dependency('activemodel', '>= 4.2', '< 8.0.1')
39
+ spec.add_dependency('activesupport', '>= 4.2', '< 7.2.3')
40
40
  spec.add_dependency('active_utils', '>= 3.3.1', '< 3.5.0')
41
41
  spec.add_dependency('business_time', '~> 0.13.0')
42
42
  spec.add_dependency('httparty', '~> 0.10')
43
- spec.add_dependency('measured', '>= 2.0', '< 3.0.1')
43
+ spec.add_dependency('measured', '>= 2.0', '< 3.1.1')
44
44
  spec.add_dependency('mimemagic', '~> 0.4.3')
45
45
  spec.add_dependency('nokogiri', '>= 1.6', '< 1.17')
46
46
  spec.add_dependency('place_kit', '~> 0.0.2')
47
47
  spec.add_dependency('savon', '>= 2.0', '< 2.16')
48
48
  spec.add_dependency('tzinfo-data', '~> 1.2023', '>= 1.2023.3')
49
49
  spec.add_dependency('watir', '>= 7.0', '< 7.4')
50
- spec.add_dependency('zeitwerk', '>= 2.6.0', '< 2.6.16')
50
+ spec.add_dependency('zeitwerk', '>= 2.6.0', '< 2.7.2')
51
51
 
52
52
  spec.required_ruby_version = '>= 3.2.0'
53
53
  end
@@ -39,13 +39,18 @@ module FreightKit # :nodoc:
39
39
  raise ArgumentError, 'Package#new: packaging_type is required' unless packaging_type
40
40
  raise ArgumentError, 'Package#new: quantity is required' unless options[:quantity]
41
41
 
42
- # For backward compatibility
43
- if dimensions.is_a?(Array)
44
- @dimensions = [dimensions].flatten.reject(&:nil?)
45
- else
46
- @dimensions = [dimensions.dig(:height), dimensions.dig(:width), dimensions.dig(:length)]
47
- @dimensions = [@dimensions].flatten.reject(&:nil?)
48
- end
42
+ @dimensions = case dimensions
43
+ when Array
44
+ dimensions.map(&:presence)
45
+ when Hash
46
+ [
47
+ dimensions[:height].presence,
48
+ dimensions[:width].presence,
49
+ dimensions[:length].presence,
50
+ ]
51
+ else
52
+ [nil, nil, nil]
53
+ end
49
54
 
50
55
  @description = options[:description]
51
56
  @hazmat = options[:hazmat] == true
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: freight_kit
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.7
4
+ version: 0.1.10
5
5
  platform: ruby
6
6
  authors:
7
7
  - Third Party Transportation Systems LLC
@@ -11,7 +11,7 @@ authors:
11
11
  autorequire:
12
12
  bindir: bin
13
13
  cert_chain: []
14
- date: 2024-06-12 00:00:00.000000000 Z
14
+ date: 2024-11-17 00:00:00.000000000 Z
15
15
  dependencies:
16
16
  - !ruby/object:Gem::Dependency
17
17
  name: faker
@@ -19,14 +19,14 @@ dependencies:
19
19
  requirements:
20
20
  - - "~>"
21
21
  - !ruby/object:Gem::Version
22
- version: 3.4.1
22
+ version: 3.5.1
23
23
  type: :development
24
24
  prerelease: false
25
25
  version_requirements: !ruby/object:Gem::Requirement
26
26
  requirements:
27
27
  - - "~>"
28
28
  - !ruby/object:Gem::Version
29
- version: 3.4.1
29
+ version: 3.5.1
30
30
  - !ruby/object:Gem::Dependency
31
31
  name: rake
32
32
  requirement: !ruby/object:Gem::Requirement
@@ -106,7 +106,7 @@ dependencies:
106
106
  version: '4.2'
107
107
  - - "<"
108
108
  - !ruby/object:Gem::Version
109
- version: 7.1.4
109
+ version: 8.0.1
110
110
  type: :runtime
111
111
  prerelease: false
112
112
  version_requirements: !ruby/object:Gem::Requirement
@@ -116,7 +116,7 @@ dependencies:
116
116
  version: '4.2'
117
117
  - - "<"
118
118
  - !ruby/object:Gem::Version
119
- version: 7.1.4
119
+ version: 8.0.1
120
120
  - !ruby/object:Gem::Dependency
121
121
  name: activesupport
122
122
  requirement: !ruby/object:Gem::Requirement
@@ -126,7 +126,7 @@ dependencies:
126
126
  version: '4.2'
127
127
  - - "<"
128
128
  - !ruby/object:Gem::Version
129
- version: 7.1.4
129
+ version: 7.2.3
130
130
  type: :runtime
131
131
  prerelease: false
132
132
  version_requirements: !ruby/object:Gem::Requirement
@@ -136,7 +136,7 @@ dependencies:
136
136
  version: '4.2'
137
137
  - - "<"
138
138
  - !ruby/object:Gem::Version
139
- version: 7.1.4
139
+ version: 7.2.3
140
140
  - !ruby/object:Gem::Dependency
141
141
  name: active_utils
142
142
  requirement: !ruby/object:Gem::Requirement
@@ -194,7 +194,7 @@ dependencies:
194
194
  version: '2.0'
195
195
  - - "<"
196
196
  - !ruby/object:Gem::Version
197
- version: 3.0.1
197
+ version: 3.1.1
198
198
  type: :runtime
199
199
  prerelease: false
200
200
  version_requirements: !ruby/object:Gem::Requirement
@@ -204,7 +204,7 @@ dependencies:
204
204
  version: '2.0'
205
205
  - - "<"
206
206
  - !ruby/object:Gem::Version
207
- version: 3.0.1
207
+ version: 3.1.1
208
208
  - !ruby/object:Gem::Dependency
209
209
  name: mimemagic
210
210
  requirement: !ruby/object:Gem::Requirement
@@ -322,7 +322,7 @@ dependencies:
322
322
  version: 2.6.0
323
323
  - - "<"
324
324
  - !ruby/object:Gem::Version
325
- version: 2.6.16
325
+ version: 2.7.2
326
326
  type: :runtime
327
327
  prerelease: false
328
328
  version_requirements: !ruby/object:Gem::Requirement
@@ -332,7 +332,7 @@ dependencies:
332
332
  version: 2.6.0
333
333
  - - "<"
334
334
  - !ruby/object:Gem::Version
335
- version: 2.6.16
335
+ version: 2.7.2
336
336
  description: Freight carrier API and website abstraction library for transportation
337
337
  management systems (TMS)
338
338
  email:
@@ -404,7 +404,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
404
404
  - !ruby/object:Gem::Version
405
405
  version: '0'
406
406
  requirements: []
407
- rubygems_version: 3.4.19
407
+ rubygems_version: 3.5.22
408
408
  signing_key:
409
409
  specification_version: 4
410
410
  summary: Freight carrier API and website abstraction library for transportation management