zaikio-oauth_client 0.3.9 → 0.4.4

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
2
  SHA256:
3
- metadata.gz: 59617ce85e2b681ef6a2f62ca91e25ebb7819298e8bb8b1faca8e63c31b487fd
4
- data.tar.gz: 9caa9f16ed610df0e7b540f7fa6c5ffc6792475a3dd0e001b38bdbabee4aaab9
3
+ metadata.gz: 6d9eee4422926a02561d3e2301d775dc01d5db305df1c81133e5f39458394fa2
4
+ data.tar.gz: b08b5e225a9e23c2a48c6533e5686df48b689a6953b7ee21459e8e2a884bda92
5
5
  SHA512:
6
- metadata.gz: c0b889b1f7e0b21bc2e51a369e42ed320ac43528b1fdfe7f8cd33430bdad9c68b52d966ef9389d450bbfe8864a735dce36ed1013f98ceed8aee79af02f033ee2
7
- data.tar.gz: ef1dd5c8243e3aea4712fff7379f78d59a38c8e57b037b7492f57b6ebd32204fdfcdd8dd49fc13e921829189328daf84109ee7f4164c331b471f8d7a1a4e2a06
6
+ metadata.gz: 4ac1c2f055825d2bd7b454aae2fbf2d6b89de39ce7a3dc396b798cfc3d03a515222098c354bbdaff4cf7c235542c3596a363a5efdaa064b6617f6ae8892b9a8c
7
+ data.tar.gz: a233c429b205316024f52944ff25e48bf97e5d504f1a457a0f448d2563341f3cb9e5a6bf27cef6bed9214849d5eaf171f5ec575ea7a7a173e01c205a4e3b7c3d
data/README.md CHANGED
@@ -234,14 +234,15 @@ If you use the provided OAuth credentials from above and test this against the S
234
234
 
235
235
  **Make sure you have the dummy app running locally to validate your changes.**
236
236
 
237
- Make your changes and adjust `version.rb`.
238
-
239
- **To push a new release:**
240
-
241
- - `gem build zaikio-oauth_client.gemspec`
242
- - `gem push zaikio-oauth_client-0.1.0.gem`
243
- *Adjust the version accordingly.*
244
-
237
+ - Make your changes and submit a pull request for them
238
+ - Make sure to update `CHANGELOG.md`
239
+
240
+ To release a new version of the gem:
241
+ - Update the version in `lib/zaikio/oauth_client/version.rb`
242
+ - Update `CHANGELOG.md` to include the new version and its release date
243
+ - Commit and push your changes
244
+ - Create a [new release on GitHub](https://github.com/zaikio/zaikio-directory-models/releases/new)
245
+ - CircleCI will build the Gem package and push it Rubygems for you
245
246
 
246
247
  ## License
247
248
 
@@ -26,7 +26,7 @@ module Zaikio
26
26
  # Scopes
27
27
  scope :valid, lambda {
28
28
  where("expires_at > :now", now: Time.current)
29
- .where.not(id: Zaikio::JWTAuth.blacklisted_token_ids)
29
+ .where.not(id: Zaikio::JWTAuth.revoked_token_ids)
30
30
  }
31
31
  scope :with_invalid_refresh_token, lambda {
32
32
  where("created_at <= ?", Time.current - Zaikio::AccessToken.refresh_token_valid_for)
@@ -36,15 +36,15 @@ module Zaikio
36
36
  now: Time.current,
37
37
  created_at_max: Time.current - refresh_token_valid_for)
38
38
  .where("refresh_token IS NOT NULL")
39
- .where.not(id: Zaikio::JWTAuth.blacklisted_token_ids)
39
+ .where.not(id: Zaikio::JWTAuth.revoked_token_ids)
40
40
  }
41
- scope :by_bearer, lambda { |bearer_type: "Person", bearer_id:, scopes: []|
41
+ scope :by_bearer, lambda { |bearer_id:, scopes: [], bearer_type: "Person"|
42
42
  where(bearer_type: bearer_type, bearer_id: bearer_id)
43
43
  .where("scopes @> ARRAY[?]::varchar[]", scopes)
44
44
  }
45
45
  scope :usable, lambda { |options|
46
- by_bearer(options).valid.or(by_bearer(options).valid_refresh)
47
- .order(expires_at: :desc)
46
+ by_bearer(**options).valid.or(by_bearer(**options).valid_refresh)
47
+ .order(expires_at: :desc)
48
48
  }
49
49
 
50
50
  def expired?
@@ -45,7 +45,7 @@ module Zaikio
45
45
  access_token = if options_or_access_token.is_a?(Zaikio::AccessToken)
46
46
  options_or_access_token
47
47
  else
48
- get_access_token(options_or_access_token)
48
+ get_access_token(**options_or_access_token)
49
49
  end
50
50
 
51
51
  return unless block_given?
@@ -25,7 +25,7 @@ module Zaikio
25
25
  end
26
26
 
27
27
  def logger
28
- @logger ||= Logger.new(STDOUT)
28
+ @logger ||= Logger.new($stdout)
29
29
  end
30
30
 
31
31
  def register_client(name)
@@ -1,5 +1,5 @@
1
1
  module Zaikio
2
2
  module OAuthClient
3
- VERSION = "0.3.9".freeze
3
+ VERSION = "0.4.4".freeze
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: zaikio-oauth_client
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.9
4
+ version: 0.4.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Zaikio GmbH
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2020-08-18 00:00:00.000000000 Z
11
+ date: 2021-01-20 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails
@@ -47,7 +47,7 @@ dependencies:
47
47
  version: 0.2.1
48
48
  - - "<"
49
49
  - !ruby/object:Gem::Version
50
- version: 0.4.0
50
+ version: 0.5.0
51
51
  type: :runtime
52
52
  prerelease: false
53
53
  version_requirements: !ruby/object:Gem::Requirement
@@ -57,7 +57,7 @@ dependencies:
57
57
  version: 0.2.1
58
58
  - - "<"
59
59
  - !ruby/object:Gem::Version
60
- version: 0.4.0
60
+ version: 0.5.0
61
61
  - !ruby/object:Gem::Dependency
62
62
  name: pg
63
63
  requirement: !ruby/object:Gem::Requirement
@@ -119,10 +119,11 @@ files:
119
119
  - lib/zaikio/oauth_client/engine.rb
120
120
  - lib/zaikio/oauth_client/test_helper.rb
121
121
  - lib/zaikio/oauth_client/version.rb
122
- homepage: https://crispymtn.com
122
+ homepage: https://github.com/zaikio/zaikio-oauth_client
123
123
  licenses:
124
124
  - MIT
125
- metadata: {}
125
+ metadata:
126
+ changelog_uri: https://github.com/zaikio/zaikio-oauth_client/blob/master/CHANGELOG.md
126
127
  post_install_message:
127
128
  rdoc_options: []
128
129
  require_paths:
@@ -138,7 +139,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
138
139
  - !ruby/object:Gem::Version
139
140
  version: '0'
140
141
  requirements: []
141
- rubygems_version: 3.1.2
142
+ rubygems_version: 3.2.3
142
143
  signing_key:
143
144
  specification_version: 4
144
145
  summary: Zaikio Platform Connectivity