Skip to content

Commit

Permalink
Add VERSION constant (#540)
Browse files Browse the repository at this point in the history
* Add VERSION constant

* Use :raise_errors option to have error raised
  • Loading branch information
pboling authored Mar 19, 2021
1 parent ad62ca1 commit 7eb9158
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 6 deletions.
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,12 @@ All notable changes to this project will be documented in this file.

## unreleased

## [1.4.6] - 2021-03-18


- [#537](https://github.com/oauth-xx/oauth2/pull/537) - Fix crash in OAuth2::Client#get_token (@anderscarling)
- [#538](https://github.com/oauth-xx/oauth2/pull/538) - Remove reliance on globally included OAuth2 in tests for version 1.4 (@anderscarling)

## [1.4.5] - 2021-03-18

- [#535](https://github.com/oauth-xx/oauth2/pull/535) - Compatibility with range of supported Ruby OpenSSL versions, Rubocop updates, Github Actions (@pboling)
Expand Down
1 change: 0 additions & 1 deletion lib/oauth2/client.rb
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,6 @@ def get_token(params, access_token_opts = {}, extract_access_token = options[:ex
access_token = begin
build_access_token(response, access_token_opts, extract_access_token)
rescue StandardError
raise
nil
end

Expand Down
1 change: 1 addition & 0 deletions lib/oauth2/version.rb
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
module OAuth2
module Version
VERSION = to_s

module_function

# The major version
Expand Down
8 changes: 3 additions & 5 deletions spec/oauth2/version_spec.rb
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
describe OAuth2::Version do
context 'Constant' do
it 'is a sting' do
expect(OAuth2::Version::VERSION).to be_a(String)
end
it 'VERSION a sting' do
expect(OAuth2::Version::VERSION).to be_a(String)
end
end
end

0 comments on commit 7eb9158

Please sign in to comment.