we_ship_client 1.0.0 → 1.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/.github/workflows/gem-push.yml +3 -5
- data/.github/workflows/specs.yml +12 -7
- data/Gemfile +1 -1
- data/Gemfile.lock +27 -31
- data/lib/we_ship_client/entities/order_item.rb +1 -1
- data/lib/we_ship_client/entities/process_orders_request.rb +3 -3
- data/lib/we_ship_client/version.rb +1 -1
- data/lib/we_ship_client.rb +1 -1
- data/we_ship_client.gemspec +2 -2
- metadata +8 -14
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 2085010e2a63d6304cec95a3edc485f4cb7376e82cf87d6e3955095e1806977b
|
|
4
|
+
data.tar.gz: dbba31ab58b4d14eac7bf5aa3405fe6f15e36bf7f9cae788951285b80b8f1f1f
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: bb68b5582678bfd41b172fc8af0842af60fb727af5b32727a1457b6d1f7d431b3b4de6026e70ae740f61c73af59e83b89b27e1ad82d9c636e5f8c5aa9b12bf0d
|
|
7
|
+
data.tar.gz: f72ad4eeb8ef42eb830b8ad80a9411ae175b4c01c25efea3f47cc838a24bc299354e3438cd2d555482776eca83f742e8414ac6d5f3d80414bb118ffaaef55cea
|
|
@@ -3,8 +3,6 @@ name: Ruby Gem
|
|
|
3
3
|
on:
|
|
4
4
|
push:
|
|
5
5
|
branches: [ "main" ]
|
|
6
|
-
pull_request:
|
|
7
|
-
branches: [ "main" ]
|
|
8
6
|
|
|
9
7
|
jobs:
|
|
10
8
|
build:
|
|
@@ -16,10 +14,10 @@ jobs:
|
|
|
16
14
|
|
|
17
15
|
steps:
|
|
18
16
|
- uses: actions/checkout@v3
|
|
19
|
-
- name: Set up Ruby 2.
|
|
20
|
-
uses:
|
|
17
|
+
- name: Set up Ruby 2.7
|
|
18
|
+
uses: ruby/setup-ruby@v1
|
|
21
19
|
with:
|
|
22
|
-
ruby-version: 2.
|
|
20
|
+
ruby-version: 2.7
|
|
23
21
|
|
|
24
22
|
- name: Publish to RubyGems
|
|
25
23
|
run: |
|
data/.github/workflows/specs.yml
CHANGED
|
@@ -13,21 +13,26 @@ on:
|
|
|
13
13
|
pull_request:
|
|
14
14
|
branches: [ main ]
|
|
15
15
|
|
|
16
|
+
env:
|
|
17
|
+
WE_SHIP_BASE_URL: 'https://api.mapss.stage.aim.hosting/v2'
|
|
18
|
+
WE_SHIP_FORMAT_VERSION: '123'
|
|
19
|
+
WE_SHIP_CUSTOMER_CODE: 'CUSTOMER_CODE'
|
|
20
|
+
WE_SHIP_ALLOW_DUPLICATES: 'Y'
|
|
21
|
+
WE_SHIP_DEFAULT_PRODUCT_TYPE: 'XXX'
|
|
22
|
+
|
|
16
23
|
jobs:
|
|
17
24
|
test:
|
|
18
|
-
|
|
19
25
|
runs-on: ubuntu-latest
|
|
20
26
|
strategy:
|
|
21
27
|
matrix:
|
|
22
|
-
ruby-version: ['
|
|
28
|
+
ruby-version: ['3.0', '3.1', '3.2']
|
|
23
29
|
|
|
24
30
|
steps:
|
|
25
|
-
- uses: actions/checkout@
|
|
31
|
+
- uses: actions/checkout@v3
|
|
26
32
|
- name: Set up Ruby
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
uses: ruby/setup-ruby@473e4d8fe5dd94ee328fdfca9f8c9c7afc9dae5e
|
|
33
|
+
# To automatically get bug fixes and new Ruby versions for ruby/setup-ruby,
|
|
34
|
+
# change this to (see https://github.com/ruby/setup-ruby#versioning):
|
|
35
|
+
uses: ruby/setup-ruby@v1
|
|
31
36
|
with:
|
|
32
37
|
ruby-version: ${{ matrix.ruby-version }}
|
|
33
38
|
bundler-cache: true # runs 'bundle install' and caches installed gems automatically
|
data/Gemfile
CHANGED
data/Gemfile.lock
CHANGED
|
@@ -1,17 +1,9 @@
|
|
|
1
|
-
PATH
|
|
2
|
-
remote: ../loogi_http
|
|
3
|
-
specs:
|
|
4
|
-
loogi_http (1.0.0)
|
|
5
|
-
faraday (~> 1.0.1)
|
|
6
|
-
faraday-cookie_jar (~> 0.0.6)
|
|
7
|
-
faraday_middleware (~> 1.0.0)
|
|
8
|
-
|
|
9
1
|
PATH
|
|
10
2
|
remote: .
|
|
11
3
|
specs:
|
|
12
|
-
we_ship_client (1.
|
|
4
|
+
we_ship_client (1.1.1)
|
|
13
5
|
activesupport
|
|
14
|
-
dry-struct (
|
|
6
|
+
dry-struct (~> 1.4)
|
|
15
7
|
dry-types
|
|
16
8
|
loogi_http (~> 1.0)
|
|
17
9
|
|
|
@@ -33,28 +25,25 @@ GEM
|
|
|
33
25
|
domain_name (0.5.20190701)
|
|
34
26
|
unf (>= 0.0.5, < 1.0.0)
|
|
35
27
|
dotenv (2.7.6)
|
|
36
|
-
dry-
|
|
28
|
+
dry-core (1.0.0)
|
|
37
29
|
concurrent-ruby (~> 1.0)
|
|
38
|
-
|
|
39
|
-
dry-
|
|
30
|
+
zeitwerk (~> 2.6)
|
|
31
|
+
dry-inflector (1.0.0)
|
|
32
|
+
dry-logic (1.5.0)
|
|
40
33
|
concurrent-ruby (~> 1.0)
|
|
41
|
-
dry-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
concurrent-ruby (~> 1.0)
|
|
47
|
-
dry-core (~> 0.5, >= 0.5)
|
|
48
|
-
dry-struct (1.4.0)
|
|
49
|
-
dry-core (~> 0.5, >= 0.5)
|
|
50
|
-
dry-types (~> 1.5)
|
|
34
|
+
dry-core (~> 1.0, < 2)
|
|
35
|
+
zeitwerk (~> 2.6)
|
|
36
|
+
dry-struct (1.6.0)
|
|
37
|
+
dry-core (~> 1.0, < 2)
|
|
38
|
+
dry-types (>= 1.7, < 2)
|
|
51
39
|
ice_nine (~> 0.11)
|
|
52
|
-
|
|
40
|
+
zeitwerk (~> 2.6)
|
|
41
|
+
dry-types (1.7.1)
|
|
53
42
|
concurrent-ruby (~> 1.0)
|
|
54
|
-
dry-
|
|
55
|
-
dry-
|
|
56
|
-
dry-
|
|
57
|
-
|
|
43
|
+
dry-core (~> 1.0)
|
|
44
|
+
dry-inflector (~> 1.0)
|
|
45
|
+
dry-logic (~> 1.4)
|
|
46
|
+
zeitwerk (~> 2.6)
|
|
58
47
|
faraday (1.0.1)
|
|
59
48
|
multipart-post (>= 1.2, < 3)
|
|
60
49
|
faraday-cookie_jar (0.0.7)
|
|
@@ -68,6 +57,10 @@ GEM
|
|
|
68
57
|
i18n (1.10.0)
|
|
69
58
|
concurrent-ruby (~> 1.0)
|
|
70
59
|
ice_nine (0.11.2)
|
|
60
|
+
loogi_http (1.0.0)
|
|
61
|
+
faraday (~> 1.0.1)
|
|
62
|
+
faraday-cookie_jar (~> 0.0.6)
|
|
63
|
+
faraday_middleware (~> 1.0.0)
|
|
71
64
|
minitest (5.15.0)
|
|
72
65
|
multipart-post (2.1.1)
|
|
73
66
|
public_suffix (4.0.6)
|
|
@@ -98,15 +91,18 @@ GEM
|
|
|
98
91
|
addressable (>= 2.8.0)
|
|
99
92
|
crack (>= 0.3.2)
|
|
100
93
|
hashdiff (>= 0.4.0, < 2.0.0)
|
|
101
|
-
zeitwerk (2.
|
|
94
|
+
zeitwerk (2.6.9)
|
|
102
95
|
|
|
103
96
|
PLATFORMS
|
|
97
|
+
arm64-darwin-21
|
|
98
|
+
arm64-darwin-22
|
|
104
99
|
x86_64-darwin-20
|
|
105
100
|
x86_64-darwin-21
|
|
101
|
+
x86_64-linux
|
|
106
102
|
|
|
107
103
|
DEPENDENCIES
|
|
108
104
|
dotenv (~> 2.7)
|
|
109
|
-
loogi_http (~> 1.0)
|
|
105
|
+
loogi_http (~> 1.0)
|
|
110
106
|
rake (~> 12.0)
|
|
111
107
|
rspec (~> 3.0)
|
|
112
108
|
stub_env
|
|
@@ -115,4 +111,4 @@ DEPENDENCIES
|
|
|
115
111
|
webmock
|
|
116
112
|
|
|
117
113
|
BUNDLED WITH
|
|
118
|
-
2.
|
|
114
|
+
2.4.12
|
|
@@ -8,7 +8,7 @@ module WeShipClient
|
|
|
8
8
|
class OrderItem < Base
|
|
9
9
|
attribute :productName, Types::Strict::String
|
|
10
10
|
attribute :productSKU, Types::Strict::String
|
|
11
|
-
attribute :productType, Types::Strict::String.default
|
|
11
|
+
attribute :productType, Types::Strict::String.default { ENV['WE_SHIP_DEFAULT_PRODUCT_TYPE'] }
|
|
12
12
|
attribute :quantity, Types::Strict::Integer
|
|
13
13
|
attribute :weight, Types::Strict::String
|
|
14
14
|
end
|
|
@@ -15,9 +15,9 @@ module WeShipClient
|
|
|
15
15
|
# :description=>"Invalid content was found starting with element 'clientCode'. One of '{order}' is expected.",
|
|
16
16
|
# :status=>"Fail"
|
|
17
17
|
# }}}
|
|
18
|
-
attribute :formatVersion, Types::Strict::String.default
|
|
19
|
-
attribute :clientCode, Types::Strict::String.default
|
|
20
|
-
attribute :allowDuplicates, Types::Strict::String.default
|
|
18
|
+
attribute :formatVersion, Types::Strict::String.default { ENV['WE_SHIP_FORMAT_VERSION'] }
|
|
19
|
+
attribute :clientCode, Types::Strict::String.default { ENV['WE_SHIP_CUSTOMER_CODE'] }
|
|
20
|
+
attribute :allowDuplicates, Types::Strict::String.default { ENV['WE_SHIP_ALLOW_DUPLICATES'] }
|
|
21
21
|
attribute :order, Types::Strict::Array.of(Order)
|
|
22
22
|
end
|
|
23
23
|
end
|
data/lib/we_ship_client.rb
CHANGED
data/we_ship_client.gemspec
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
require_relative 'lib/we_ship_client/version'
|
|
2
2
|
|
|
3
3
|
Gem::Specification.new do |spec|
|
|
4
|
-
spec.required_ruby_version = '>=
|
|
4
|
+
spec.required_ruby_version = '>= 3.0'
|
|
5
5
|
spec.name = 'we_ship_client'
|
|
6
6
|
spec.version = WeShipClient::VERSION
|
|
7
7
|
spec.authors = ['Juul Labs, Inc.']
|
|
@@ -23,7 +23,7 @@ Gem::Specification.new do |spec|
|
|
|
23
23
|
spec.require_paths = ['lib']
|
|
24
24
|
|
|
25
25
|
spec.add_dependency 'activesupport'
|
|
26
|
-
spec.add_dependency 'dry-struct', '
|
|
26
|
+
spec.add_dependency 'dry-struct', '~> 1.4'
|
|
27
27
|
spec.add_dependency 'dry-types'
|
|
28
28
|
spec.add_dependency 'loogi_http', '~> 1.0'
|
|
29
29
|
|
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: we_ship_client
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 1.
|
|
4
|
+
version: 1.1.1
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Juul Labs, Inc.
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: exe
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date:
|
|
11
|
+
date: 2023-09-14 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: activesupport
|
|
@@ -28,22 +28,16 @@ dependencies:
|
|
|
28
28
|
name: dry-struct
|
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
|
30
30
|
requirements:
|
|
31
|
-
- - "
|
|
32
|
-
- !ruby/object:Gem::Version
|
|
33
|
-
version: '0.6'
|
|
34
|
-
- - "<"
|
|
31
|
+
- - "~>"
|
|
35
32
|
- !ruby/object:Gem::Version
|
|
36
|
-
version: '1.
|
|
33
|
+
version: '1.4'
|
|
37
34
|
type: :runtime
|
|
38
35
|
prerelease: false
|
|
39
36
|
version_requirements: !ruby/object:Gem::Requirement
|
|
40
37
|
requirements:
|
|
41
|
-
- - "
|
|
42
|
-
- !ruby/object:Gem::Version
|
|
43
|
-
version: '0.6'
|
|
44
|
-
- - "<"
|
|
38
|
+
- - "~>"
|
|
45
39
|
- !ruby/object:Gem::Version
|
|
46
|
-
version: '1.
|
|
40
|
+
version: '1.4'
|
|
47
41
|
- !ruby/object:Gem::Dependency
|
|
48
42
|
name: dry-types
|
|
49
43
|
requirement: !ruby/object:Gem::Requirement
|
|
@@ -172,14 +166,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
|
172
166
|
requirements:
|
|
173
167
|
- - ">="
|
|
174
168
|
- !ruby/object:Gem::Version
|
|
175
|
-
version: '
|
|
169
|
+
version: '3.0'
|
|
176
170
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
|
177
171
|
requirements:
|
|
178
172
|
- - ">="
|
|
179
173
|
- !ruby/object:Gem::Version
|
|
180
174
|
version: '0'
|
|
181
175
|
requirements: []
|
|
182
|
-
rubygems_version: 3.
|
|
176
|
+
rubygems_version: 3.1.6
|
|
183
177
|
signing_key:
|
|
184
178
|
specification_version: 4
|
|
185
179
|
summary: API client for We Ship Express V2.
|