oauth2_api_client 3.1.0 → 3.1.1

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: f658a875027e6f1dcfd8ca75235d581aa5ee577e6cf1cf01e30c5e0c902c987b
4
- data.tar.gz: e11832285855ef59f5475fad329ebe3e286983a21e8a21ad2dad41853f508ecb
3
+ metadata.gz: 33e0e15f43fe027760355c1a403da0d02b30412b064984102234744fc8da65b7
4
+ data.tar.gz: bf10a1428e0a797daa31f32b7712d2525eddab710c2ba12d244e95b968489314
5
5
  SHA512:
6
- metadata.gz: 292ee89d31d2eed1da05f7b5aec3abd25bef1048c03be27200810d94ed0d71e60b4300a9a28c21a6568a50e2c6c912f9acb85a6b4f7bc0ac5fbe97ec19a82f9c
7
- data.tar.gz: 78425acfe627c77d4f4ebba6b78e791a743ae192ae8b39367e3e82e5ea6376d90c11a8272b705a62704b355b32908ee268ec989868be1f66e25c93612224a658
6
+ metadata.gz: 46dbbbd595379cc1217f272247149d0ce8084651704c2264301e28dcc8ece22b2c8cc2b9b108d38140eaf1f46145cfde1fb600e24a5434f00a013948e79b22c3
7
+ data.tar.gz: d3b38d88ac90e9550971f5320b5cca814be87ade495a8bd999047faebd310f41beecbe45ac16e35fd2ba1e54bbea7b443f13f670e1c119e3a08931b6ea7476ef
@@ -0,0 +1,21 @@
1
+ on: push
2
+ name: test
3
+ jobs:
4
+ test:
5
+ runs-on: ubuntu-latest
6
+ strategy:
7
+ fail-fast: false
8
+ matrix:
9
+ ruby:
10
+ - 2.6
11
+ - 2.7
12
+ - 3.0
13
+ steps:
14
+ - uses: actions/checkout@v1
15
+ - uses: actions/setup-ruby@v1
16
+ with:
17
+ ruby-version: ${{ matrix.ruby }}
18
+ - run: gem install bundler
19
+ - run: bundle
20
+ - run: bundle exec rspec
21
+ - run: bundle exec rubocop
data/.rubocop.yml CHANGED
@@ -1,6 +1,12 @@
1
1
  AllCops:
2
2
  NewCops: enable
3
3
 
4
+ Gemspec/RequiredRubyVersion:
5
+ Enabled: false
6
+
7
+ Gemspec/RequireMFA:
8
+ Enabled: false
9
+
4
10
  Metrics/ParameterLists:
5
11
  Enabled: false
6
12
 
data/CHANGELOG.md CHANGED
@@ -1,6 +1,10 @@
1
1
 
2
2
  # CHANGELOG
3
3
 
4
+ # v3.1.1
5
+
6
+ * Added oauth2 version constraint
7
+
4
8
  # v3.1.0
5
9
 
6
10
  * Added uri to `Oauth2ApiClient::ReponseError` exception message
data/README.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # oauth2_api_client
2
2
 
3
- [![Build Status](https://secure.travis-ci.org/mrkamel/oauth2_api_client.svg?branch=master)](http://travis-ci.org/mrkamel/oauth2_api_client)
3
+ [![Build](https://github.com/mrkamel/oauth2_api_client/workflows/test/badge.svg)](https://github.com/mrkamel/oauth2_api_client/actions?query=workflow%3Atest+branch%3Amaster)
4
4
  [![Gem Version](https://badge.fury.io/rb/oauth2_api_client.svg)](http://badge.fury.io/rb/oauth2_api_client)
5
5
 
6
6
  Oauth2ApiClient is a small, but powerful client around
@@ -12,7 +12,7 @@ oauth2 for authentication.
12
12
  client = Oauth2ApiClient.new(base_url: "https://api.example.com", token "oauth2 token")
13
13
 
14
14
  client.post("/orders", json: { address: "..." }).status.success?
15
- client.headers("User-Agent" => "API Client").timeout(read: 5, write: 5).get("/orders").parse
15
+ client.headers("User-Agent" => "API Client").timeout(read: 5, write: 5).get("/orders").parse(:json)
16
16
  # ...
17
17
  ```
18
18
 
@@ -65,6 +65,8 @@ class Oauth2ApiClient
65
65
  attr_reader :response
66
66
 
67
67
  def initialize(response)
68
+ super()
69
+
68
70
  @response = response
69
71
  end
70
72
 
@@ -1,3 +1,3 @@
1
1
  class Oauth2ApiClient
2
- VERSION = "3.1.0"
2
+ VERSION = "3.1.1"
3
3
  end
@@ -1,7 +1,6 @@
1
1
  require "ruby2_keywords"
2
2
  require "oauth2"
3
3
  require "http"
4
- require "ruby2_keywords"
5
4
  require "active_support"
6
5
 
7
6
  require "oauth2_api_client/version"
@@ -28,7 +27,7 @@ class Oauth2ApiClient
28
27
  # )
29
28
  #
30
29
  # client.post("/orders", json: { address: "..." }).status.success?
31
- # client.headers("User-Agent" => "API Client").timeout(read: 5, write: 5).get("/orders").parse
30
+ # client.headers("User-Agent" => "API Client").timeout(read: 5, write: 5).get("/orders").parse(:json)
32
31
  #
33
32
  # @example
34
33
  # client = Oauth2ApiClient.new(
@@ -41,7 +40,7 @@ class Oauth2ApiClient
41
40
  # )
42
41
  # )
43
42
 
44
- def initialize(base_url:, base_request: HTTP, token:)
43
+ def initialize(base_url:, token:, base_request: HTTP)
45
44
  @base_url = base_url
46
45
  @token = token
47
46
  @request = base_request
@@ -26,6 +26,6 @@ Gem::Specification.new do |spec|
26
26
 
27
27
  spec.add_dependency "activesupport"
28
28
  spec.add_dependency "http"
29
- spec.add_dependency "oauth2"
29
+ spec.add_dependency "oauth2", ">= 1.4.2"
30
30
  spec.add_dependency "ruby2_keywords"
31
31
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: oauth2_api_client
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.1.0
4
+ version: 3.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Benjamin Vetter
8
- autorequire:
8
+ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2020-07-23 00:00:00.000000000 Z
11
+ date: 2022-01-17 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -114,14 +114,14 @@ dependencies:
114
114
  requirements:
115
115
  - - ">="
116
116
  - !ruby/object:Gem::Version
117
- version: '0'
117
+ version: 1.4.2
118
118
  type: :runtime
119
119
  prerelease: false
120
120
  version_requirements: !ruby/object:Gem::Requirement
121
121
  requirements:
122
122
  - - ">="
123
123
  - !ruby/object:Gem::Version
124
- version: '0'
124
+ version: 1.4.2
125
125
  - !ruby/object:Gem::Dependency
126
126
  name: ruby2_keywords
127
127
  requirement: !ruby/object:Gem::Requirement
@@ -144,9 +144,9 @@ executables: []
144
144
  extensions: []
145
145
  extra_rdoc_files: []
146
146
  files:
147
+ - ".github/workflows/test.yml"
147
148
  - ".gitignore"
148
149
  - ".rubocop.yml"
149
- - ".travis.yml"
150
150
  - CHANGELOG.md
151
151
  - Gemfile
152
152
  - LICENSE.txt
@@ -165,7 +165,7 @@ homepage: https://github.com/mrkamel/oauth2_api_client
165
165
  licenses:
166
166
  - MIT
167
167
  metadata: {}
168
- post_install_message:
168
+ post_install_message:
169
169
  rdoc_options: []
170
170
  require_paths:
171
171
  - lib
@@ -180,8 +180,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
180
180
  - !ruby/object:Gem::Version
181
181
  version: '0'
182
182
  requirements: []
183
- rubygems_version: 3.0.3
184
- signing_key:
183
+ rubygems_version: 3.3.3
184
+ signing_key:
185
185
  specification_version: 4
186
186
  summary: Small but powerful client around oauth2 and http-rb to interact with APIs
187
187
  test_files:
data/.travis.yml DELETED
@@ -1,10 +0,0 @@
1
- sudo: false
2
- language: ruby
3
- rvm:
4
- - ruby-2.6.2
5
- - ruby-2.7.1
6
- install:
7
- - travis_retry bundle install
8
- script:
9
- - bundle exec rspec
10
- - bundle exec rubocop