stuart-client-ruby 1.0.0 → 1.1.1.pre.rc.12

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
- SHA1:
3
- metadata.gz: e6fe407f7e85f077cba35da969e8229ea66fe3cf
4
- data.tar.gz: 0865cf44453d5fb5702d264fc507207af4521941
2
+ SHA256:
3
+ metadata.gz: 222d61649212d58cbdaa0e17574563ddc8781c5784a7d12e370436a3e8526e66
4
+ data.tar.gz: c9f67a2a9257d276062f657ed4da467b6a1db19a81fd501a7af7050c910d4fc8
5
5
  SHA512:
6
- metadata.gz: ff636f7d5fbb3d80de6dab3eb9fd47df37829e5ddb48bc3ca4b9825f8a92db5742c111f72b1aa6e39b35015cdb17eb4dc8d7d91f4f44b136a5fc950758037d64
7
- data.tar.gz: 7f03c699e1bd01593ccb79ea80bd9a9d655c3526615981ada0dfc9c9bf94e6b71552c989bb8162d04a9d8ff178b972b3360637422a1852b71ab24c97aad007b9
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://stuart.api-docs.io).
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-sandbox.stuart.com/client/api
18
- api_client_secret = 'aa6a415fce31967501662c1960fcbfbf4745acff99acb19dbc1aae6f76c9c618' # can be found here: https://admin-sandbox.stuart.com/client/api
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
@@ -2,7 +2,7 @@
2
2
 
3
3
  require "rubygems"
4
4
  require "bundler"
5
- require "./lib/stuart/version"
5
+ require "./lib/stuart-client-ruby/version"
6
6
  begin
7
7
  Bundler.setup(:default, :development)
8
8
  rescue Bundler::BundlerError => e
File without changes
@@ -1,7 +1,7 @@
1
1
  module Stuart
2
2
  module Infrastructure
3
3
  class Environment
4
- SANDBOX = { base_url: "https://sandbox-api.stuart.com" }.freeze
4
+ SANDBOX = { base_url: "https://api.sandbox.stuart.com" }.freeze
5
5
 
6
6
  PRODUCTION = { base_url: "https://api.stuart.com" }.freeze
7
7
  end
@@ -1,8 +1,8 @@
1
1
  module Stuart
2
2
  module Version
3
3
  MAJOR = 1
4
- MINOR = 0
5
- PATCH = 0
4
+ MINOR = 1
5
+ PATCH = "1-rc.12"
6
6
 
7
7
  STRING = [MAJOR, MINOR, PATCH].compact.join(".")
8
8
  end
@@ -0,0 +1,5 @@
1
+ require "stuart-client-ruby/infrastructure/environment"
2
+ require "stuart-client-ruby/infrastructure/api_response"
3
+ require "stuart-client-ruby/infrastructure/authenticator"
4
+ require "stuart-client-ruby/infrastructure/http_client"
5
+ require "stuart-client-ruby/version"
data/spec/spec_helper.rb CHANGED
@@ -1,2 +1,2 @@
1
- require "stuart"
1
+ require "stuart-client-ruby"
2
2
  require "rspec"
@@ -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.0.0
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: 2018-02-14 00:00:00.000000000 Z
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/.DS_Store
142
- - lib/stuart/client.rb
143
- - lib/stuart/infrastructure/api_response.rb
144
- - lib/stuart/infrastructure/authenticator.rb
145
- - lib/stuart/infrastructure/environment.rb
146
- - lib/stuart/infrastructure/http_client.rb
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: '0'
169
+ version: 1.3.1
169
170
  requirements: []
170
- rubyforge_project:
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
data/lib/stuart.rb DELETED
@@ -1,5 +0,0 @@
1
- require "stuart/infrastructure/environment"
2
- require "stuart/infrastructure/api_response"
3
- require "stuart/infrastructure/authenticator"
4
- require "stuart/infrastructure/http_client"
5
- require "stuart/version"