desertcart 1.0.0 → 1.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.github/workflows/ruby.yml +36 -0
- data/.rubocop.yml +25 -0
- data/.ruby-version +1 -0
- data/CHANGELOG.md +5 -0
- data/Gemfile.lock +25 -2
- data/desertcart.gemspec +5 -4
- data/lib/desertcart/marketplace/movement/operations/update.rb +22 -0
- data/lib/desertcart/resources/marketplace/authorization.rb +2 -0
- data/lib/desertcart/resources/marketplace/order_item_acceptance.rb +2 -0
- data/lib/desertcart/resources/marketplace/order_item_rejection.rb +2 -0
- data/lib/desertcart/version.rb +1 -1
- data/lib/desertcart.rb +1 -0
- metadata +39 -8
- data/.github/workflows/main.yml +0 -18
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: f9055c4070ac08ab9cb9acad99acaf9c4df0fbfae57a2ed4aa04fab6f92c8060
|
4
|
+
data.tar.gz: c315f3d9d41d41e144dd6b544d0976336a028fcb3f4cc37d6b368d414549d937
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 7514dafd549ea05bafe81d60dfd0934ddc832aa903e15277180d9eea025bf092011249212039a596fa69a6a73ed827ff2552cfbed339896341f4f61d1030425e
|
7
|
+
data.tar.gz: 56b190489ea24d756d6a3eb3a41685a3b55c42105307a36b88230d234e748ba7d20f71927f8151ee82820f174ef31d1e4e9b200c3f853c637170334f03246a15
|
@@ -0,0 +1,36 @@
|
|
1
|
+
# This workflow uses actions that are not certified by GitHub.
|
2
|
+
# They are provided by a third-party and are governed by
|
3
|
+
# separate terms of service, privacy policy, and support
|
4
|
+
# documentation.
|
5
|
+
# This workflow will download a prebuilt Ruby version, install dependencies and run tests with Rake
|
6
|
+
# For more information see: https://github.com/marketplace/actions/setup-ruby-jruby-and-truffleruby
|
7
|
+
|
8
|
+
name: Ruby
|
9
|
+
|
10
|
+
on:
|
11
|
+
push:
|
12
|
+
branches: [master]
|
13
|
+
pull_request:
|
14
|
+
branches: [master]
|
15
|
+
|
16
|
+
jobs:
|
17
|
+
test:
|
18
|
+
runs-on: ubuntu-latest
|
19
|
+
strategy:
|
20
|
+
matrix:
|
21
|
+
ruby-version: ["2.7", "3.0"]
|
22
|
+
|
23
|
+
steps:
|
24
|
+
- uses: actions/checkout@v2
|
25
|
+
- name: Set up Ruby
|
26
|
+
# To automatically get bug fixes and new Ruby versions for ruby/setup-ruby,
|
27
|
+
# change this to (see https://github.com/ruby/setup-ruby#versioning):
|
28
|
+
# uses: ruby/setup-ruby@v1
|
29
|
+
uses: ruby/setup-ruby@473e4d8fe5dd94ee328fdfca9f8c9c7afc9dae5e
|
30
|
+
with:
|
31
|
+
ruby-version: ${{ matrix.ruby-version }}
|
32
|
+
bundler-cache: true # runs 'bundle install' and caches installed gems automatically
|
33
|
+
- name: Rspec
|
34
|
+
run: bundle exec rspec
|
35
|
+
- name: Rubocop
|
36
|
+
run: bundle exec rubocop
|
data/.rubocop.yml
ADDED
@@ -0,0 +1,25 @@
|
|
1
|
+
inherit_mode:
|
2
|
+
merge:
|
3
|
+
- Exclude
|
4
|
+
|
5
|
+
AllCops:
|
6
|
+
TargetRubyVersion: 2.7
|
7
|
+
Exclude:
|
8
|
+
- "Gemfile"
|
9
|
+
- "Rakefile"
|
10
|
+
- "bin/**/*"
|
11
|
+
- "spec/**/*"
|
12
|
+
|
13
|
+
Style/StringLiterals:
|
14
|
+
Enabled: true
|
15
|
+
EnforcedStyle: single_quotes
|
16
|
+
|
17
|
+
Style/StringLiteralsInInterpolation:
|
18
|
+
Enabled: true
|
19
|
+
EnforcedStyle: single_quotes
|
20
|
+
|
21
|
+
Layout/LineLength:
|
22
|
+
Max: 100
|
23
|
+
|
24
|
+
Style/Documentation:
|
25
|
+
Enabled: false
|
data/.ruby-version
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
ruby-2.7.2
|
data/CHANGELOG.md
CHANGED
@@ -1,5 +1,10 @@
|
|
1
1
|
## [Unreleased]
|
2
2
|
|
3
|
+
## [1.1.0] - 2021-09-26
|
4
|
+
|
5
|
+
- Feature: Support Ruby 2.7 and newer
|
6
|
+
- Feature: Expose `Marketplace::Movement::Operations::Update` operation to update `estimated_arrival_at`
|
7
|
+
|
3
8
|
## [1.0.0] - 2021-09-01
|
4
9
|
|
5
10
|
- Initial release of first stable version.
|
data/Gemfile.lock
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
desertcart (1.
|
4
|
+
desertcart (1.1.0)
|
5
5
|
ledger_sync (~> 2.2.0)
|
6
6
|
|
7
7
|
GEM
|
@@ -15,9 +15,11 @@ GEM
|
|
15
15
|
minitest (>= 5.1)
|
16
16
|
tzinfo (~> 2.0)
|
17
17
|
zeitwerk (~> 2.3)
|
18
|
+
ast (2.4.2)
|
18
19
|
colorize (0.8.1)
|
19
20
|
concurrent-ruby (1.1.9)
|
20
21
|
diff-lcs (1.4.4)
|
22
|
+
dotenv (2.7.6)
|
21
23
|
dry-configurable (0.12.1)
|
22
24
|
concurrent-ruby (~> 1.0)
|
23
25
|
dry-core (~> 0.5, >= 0.5.0)
|
@@ -100,12 +102,18 @@ GEM
|
|
100
102
|
nokogiri (1.12.4-x86_64-linux)
|
101
103
|
racc (~> 1.4)
|
102
104
|
openssl (2.2.0)
|
105
|
+
parallel (1.21.0)
|
106
|
+
parser (3.0.2.0)
|
107
|
+
ast (~> 2.4.1)
|
103
108
|
pd_ruby (0.2.3)
|
104
109
|
colorize
|
105
110
|
racc (1.5.2)
|
106
111
|
rack (2.2.3)
|
112
|
+
rainbow (3.0.0)
|
107
113
|
rake (13.0.6)
|
114
|
+
regexp_parser (2.1.1)
|
108
115
|
resonad (1.4.0)
|
116
|
+
rexml (3.2.5)
|
109
117
|
rspec (3.10.0)
|
110
118
|
rspec-core (~> 3.10.0)
|
111
119
|
rspec-expectations (~> 3.10.0)
|
@@ -119,11 +127,24 @@ GEM
|
|
119
127
|
diff-lcs (>= 1.2.0, < 2.0)
|
120
128
|
rspec-support (~> 3.10.0)
|
121
129
|
rspec-support (3.10.2)
|
130
|
+
rubocop (1.21.0)
|
131
|
+
parallel (~> 1.10)
|
132
|
+
parser (>= 3.0.0.0)
|
133
|
+
rainbow (>= 2.2.2, < 4.0)
|
134
|
+
regexp_parser (>= 1.8, < 3.0)
|
135
|
+
rexml
|
136
|
+
rubocop-ast (>= 1.9.1, < 2.0)
|
137
|
+
ruby-progressbar (~> 1.7)
|
138
|
+
unicode-display_width (>= 1.4.0, < 3.0)
|
139
|
+
rubocop-ast (1.11.0)
|
140
|
+
parser (>= 3.0.1.1)
|
141
|
+
ruby-progressbar (1.11.0)
|
122
142
|
ruby2_keywords (0.0.5)
|
123
143
|
simply_serializable (1.5.1)
|
124
144
|
fingerprintable (>= 1.2.1)
|
125
145
|
tzinfo (2.0.4)
|
126
146
|
concurrent-ruby (~> 1.0)
|
147
|
+
unicode-display_width (2.1.0)
|
127
148
|
zeitwerk (2.4.2)
|
128
149
|
|
129
150
|
PLATFORMS
|
@@ -131,8 +152,10 @@ PLATFORMS
|
|
131
152
|
|
132
153
|
DEPENDENCIES
|
133
154
|
desertcart!
|
155
|
+
dotenv
|
134
156
|
rake (~> 13.0)
|
135
157
|
rspec (~> 3.0)
|
158
|
+
rubocop
|
136
159
|
|
137
160
|
BUNDLED WITH
|
138
|
-
2.2.
|
161
|
+
2.2.26
|
data/desertcart.gemspec
CHANGED
@@ -1,11 +1,10 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
-
|
3
|
+
require_relative 'lib/desertcart/version'
|
4
4
|
|
5
5
|
Gem::Specification.new do |spec|
|
6
6
|
spec.name = 'desertcart'
|
7
|
-
|
8
|
-
spec.version = '1.0.0'
|
7
|
+
spec.version = Desertcart::VERSION
|
9
8
|
spec.authors = ['Jozef Vaclavik']
|
10
9
|
spec.email = ['jozef@desertcart.com']
|
11
10
|
|
@@ -15,7 +14,7 @@ Gem::Specification.new do |spec|
|
|
15
14
|
'and retrieve informations about your orders.'
|
16
15
|
spec.homepage = 'https://developer.desertcart.com'
|
17
16
|
spec.license = 'MIT'
|
18
|
-
spec.required_ruby_version = '>=
|
17
|
+
spec.required_ruby_version = '>= 2.7'
|
19
18
|
|
20
19
|
spec.metadata['homepage_uri'] = spec.homepage
|
21
20
|
spec.metadata['source_code_uri'] = 'https://github.com/desertcart/desertcart-ruby'
|
@@ -31,4 +30,6 @@ Gem::Specification.new do |spec|
|
|
31
30
|
spec.require_paths = ['lib']
|
32
31
|
|
33
32
|
spec.add_dependency 'ledger_sync', '~> 2.2.0'
|
33
|
+
spec.add_development_dependency 'dotenv'
|
34
|
+
spec.add_development_dependency 'rubocop'
|
34
35
|
end
|
@@ -0,0 +1,22 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module Desertcart
|
4
|
+
module Marketplace
|
5
|
+
class Movement
|
6
|
+
module Operations
|
7
|
+
class Update < Desertcart::Operation::Update
|
8
|
+
class Contract < LedgerSync::Ledgers::Contract
|
9
|
+
params do
|
10
|
+
required(:ledger_id).filled(:string)
|
11
|
+
required(:estimated_arrival_at).filled(:integer)
|
12
|
+
end
|
13
|
+
end
|
14
|
+
|
15
|
+
def ledger_namespace_path
|
16
|
+
'marketplace'
|
17
|
+
end
|
18
|
+
end
|
19
|
+
end
|
20
|
+
end
|
21
|
+
end
|
22
|
+
end
|
data/lib/desertcart/version.rb
CHANGED
data/lib/desertcart.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: desertcart
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 1.1.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Jozef Vaclavik
|
8
|
-
autorequire:
|
8
|
+
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2021-09-
|
11
|
+
date: 2021-09-26 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: ledger_sync
|
@@ -24,6 +24,34 @@ dependencies:
|
|
24
24
|
- - "~>"
|
25
25
|
- !ruby/object:Gem::Version
|
26
26
|
version: 2.2.0
|
27
|
+
- !ruby/object:Gem::Dependency
|
28
|
+
name: dotenv
|
29
|
+
requirement: !ruby/object:Gem::Requirement
|
30
|
+
requirements:
|
31
|
+
- - ">="
|
32
|
+
- !ruby/object:Gem::Version
|
33
|
+
version: '0'
|
34
|
+
type: :development
|
35
|
+
prerelease: false
|
36
|
+
version_requirements: !ruby/object:Gem::Requirement
|
37
|
+
requirements:
|
38
|
+
- - ">="
|
39
|
+
- !ruby/object:Gem::Version
|
40
|
+
version: '0'
|
41
|
+
- !ruby/object:Gem::Dependency
|
42
|
+
name: rubocop
|
43
|
+
requirement: !ruby/object:Gem::Requirement
|
44
|
+
requirements:
|
45
|
+
- - ">="
|
46
|
+
- !ruby/object:Gem::Version
|
47
|
+
version: '0'
|
48
|
+
type: :development
|
49
|
+
prerelease: false
|
50
|
+
version_requirements: !ruby/object:Gem::Requirement
|
51
|
+
requirements:
|
52
|
+
- - ">="
|
53
|
+
- !ruby/object:Gem::Version
|
54
|
+
version: '0'
|
27
55
|
description: Client library to talk to Desertcart API. Get products details, proceed
|
28
56
|
with checkout and retrieve informations about your orders.
|
29
57
|
email:
|
@@ -32,9 +60,11 @@ executables: []
|
|
32
60
|
extensions: []
|
33
61
|
extra_rdoc_files: []
|
34
62
|
files:
|
35
|
-
- ".github/workflows/
|
63
|
+
- ".github/workflows/ruby.yml"
|
36
64
|
- ".gitignore"
|
37
65
|
- ".rspec"
|
66
|
+
- ".rubocop.yml"
|
67
|
+
- ".ruby-version"
|
38
68
|
- CHANGELOG.md
|
39
69
|
- Gemfile
|
40
70
|
- Gemfile.lock
|
@@ -55,6 +85,7 @@ files:
|
|
55
85
|
- lib/desertcart/marketplace/authorizations/serializer.rb
|
56
86
|
- lib/desertcart/marketplace/movement/deserializer.rb
|
57
87
|
- lib/desertcart/marketplace/movement/operations/create.rb
|
88
|
+
- lib/desertcart/marketplace/movement/operations/update.rb
|
58
89
|
- lib/desertcart/marketplace/movement/serializer.rb
|
59
90
|
- lib/desertcart/marketplace/order_item/deserializer.rb
|
60
91
|
- lib/desertcart/marketplace/order_item/operations/find.rb
|
@@ -103,7 +134,7 @@ metadata:
|
|
103
134
|
homepage_uri: https://developer.desertcart.com
|
104
135
|
source_code_uri: https://github.com/desertcart/desertcart-ruby
|
105
136
|
changelog_uri: https://github.com/desertcart/desertcart-ruby/blob/master/CHANGELOG.md
|
106
|
-
post_install_message:
|
137
|
+
post_install_message:
|
107
138
|
rdoc_options: []
|
108
139
|
require_paths:
|
109
140
|
- lib
|
@@ -111,15 +142,15 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
111
142
|
requirements:
|
112
143
|
- - ">="
|
113
144
|
- !ruby/object:Gem::Version
|
114
|
-
version: '
|
145
|
+
version: '2.7'
|
115
146
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
116
147
|
requirements:
|
117
148
|
- - ">="
|
118
149
|
- !ruby/object:Gem::Version
|
119
150
|
version: '0'
|
120
151
|
requirements: []
|
121
|
-
rubygems_version: 3.2.
|
122
|
-
signing_key:
|
152
|
+
rubygems_version: 3.2.9
|
153
|
+
signing_key:
|
123
154
|
specification_version: 4
|
124
155
|
summary: Communicate with Desertcart API
|
125
156
|
test_files: []
|
data/.github/workflows/main.yml
DELETED
@@ -1,18 +0,0 @@
|
|
1
|
-
name: Ruby
|
2
|
-
|
3
|
-
on: [push,pull_request]
|
4
|
-
|
5
|
-
jobs:
|
6
|
-
build:
|
7
|
-
runs-on: ubuntu-latest
|
8
|
-
steps:
|
9
|
-
- uses: actions/checkout@v2
|
10
|
-
- name: Set up Ruby
|
11
|
-
uses: ruby/setup-ruby@v1
|
12
|
-
with:
|
13
|
-
ruby-version: 3.0.0
|
14
|
-
- name: Run the default task
|
15
|
-
run: |
|
16
|
-
gem install bundler -v 2.2.15
|
17
|
-
bundle install
|
18
|
-
bundle exec rake
|