Skip to content

Commit

Permalink
Merge pull request #66 from zaikio/const-defined-bug
Browse files Browse the repository at this point in the history
Only lookup Hub::Models module under Zaikio::
  • Loading branch information
nickcampbell18 authored Mar 17, 2021
2 parents 2da5c13 + 33416cb commit 974b989
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 4 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

## [Unreleased]

## 0.7.1 - 2021-03-17

* Fix incorrect const_defined? behaviour when initializing without zaikio-hub-models gem

## 0.7.0

* Don't set `cookies.encrypted[:origin]` when passing `?origin` to `new_session_path`
Expand Down
4 changes: 2 additions & 2 deletions Gemfile.lock
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
PATH
remote: .
specs:
zaikio-oauth_client (0.7.0)
zaikio-oauth_client (0.7.1)
oauth2
rails (>= 5.0.0)
zaikio-jwt_auth (>= 0.2.1, < 0.5.0)
Expand Down Expand Up @@ -133,7 +133,7 @@ GEM
multi_json (~> 1.3)
multi_xml (~> 0.5)
rack (>= 1.2, < 3)
oj (3.11.2)
oj (3.11.3)
parallel (1.20.1)
parser (3.0.0.0)
ast (~> 2.4.1)
Expand Down
2 changes: 1 addition & 1 deletion app/models/zaikio/access_token.rb
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ def expires_in
end

def bearer_klass
return unless Zaikio.const_defined?("Hub::Models")
return unless Zaikio.const_defined?("Hub::Models", false)

if Zaikio::Hub::Models.configuration.respond_to?(:"#{bearer_type.underscore}_class_name")
Zaikio::Hub::Models.configuration.public_send(:"#{bearer_type.underscore}_class_name").constantize
Expand Down
2 changes: 1 addition & 1 deletion lib/zaikio/oauth_client/version.rb
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
module Zaikio
module OAuthClient
VERSION = "0.7.0".freeze
VERSION = "0.7.1".freeze
end
end

0 comments on commit 974b989

Please sign in to comment.