From 14ed0ebe45442edcae8ff7b94c670050f8a75734 Mon Sep 17 00:00:00 2001 From: Peter Boling Date: Sat, 13 Oct 2018 05:17:19 -0700 Subject: [PATCH 1/4] Updates from 1-4-stable --- .jrubyrc | 1 + .travis.yml | 22 ++++++++++------------ CHANGELOG.md | 30 +++++++++++++++++++++++++++++- Gemfile | 9 +++++++-- README.md | 19 +++++++++++-------- Rakefile | 4 +++- gemfiles/jruby_1.7.gemfile | 2 -- gemfiles/jruby_9.2.gemfile | 15 +++++++++++++++ gemfiles/jruby_head.gemfile | 4 ---- lib/oauth2/version.rb | 2 +- spec/helper.rb | 2 +- 11 files changed, 78 insertions(+), 32 deletions(-) create mode 100644 .jrubyrc create mode 100644 gemfiles/jruby_9.2.gemfile diff --git a/.jrubyrc b/.jrubyrc new file mode 100644 index 00000000..ec033eeb --- /dev/null +++ b/.jrubyrc @@ -0,0 +1 @@ +debug.fullTrace=true diff --git a/.travis.yml b/.travis.yml index 46b82ef3..2e5043b9 100644 --- a/.travis.yml +++ b/.travis.yml @@ -6,10 +6,6 @@ bundler_args: --no-deployment --jobs 3 --retry 3 cache: bundler -env: - global: - - JRUBY_OPTS="$JRUBY_OPTS -Xcli.debug=true --debug" - language: ruby matrix: @@ -19,7 +15,7 @@ matrix: - rvm: rbx-3 fast_finish: true include: - - rvm: jruby-1.7.27 + - rvm: jruby-1.7.27 # targets MRI v1.9 gemfile: gemfiles/jruby_1.7.gemfile - rvm: 1.9.3-p551 gemfile: gemfiles/ruby_1.9.gemfile @@ -27,23 +23,25 @@ matrix: gemfile: gemfiles/ruby_2.0.gemfile - rvm: 2.1.10 gemfile: gemfiles/ruby_2.1.gemfile - - rvm: jruby-9.0.5.0 + - rvm: jruby-9.0.5.0 # targets MRI v2.0 gemfile: gemfiles/jruby_9.0.gemfile # DEPRECATION WARNING # oauth2 1.x series releases are the last to support Ruby versions above # oauth2 2.x series releases will support Ruby versions below, and not above - - rvm: jruby-9.1.15.0 + - rvm: jruby-9.1.9.0 # targets MRI v2.3 gemfile: gemfiles/jruby_9.1.gemfile - - rvm: 2.2.9 + - rvm: 2.2.10 gemfile: gemfiles/ruby_2.2.gemfile - - rvm: 2.3.6 + - rvm: 2.3.7 gemfile: gemfiles/ruby_2.3.gemfile - - rvm: 2.4.3 + - rvm: 2.4.4 gemfile: gemfiles/ruby_2.4.gemfile - - rvm: 2.5.0 + - rvm: jruby-9.2.0.0 # targets MRI v2.5 + gemfile: gemfiles/jruby_9.2.gemfile + - rvm: 2.5.1 gemfile: gemfiles/ruby_2.5.gemfile - rvm: jruby-head - gemfile: gemfiles/jruby-head.gemfile + gemfile: gemfiles/jruby_head.gemfile - rvm: ruby-head gemfile: gemfiles/ruby_head.gemfile - rvm: rbx-3 diff --git a/CHANGELOG.md b/CHANGELOG.md index 0b673445..f496b129 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -13,6 +13,33 @@ All notable changes to this project will be documented in this file. - _Dependency_: Upgrade jwt to 2.x.x (@travisofthenorth) - Fix logging to `$stdout` of request and response bodies via Faraday's logger and `ENV["OAUTH_DEBUG"] == 'true'` +## [1.4.1] - 2018-10-13 + +- [#417](https://github.com/oauth-xx/oauth2/pull/417) - update jwt dependency (@thewoolleyman) +- [#418](https://github.com/oauth-xx/oauth2/pull/418) - remove rubocop dependency (temporary, added back in [#423](https://github.com/oauth-xx/oauth2/pull/423)) (@pboling) +- [#419](https://github.com/oauth-xx/oauth2/pull/419) - update faraday dependency (@pboling) +- [#420](https://github.com/oauth-xx/oauth2/pull/420) - update [oauth2.gemspec](https://github.com/oauth-xx/oauth2/blob/1-4-stable/oauth2.gemspec) (@pboling) +- [#421](https://github.com/oauth-xx/oauth2/pull/421) - fix [CHANGELOG.md](https://github.com/oauth-xx/oauth2/blob/1-4-stable/CHANGELOG.md) for previous releases (@pboling) +- [#422](https://github.com/oauth-xx/oauth2/pull/422) - update [LICENSE](https://github.com/oauth-xx/oauth2/blob/1-4-stable/LICENSE) and [README.md](https://github.com/oauth-xx/oauth2/blob/1-4-stable/README.md) (@pboling) +- [#423](https://github.com/oauth-xx/oauth2/pull/423) - update [builds](https://travis-ci.org/oauth-xx/oauth2/builds), [Rakefile](https://github.com/oauth-xx/oauth2/blob/1-4-stable/Rakefile) (@pboling) + - officially document supported Rubies + * Ruby 1.9.3 + * Ruby 2.0.0 + * Ruby 2.1 + * Ruby 2.2 + * [JRuby 1.7][jruby-1.7] (targets MRI v1.9) + * [JRuby 9.0][jruby-9.0] (targets MRI v2.0) + * Ruby 2.3 + * Ruby 2.4 + * Ruby 2.5 + * [JRuby 9.1][jruby-9.1] (targets MRI v2.3) + * [JRuby 9.2][jruby-9.2] (targets MRI v2.5) + +[jruby-1.7]: https://www.jruby.org/2017/05/11/jruby-1-7-27.html +[jruby-9.0]: https://www.jruby.org/2016/01/26/jruby-9-0-5-0.html +[jruby-9.1]: https://www.jruby.org/2017/05/16/jruby-9-1-9-0.html +[jruby-9.2]: https://www.jruby.org/2018/05/24/jruby-9-2-0-0.html + ## [1.4.0] - 2017-06-09 - Drop Ruby 1.8.7 support (@sferik) @@ -116,4 +143,5 @@ All notable changes to this project will be documented in this file. [1.3.0]: https://github.com/oauth-xx/oauth2/compare/v1.2.0...v1.3.0 [1.3.1]: https://github.com/oauth-xx/oauth2/compare/v1.3.0...v1.3.1 [1.4.0]: https://github.com/oauth-xx/oauth2/compare/v1.3.1...v1.4.0 -[unreleased]: https://github.com/oauth-xx/oauth2/compare/v1.4.0...HEAD +[1.4.1]: https://github.com/oauth-xx/oauth2/compare/v1.4.0...v1.4.1 +[unreleased]: https://github.com/oauth-xx/oauth2/compare/v1.4.0...1-4-stable diff --git a/Gemfile b/Gemfile index e6683091..15dc5d53 100644 --- a/Gemfile +++ b/Gemfile @@ -2,17 +2,22 @@ source 'https://rubygems.org' git_source(:github) { |repo_name| "https://github.com/#{repo_name}" } +gem 'faraday', '~> 0.15.2', :platforms => [:jruby_18, :ruby_18] +gem 'jwt', '< 1.5.2', :platforms => [:jruby_18, :ruby_18] + group :test do ruby_version = Gem::Version.new(RUBY_VERSION) if ruby_version >= Gem::Version.new('2.1') # TODO: Upgrade to >= 0.59 when we drop Rubies below 2.2 # Error: Unsupported Ruby version 2.1 found in `TargetRubyVersion` parameter (in .rubocop.yml). 2.1-compatible analysis was dropped after version 0.58. # Supported versions: 2.2, 2.3, 2.4, 2.5 - gem 'rubocop', '~> 0.58.0' - gem 'rubocop-rspec', '~> 1.30.0' + gem 'rubocop', '~> 0.57.0' + gem 'rubocop-rspec', '~> 1.27.0' # last version that can use rubocop < 0.58 end + gem 'coveralls' gem 'pry', '~> 0.11' if ruby_version >= Gem::Version.new('2.0') gem 'rspec-pending_for' + gem 'simplecov', '>= 0.9' end # Specify non-special dependencies in oauth2.gemspec diff --git a/README.md b/README.md index 875970c1..be79cb6a 100644 --- a/README.md +++ b/README.md @@ -9,6 +9,7 @@ If you need the readme for a released version of the gem please find it below: | Version | Release Date | Readme | |----------|--------------|----------------------------------------------------------| +| 1.4.1 | Oct 13, 2018 | https://github.com/oauth-xx/oauth2/blob/v1.4.1/README.md | | 1.4.0 | Jun 9, 2017 | https://github.com/oauth-xx/oauth2/blob/v1.4.0/README.md | | 1.3.1 | Mar 3, 2017 | https://github.com/oauth-xx/oauth2/blob/v1.3.1/README.md | | 1.3.0 | Dec 27, 2016 | https://github.com/oauth-xx/oauth2/blob/v1.3.0/README.md | @@ -21,7 +22,7 @@ If you need the readme for a released version of the gem please find it below: [![Total Downloads](https://img.shields.io/gem/dt/oauth2.svg)][gem] [![Downloads Today](https://img.shields.io/gem/rt/oauth2.svg)](https://rubygems.org/gems/oauth2) [![Build Status](http://img.shields.io/travis/oauth-xx/oauth2.svg)][travis] -[![Coverage Status](http://img.shields.io/coveralls/intridea/oauth2.svg)][coveralls] +[![Coverage Status](http://img.shields.io/coveralls/oauth-xx/oauth2.svg)][coveralls] [![Maintainability](https://api.codeclimate.com/v1/badges/688c612528ff90a46955/maintainability)][codeclimate] [![Depfu](https://badges.depfu.com/badges/6d34dc1ba682bbdf9ae2a97848241743/count.svg)][depfu] [![Open Source Helpers](https://www.codetriage.com/oauth-xx/oauth2/badges/users.svg)][code-triage] @@ -169,8 +170,8 @@ implementations: * Ruby 2.0.0 * Ruby 2.1 * Ruby 2.2 -* [JRuby 1.7][jruby-1.7] -* [JRuby 9.0][jruby-9.0] +* [JRuby 1.7][jruby-1.7] (targets MRI v1.9) +* [JRuby 9.0][jruby-9.0] (targets MRI v2.0) --- @@ -179,11 +180,13 @@ implementations: * Ruby 2.3 - Support through version 3.x series * Ruby 2.4 * Ruby 2.5 -* [JRuby 9.1][jruby-9.1] +* [JRuby 9.1][jruby-9.1] (targets MRI v2.3) +* [JRuby 9.2][jruby-9.2] (targets MRI v2.5) -[jruby-1.7]: http://jruby.org/2017/05/11/jruby-1-7-27.html -[jruby-9.0]: http://jruby.org/2016/01/26/jruby-9-0-5-0.html -[jruby-9.1]: http://jruby.org/2018/02/21/jruby-9-1-16-0 +[jruby-1.7]: https://www.jruby.org/2017/05/11/jruby-1-7-27.html +[jruby-9.0]: https://www.jruby.org/2016/01/26/jruby-9-0-5-0.html +[jruby-9.1]: https://www.jruby.org/2017/05/16/jruby-9-1-9-0.html +[jruby-9.2]: https://www.jruby.org/2018/05/24/jruby-9-2-0-0.html If something doesn't work on one of these interpreters, it's a bug. @@ -221,7 +224,7 @@ spec.add_dependency 'oauth2', '~> 1.4' ## License -[MIT][license] +[![License: MIT](https://img.shields.io/badge/License-MIT-green.svg)][source-license] - Copyright (c) 2011-2013 Michael Bleigh and Intridea, Inc. - Copyright (c) 2017-2018 [oauth-xx organization][oauth-xx] diff --git a/Rakefile b/Rakefile index 03dd5fb0..1066a1b6 100644 --- a/Rakefile +++ b/Rakefile @@ -22,7 +22,9 @@ task :test => :spec begin require 'rubocop/rake_task' - RuboCop::RakeTask.new + RuboCop::RakeTask.new do |task| + task.options = ['-D'] # Display the name of the failing cops + end rescue LoadError task :rubocop do warn 'RuboCop is disabled' diff --git a/gemfiles/jruby_1.7.gemfile b/gemfiles/jruby_1.7.gemfile index 3c71357a..dc37d397 100644 --- a/gemfiles/jruby_1.7.gemfile +++ b/gemfiles/jruby_1.7.gemfile @@ -1,8 +1,6 @@ source 'https://rubygems.org' group :test do - # Some changes to defaults make older version config incompatible with newer version config - # gem "rubocop", "~> 0.41.2" gem 'rake' gem 'rspec' gem 'rspec-pending_for' diff --git a/gemfiles/jruby_9.2.gemfile b/gemfiles/jruby_9.2.gemfile new file mode 100644 index 00000000..60080c62 --- /dev/null +++ b/gemfiles/jruby_9.2.gemfile @@ -0,0 +1,15 @@ +source 'https://rubygems.org' + +group :development do + gem 'pry' +end + +group :test do + gem 'rake' + gem 'rspec' + gem 'rspec-pending_for' + gem 'rubocop', '~> 0.53.0' + gem 'rubocop-rspec', '~> 1.24.0' +end + +gemspec :path => '../' diff --git a/gemfiles/jruby_head.gemfile b/gemfiles/jruby_head.gemfile index 64436169..60080c62 100644 --- a/gemfiles/jruby_head.gemfile +++ b/gemfiles/jruby_head.gemfile @@ -1,7 +1,5 @@ source 'https://rubygems.org' -gem 'rubocop', '~> 0.52.1' - group :development do gem 'pry' end @@ -10,10 +8,8 @@ group :test do gem 'rake' gem 'rspec' gem 'rspec-pending_for' - # rubocop:disable Bundler/DuplicatedGem gem 'rubocop', '~> 0.53.0' gem 'rubocop-rspec', '~> 1.24.0' - # rubocop:enable Bundler/DuplicatedGem end gemspec :path => '../' diff --git a/lib/oauth2/version.rb b/lib/oauth2/version.rb index 63b710dd..6b63a98c 100644 --- a/lib/oauth2/version.rb +++ b/lib/oauth2/version.rb @@ -20,7 +20,7 @@ def minor # # @return [Integer] def patch - 0 + 1 end # The pre-release version, if any diff --git a/spec/helper.rb b/spec/helper.rb index c1bb9d73..47e8b02c 100644 --- a/spec/helper.rb +++ b/spec/helper.rb @@ -9,7 +9,7 @@ SimpleCov.start do add_filter '/spec' - minimum_coverage(95.33) + minimum_coverage(95) end require 'addressable/uri' From db56fe3eb266edcc927b9cfec9e978433f50a0cb Mon Sep 17 00:00:00 2001 From: Peter Boling Date: Sat, 13 Oct 2018 05:26:29 -0700 Subject: [PATCH 2/4] fix unreleased link --- CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index f496b129..89a35d77 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -144,4 +144,4 @@ All notable changes to this project will be documented in this file. [1.3.1]: https://github.com/oauth-xx/oauth2/compare/v1.3.0...v1.3.1 [1.4.0]: https://github.com/oauth-xx/oauth2/compare/v1.3.1...v1.4.0 [1.4.1]: https://github.com/oauth-xx/oauth2/compare/v1.4.0...v1.4.1 -[unreleased]: https://github.com/oauth-xx/oauth2/compare/v1.4.0...1-4-stable +[unreleased]: https://github.com/oauth-xx/oauth2/compare/v1.4.1...HEAD From 2ee6657a79088d3b17ffaa4042c71f36b53a84f2 Mon Sep 17 00:00:00 2001 From: Peter Boling Date: Sat, 13 Oct 2018 05:51:19 -0700 Subject: [PATCH 3/4] allow older rake --- gemfiles/jruby_1.7.gemfile | 3 ++- oauth2.gemspec | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/gemfiles/jruby_1.7.gemfile b/gemfiles/jruby_1.7.gemfile index dc37d397..37dc8fc7 100644 --- a/gemfiles/jruby_1.7.gemfile +++ b/gemfiles/jruby_1.7.gemfile @@ -1,7 +1,8 @@ source 'https://rubygems.org' +gem 'rake', '~> 11.0' + group :test do - gem 'rake' gem 'rspec' gem 'rspec-pending_for' end diff --git a/oauth2.gemspec b/oauth2.gemspec index dae4973f..82e94cbd 100644 --- a/oauth2.gemspec +++ b/oauth2.gemspec @@ -33,7 +33,7 @@ Gem::Specification.new do |spec| spec.add_development_dependency 'backports', '~> 3.11' spec.add_development_dependency 'bundler', '~> 1.16' spec.add_development_dependency 'coveralls', '~> 0.8' - spec.add_development_dependency 'rake', '~> 12.3' + spec.add_development_dependency 'rake', '>= 11.0' spec.add_development_dependency 'rdoc', ['>= 5.0', '< 7'] spec.add_development_dependency 'rspec', '~> 3.0' spec.add_development_dependency 'wwtd' From bfb6a3ddbf478672b4a1f2936a3d2cfe3e34e2f4 Mon Sep 17 00:00:00 2001 From: Peter Boling Date: Sat, 13 Oct 2018 06:11:49 -0700 Subject: [PATCH 4/4] allow failures in JRuby 1.7.27 --- .travis.yml | 1 + gemfiles/jruby_1.7.gemfile | 3 +-- gemfiles/ruby_1.9.gemfile | 2 +- lib/oauth2.rb | 1 + 4 files changed, 4 insertions(+), 3 deletions(-) diff --git a/.travis.yml b/.travis.yml index 2e5043b9..121d011f 100644 --- a/.travis.yml +++ b/.travis.yml @@ -13,6 +13,7 @@ matrix: - rvm: jruby-head - rvm: ruby-head - rvm: rbx-3 + - rvm: jruby-1.7.27 fast_finish: true include: - rvm: jruby-1.7.27 # targets MRI v1.9 diff --git a/gemfiles/jruby_1.7.gemfile b/gemfiles/jruby_1.7.gemfile index 37dc8fc7..7dcc09fd 100644 --- a/gemfiles/jruby_1.7.gemfile +++ b/gemfiles/jruby_1.7.gemfile @@ -1,8 +1,7 @@ source 'https://rubygems.org' -gem 'rake', '~> 11.0' - group :test do + gem 'rake', '~> 11.0' gem 'rspec' gem 'rspec-pending_for' end diff --git a/gemfiles/ruby_1.9.gemfile b/gemfiles/ruby_1.9.gemfile index 369c14a6..8ba4a5ec 100644 --- a/gemfiles/ruby_1.9.gemfile +++ b/gemfiles/ruby_1.9.gemfile @@ -6,7 +6,7 @@ gem 'term-ansicolor', '< 1.4.0' gem 'tins', '< 1.7' group :test do - gem 'rake' + gem 'rake', '~> 11.0' gem 'rspec' gem 'rspec-pending_for' end diff --git a/lib/oauth2.rb b/lib/oauth2.rb index 3515fe66..f4ee76c6 100644 --- a/lib/oauth2.rb +++ b/lib/oauth2.rb @@ -1,5 +1,6 @@ # includes modules from stdlib require 'cgi' +require 'time' # includes gem files require 'oauth2/error'