stuart-client-ruby 1.0.0 → 1.1.1.pre.rc.12
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +5 -5
- data/.github/workflows/publish.yml +32 -0
- data/README.md +19 -6
- data/Rakefile +1 -1
- data/lib/{stuart → stuart-client-ruby}/client.rb +0 -0
- data/lib/{stuart → stuart-client-ruby}/infrastructure/api_response.rb +0 -0
- data/lib/{stuart → stuart-client-ruby}/infrastructure/authenticator.rb +0 -0
- data/lib/{stuart → stuart-client-ruby}/infrastructure/environment.rb +1 -1
- data/lib/{stuart → stuart-client-ruby}/infrastructure/http_client.rb +0 -0
- data/lib/{stuart → stuart-client-ruby}/version.rb +2 -2
- data/lib/stuart-client-ruby.rb +5 -0
- data/spec/spec_helper.rb +1 -1
- data/spec/{stuart → stuart-client-ruby}/infrastructure/authenticator_spec.rb +0 -0
- data/spec/{stuart → stuart-client-ruby}/infrastructure/http_client_spec.rb +0 -0
- data/stuart-client-ruby.gemspec +80 -0
- metadata +16 -16
- data/lib/stuart/.DS_Store +0 -0
- data/lib/stuart.rb +0 -5
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: 222d61649212d58cbdaa0e17574563ddc8781c5784a7d12e370436a3e8526e66
|
4
|
+
data.tar.gz: c9f67a2a9257d276062f657ed4da467b6a1db19a81fd501a7af7050c910d4fc8
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: be4250239d539a70007ddf45518a06e250f51d17b2062e841af04c09a30be146f61abfb3fd024786779093586760d79578d5e5780d26b8390060929f2b939d8e
|
7
|
+
data.tar.gz: a87734225c7ea4f1b07a00c7542655e569cedaf900db857bb6fd19d10ef3adedfc6d3aab3fc156e60b5f1025ee9f7c3f125d81357f9c6f8e41c079afce6dcb04
|
@@ -0,0 +1,32 @@
|
|
1
|
+
name: Ruby gem
|
2
|
+
|
3
|
+
on:
|
4
|
+
push:
|
5
|
+
tags:
|
6
|
+
- v*
|
7
|
+
|
8
|
+
jobs:
|
9
|
+
deploy:
|
10
|
+
runs-on: ubuntu-latest
|
11
|
+
|
12
|
+
steps:
|
13
|
+
- uses: actions/checkout@v3
|
14
|
+
|
15
|
+
- uses: ruby/setup-ruby@v1
|
16
|
+
with:
|
17
|
+
ruby-version: '2.7' # Not needed with a .ruby-version file
|
18
|
+
bundler-cache: true # runs 'bundle install' and caches installed gems automatically
|
19
|
+
|
20
|
+
- name: Build gem
|
21
|
+
run: |
|
22
|
+
bundle exec rake build
|
23
|
+
|
24
|
+
- name: Publish to RubyGems
|
25
|
+
run: |
|
26
|
+
cat << EOF > ~/.gem/credentials
|
27
|
+
---
|
28
|
+
:rubygems_api_key: ${{ secrets.RUBYGEMS_API_KEY }}
|
29
|
+
EOF
|
30
|
+
|
31
|
+
chmod 0600 ~/.gem/credentials
|
32
|
+
gem push pkg/stuart-client-ruby-*.gem
|
data/README.md
CHANGED
@@ -1,9 +1,9 @@
|
|
1
|
+
[![Codeship Status for StuartApp/stuart-client-ruby](https://app.codeship.com/projects/bacc9100-b159-0137-6e98-0e2ebd2815ea/status?branch=master)](https://app.codeship.com/projects/363050)
|
2
|
+
|
1
3
|
# Stuart Ruby Client
|
2
|
-
For a complete documentation of all endpoints offered by the Stuart API, you can visit [Stuart API documentation](https://
|
4
|
+
For a complete documentation of all endpoints offered by the Stuart API, you can visit [Stuart API documentation](https://api-docs.stuart.com/).
|
3
5
|
|
4
6
|
## Install
|
5
|
-
Via Composer:
|
6
|
-
|
7
7
|
``` bash
|
8
8
|
$ gem install stuart-client-ruby
|
9
9
|
```
|
@@ -13,9 +13,10 @@ $ gem install stuart-client-ruby
|
|
13
13
|
### Initialize HTTP client
|
14
14
|
|
15
15
|
```ruby
|
16
|
+
require 'stuart-client-ruby'
|
16
17
|
environment = Stuart::Infrastructure::Environment::SANDBOX
|
17
|
-
api_client_id = 'c6058849d0a056fc743203acb8e6a850dad103485c3edc51b16a9260cc7a7689' # can be found here: https://admin
|
18
|
-
api_client_secret = 'aa6a415fce31967501662c1960fcbfbf4745acff99acb19dbc1aae6f76c9c618' # can be found here: https://admin
|
18
|
+
api_client_id = 'c6058849d0a056fc743203acb8e6a850dad103485c3edc51b16a9260cc7a7689' # can be found here: https://admin.sandbox.stuart.com/client/api
|
19
|
+
api_client_secret = 'aa6a415fce31967501662c1960fcbfbf4745acff99acb19dbc1aae6f76c9c618' # can be found here: https://admin.sandbox.stuart.com/client/api
|
19
20
|
auth = Stuart::Infrastructure::Authenticator.new(environment, api_client_id, api_client_secret)
|
20
21
|
|
21
22
|
http_client = Stuart::Infrastructure::HttpClient.new(auth)
|
@@ -36,7 +37,7 @@ job = {
|
|
36
37
|
contact: {
|
37
38
|
firstname: "Martin",
|
38
39
|
lastname: "Pont",
|
39
|
-
phone: "+33698348756
|
40
|
+
phone: "+33698348756",
|
40
41
|
company: "KFC Paris Barbès"
|
41
42
|
}
|
42
43
|
}
|
@@ -66,3 +67,15 @@ http_client.perform_post '/v2/jobs', JSON.generate(job)
|
|
66
67
|
```ruby
|
67
68
|
http_client.perform_get('/v2/jobs')
|
68
69
|
```
|
70
|
+
|
71
|
+
### Release process
|
72
|
+
|
73
|
+
1. Review the Gem version in lib/stuart-client-ruby/version.rb
|
74
|
+
2. Create and publish a Git tag with the version defined in lib/stuart-client-ruby/version.rb
|
75
|
+
Example:
|
76
|
+
```
|
77
|
+
git tag v1.2.0-rc.1
|
78
|
+
git push origin --tags
|
79
|
+
```
|
80
|
+
|
81
|
+
3. The workflow [workflows/publish.yml](https://github.com/StuartApp/stuart-client-ruby/actions/workflows/publish.yml) should start and publish the new version to Rubygems https://rubygems.org/gems/stuart-client-ruby
|
data/Rakefile
CHANGED
File without changes
|
File without changes
|
File without changes
|
File without changes
|
data/spec/spec_helper.rb
CHANGED
@@ -1,2 +1,2 @@
|
|
1
|
-
require "stuart"
|
1
|
+
require "stuart-client-ruby"
|
2
2
|
require "rspec"
|
File without changes
|
File without changes
|
@@ -0,0 +1,80 @@
|
|
1
|
+
# Generated by juwelier
|
2
|
+
# DO NOT EDIT THIS FILE DIRECTLY
|
3
|
+
# Instead, edit Juwelier::Tasks in Rakefile, and run 'rake gemspec'
|
4
|
+
# -*- encoding: utf-8 -*-
|
5
|
+
# stub: stuart-client-ruby 1.1.0 ruby lib
|
6
|
+
|
7
|
+
require_relative './lib/stuart-client-ruby/version'
|
8
|
+
|
9
|
+
Gem::Specification.new do |s|
|
10
|
+
s.name = "stuart-client-ruby"
|
11
|
+
s.version = Stuart::Version::STRING
|
12
|
+
|
13
|
+
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
14
|
+
s.require_paths = ["lib"]
|
15
|
+
s.authors = ["Paul Caillau", "Maximilien Tyc"]
|
16
|
+
s.date = "2018-06-13"
|
17
|
+
s.description = "Communicate with the Stuart API"
|
18
|
+
s.email = "engineering@stuart.com"
|
19
|
+
s.extra_rdoc_files = [
|
20
|
+
"LICENSE.txt",
|
21
|
+
"README.md"
|
22
|
+
]
|
23
|
+
s.files = [
|
24
|
+
".document",
|
25
|
+
".rubocop.yml",
|
26
|
+
"Gemfile",
|
27
|
+
"LICENSE.txt",
|
28
|
+
"README.md",
|
29
|
+
"Rakefile",
|
30
|
+
"lib/stuart-client-ruby.rb",
|
31
|
+
"lib/stuart-client-ruby/client.rb",
|
32
|
+
"lib/stuart-client-ruby/infrastructure/api_response.rb",
|
33
|
+
"lib/stuart-client-ruby/infrastructure/authenticator.rb",
|
34
|
+
"lib/stuart-client-ruby/infrastructure/environment.rb",
|
35
|
+
"lib/stuart-client-ruby/infrastructure/http_client.rb",
|
36
|
+
"lib/stuart-client-ruby/version.rb",
|
37
|
+
"spec/spec_helper.rb",
|
38
|
+
"spec/stuart-client-ruby/infrastructure/authenticator_spec.rb",
|
39
|
+
"spec/stuart-client-ruby/infrastructure/http_client_spec.rb",
|
40
|
+
"stuart-client-ruby.gemspec"
|
41
|
+
]
|
42
|
+
s.homepage = "http://github.com/stuartapp/stuart-client-ruby"
|
43
|
+
s.licenses = ["MIT"]
|
44
|
+
s.rubygems_version = "2.4.5.1"
|
45
|
+
s.summary = "Stuart API Ruby client"
|
46
|
+
|
47
|
+
if s.respond_to? :specification_version then
|
48
|
+
s.specification_version = 4
|
49
|
+
|
50
|
+
if Gem::Version.new(Gem::VERSION) >= Gem::Version.new('1.2.0') then
|
51
|
+
s.add_runtime_dependency(%q<oauth2>, [">= 0"])
|
52
|
+
s.add_runtime_dependency(%q<typhoeus>, [">= 0"])
|
53
|
+
s.add_development_dependency(%q<bundler>, [">= 0"])
|
54
|
+
s.add_development_dependency(%q<juwelier>, [">= 0"])
|
55
|
+
s.add_development_dependency(%q<rdoc>, [">= 0"])
|
56
|
+
s.add_development_dependency(%q<rspec>, [">= 0"])
|
57
|
+
s.add_development_dependency(%q<shoulda>, [">= 0"])
|
58
|
+
s.add_development_dependency(%q<simplecov>, [">= 0"])
|
59
|
+
else
|
60
|
+
s.add_dependency(%q<oauth2>, [">= 0"])
|
61
|
+
s.add_dependency(%q<typhoeus>, [">= 0"])
|
62
|
+
s.add_dependency(%q<bundler>, [">= 0"])
|
63
|
+
s.add_dependency(%q<juwelier>, [">= 0"])
|
64
|
+
s.add_dependency(%q<rdoc>, [">= 0"])
|
65
|
+
s.add_dependency(%q<rspec>, [">= 0"])
|
66
|
+
s.add_dependency(%q<shoulda>, [">= 0"])
|
67
|
+
s.add_dependency(%q<simplecov>, [">= 0"])
|
68
|
+
end
|
69
|
+
else
|
70
|
+
s.add_dependency(%q<oauth2>, [">= 0"])
|
71
|
+
s.add_dependency(%q<typhoeus>, [">= 0"])
|
72
|
+
s.add_dependency(%q<bundler>, [">= 0"])
|
73
|
+
s.add_dependency(%q<juwelier>, [">= 0"])
|
74
|
+
s.add_dependency(%q<rdoc>, [">= 0"])
|
75
|
+
s.add_dependency(%q<rspec>, [">= 0"])
|
76
|
+
s.add_dependency(%q<shoulda>, [">= 0"])
|
77
|
+
s.add_dependency(%q<simplecov>, [">= 0"])
|
78
|
+
end
|
79
|
+
end
|
80
|
+
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: stuart-client-ruby
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 1.1.1.pre.rc.12
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Paul Caillau
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date:
|
12
|
+
date: 2023-01-02 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: oauth2
|
@@ -132,22 +132,23 @@ extra_rdoc_files:
|
|
132
132
|
- README.md
|
133
133
|
files:
|
134
134
|
- ".document"
|
135
|
+
- ".github/workflows/publish.yml"
|
135
136
|
- ".rubocop.yml"
|
136
137
|
- Gemfile
|
137
138
|
- LICENSE.txt
|
138
139
|
- README.md
|
139
140
|
- Rakefile
|
140
|
-
- lib/stuart.rb
|
141
|
-
- lib/stuart
|
142
|
-
- lib/stuart/
|
143
|
-
- lib/stuart/infrastructure/
|
144
|
-
- lib/stuart/infrastructure/
|
145
|
-
- lib/stuart/infrastructure/
|
146
|
-
- lib/stuart/
|
147
|
-
- lib/stuart/version.rb
|
141
|
+
- lib/stuart-client-ruby.rb
|
142
|
+
- lib/stuart-client-ruby/client.rb
|
143
|
+
- lib/stuart-client-ruby/infrastructure/api_response.rb
|
144
|
+
- lib/stuart-client-ruby/infrastructure/authenticator.rb
|
145
|
+
- lib/stuart-client-ruby/infrastructure/environment.rb
|
146
|
+
- lib/stuart-client-ruby/infrastructure/http_client.rb
|
147
|
+
- lib/stuart-client-ruby/version.rb
|
148
148
|
- spec/spec_helper.rb
|
149
|
-
- spec/stuart/infrastructure/authenticator_spec.rb
|
150
|
-
- spec/stuart/infrastructure/http_client_spec.rb
|
149
|
+
- spec/stuart-client-ruby/infrastructure/authenticator_spec.rb
|
150
|
+
- spec/stuart-client-ruby/infrastructure/http_client_spec.rb
|
151
|
+
- stuart-client-ruby.gemspec
|
151
152
|
homepage: http://github.com/stuartapp/stuart-client-ruby
|
152
153
|
licenses:
|
153
154
|
- MIT
|
@@ -163,12 +164,11 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
163
164
|
version: '0'
|
164
165
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
165
166
|
requirements:
|
166
|
-
- - "
|
167
|
+
- - ">"
|
167
168
|
- !ruby/object:Gem::Version
|
168
|
-
version:
|
169
|
+
version: 1.3.1
|
169
170
|
requirements: []
|
170
|
-
|
171
|
-
rubygems_version: 2.4.5.1
|
171
|
+
rubygems_version: 3.1.6
|
172
172
|
signing_key:
|
173
173
|
specification_version: 4
|
174
174
|
summary: Stuart API Ruby client
|
data/lib/stuart/.DS_Store
DELETED
Binary file
|