diff --git a/CHANGELOG.md b/CHANGELOG.md index 4f3cc17..06423ce 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -13,6 +13,12 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ### Removed +## [v4.1.1] + +### Fixed + +- Fix requiring of oauth2 to avoid `NoMethodError: undefined method 'config' for module OAuth2` (#86) + ## [v4.1.0] ### Added @@ -140,7 +146,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - rails model concern to allow host app to add auth behaviour to a model - callback, logout and failure routes to handle auth -[Unreleased]: https://github.com/RaspberryPiFoundation/rpi-auth/compare/v4.1.0...HEAD +[Unreleased]: https://github.com/RaspberryPiFoundation/rpi-auth/compare/v4.1.1...HEAD +[v4.1.1]: https://github.com/RaspberryPiFoundation/rpi-auth/releases/tag/v4.1.1 [v4.1.0]: https://github.com/RaspberryPiFoundation/rpi-auth/releases/tag/v4.1.0 [v4.0.0]: https://github.com/RaspberryPiFoundation/rpi-auth/releases/tag/v4.0.0 [v3.6.0]: https://github.com/RaspberryPiFoundation/rpi-auth/releases/tag/v3.6.0 diff --git a/gemfiles/rails_6.1.gemfile.lock b/gemfiles/rails_6.1.gemfile.lock index a31eb0f..ca46109 100644 --- a/gemfiles/rails_6.1.gemfile.lock +++ b/gemfiles/rails_6.1.gemfile.lock @@ -1,7 +1,7 @@ PATH remote: .. specs: - rpi_auth (4.1.0) + rpi_auth (4.1.1) oauth2 omniauth-rails_csrf_protection (~> 1.0.0) omniauth_openid_connect (~> 0.7.1) diff --git a/gemfiles/rails_7.0.gemfile.lock b/gemfiles/rails_7.0.gemfile.lock index f497483..fdc0288 100644 --- a/gemfiles/rails_7.0.gemfile.lock +++ b/gemfiles/rails_7.0.gemfile.lock @@ -1,7 +1,7 @@ PATH remote: .. specs: - rpi_auth (4.1.0) + rpi_auth (4.1.1) oauth2 omniauth-rails_csrf_protection (~> 1.0.0) omniauth_openid_connect (~> 0.7.1) diff --git a/gemfiles/rails_7.1.gemfile.lock b/gemfiles/rails_7.1.gemfile.lock index 93f5597..f9956a9 100644 --- a/gemfiles/rails_7.1.gemfile.lock +++ b/gemfiles/rails_7.1.gemfile.lock @@ -1,7 +1,7 @@ PATH remote: .. specs: - rpi_auth (4.1.0) + rpi_auth (4.1.1) oauth2 omniauth-rails_csrf_protection (~> 1.0.0) omniauth_openid_connect (~> 0.7.1) diff --git a/gemfiles/rails_7.2.gemfile.lock b/gemfiles/rails_7.2.gemfile.lock index 1d94f4c..c07b9c9 100644 --- a/gemfiles/rails_7.2.gemfile.lock +++ b/gemfiles/rails_7.2.gemfile.lock @@ -1,7 +1,7 @@ PATH remote: .. specs: - rpi_auth (4.1.0) + rpi_auth (4.1.1) oauth2 omniauth-rails_csrf_protection (~> 1.0.0) omniauth_openid_connect (~> 0.7.1) diff --git a/lib/rpi_auth/controllers/auto_refreshing_token.rb b/lib/rpi_auth/controllers/auto_refreshing_token.rb index aee9a3c..698b1fa 100644 --- a/lib/rpi_auth/controllers/auto_refreshing_token.rb +++ b/lib/rpi_auth/controllers/auto_refreshing_token.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -require 'oauth2/error' +require 'oauth2' module RpiAuth module Controllers diff --git a/lib/rpi_auth/oauth_client.rb b/lib/rpi_auth/oauth_client.rb index 135b830..9d78022 100644 --- a/lib/rpi_auth/oauth_client.rb +++ b/lib/rpi_auth/oauth_client.rb @@ -1,7 +1,6 @@ # frozen_string_literal: true -require 'oauth2/client' -require 'oauth2/access_token' +require 'oauth2' module RpiAuth class OauthClient diff --git a/lib/rpi_auth/version.rb b/lib/rpi_auth/version.rb index c9f156b..a82ed1d 100644 --- a/lib/rpi_auth/version.rb +++ b/lib/rpi_auth/version.rb @@ -1,5 +1,5 @@ # frozen_string_literal: true module RpiAuth - VERSION = '4.1.0' + VERSION = '4.1.1' end diff --git a/spec/dummy/spec/requests/refresh_credentials_spec.rb b/spec/dummy/spec/requests/refresh_credentials_spec.rb index f01a4d5..7c7ca82 100644 --- a/spec/dummy/spec/requests/refresh_credentials_spec.rb +++ b/spec/dummy/spec/requests/refresh_credentials_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -require 'oauth2/error' +require 'oauth2' RSpec.describe 'Refreshing the auth token', type: :request do include ActiveSupport::Testing::TimeHelpers diff --git a/spec/rpi_auth/oauth_client_spec.rb b/spec/rpi_auth/oauth_client_spec.rb index d5c42c7..215fd15 100644 --- a/spec/rpi_auth/oauth_client_spec.rb +++ b/spec/rpi_auth/oauth_client_spec.rb @@ -1,7 +1,6 @@ # frozen_string_literal: true require 'spec_helper' -require 'oauth2' RSpec.describe RpiAuth::OauthClient do include ActiveSupport::Testing::TimeHelpers