From 74059e1559b126758b0551238255994a2e75495a Mon Sep 17 00:00:00 2001 From: Marco Schaden Date: Fri, 2 Jun 2017 15:47:19 +0200 Subject: [PATCH 1/3] Add support for Rails 5.1 Rails controller `env` was deprecated and removed but we love backwards compatibility and keep the old behaviour --- lib/rack/tracker/controller.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/rack/tracker/controller.rb b/lib/rack/tracker/controller.rb index a565557..801a52a 100644 --- a/lib/rack/tracker/controller.rb +++ b/lib/rack/tracker/controller.rb @@ -3,7 +3,7 @@ class Tracker module Controller def tracker(&block) if block_given? - yield(Rack::Tracker::HandlerDelegator.new(env)) + yield(Rack::Tracker::HandlerDelegator.new(respond_to?(:request) ? request.env : env)) end end end From c4d1b718576141e568751102185077234667dbe4 Mon Sep 17 00:00:00 2001 From: Marco Schaden Date: Fri, 2 Jun 2017 15:47:42 +0200 Subject: [PATCH 2/3] fine tune travis yaml --- .travis.yml | 22 ++++++---------------- Gemfile.rails-5.1 | 6 ++++++ 2 files changed, 12 insertions(+), 16 deletions(-) create mode 100644 Gemfile.rails-5.1 diff --git a/.travis.yml b/.travis.yml index b826cb7..fe23f15 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,24 +1,14 @@ language: ruby sudo: false rvm: - - 1.9.3 - - 2.0.0 - - 2.1.9 - - 2.2.5 - - 2.3.1 + - 2.1.10 + - 2.2.7 + - 2.3.4 + - 2.4.1 - jruby - - jruby-9.1.5.0 + - jruby-9.1.10.0 gemfile: - Gemfile - Gemfile.rails-3.2 - Gemfile.rails-4.2 -matrix: - exclude: - - rvm: 1.9.3 - gemfile: Gemfile - - rvm: 2.0.0 - gemfile: Gemfile - - rvm: 2.1.9 - gemfile: Gemfile - - rvm: jruby - gemfile: Gemfile + - Gemfile.rails-5.1 diff --git a/Gemfile.rails-5.1 b/Gemfile.rails-5.1 new file mode 100644 index 0000000..f54ce1a --- /dev/null +++ b/Gemfile.rails-5.1 @@ -0,0 +1,6 @@ +source "https://rubygems.org" + +gemspec + +gem 'activesupport', '~> 5.1.0' +gem 'actionpack', '~> 5.1.0' From 9254e9305633be76e44b88f775a6fa1fc898c3af Mon Sep 17 00:00:00 2001 From: Marco Schaden Date: Fri, 2 Jun 2017 16:29:33 +0200 Subject: [PATCH 3/3] drop old jruby and exclude broken combination because jruby 1.7.19 (1.9.3p551) conflicts with rack which requires Ruby version >= 2.2.2 --- .travis.yml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index fe23f15..8a42c15 100644 --- a/.travis.yml +++ b/.travis.yml @@ -5,10 +5,13 @@ rvm: - 2.2.7 - 2.3.4 - 2.4.1 - - jruby - jruby-9.1.10.0 gemfile: - Gemfile - Gemfile.rails-3.2 - Gemfile.rails-4.2 - Gemfile.rails-5.1 +matrix: + exclude: + - rvm: 2.1.10 + gemfile: Gemfile.rails-5.1 # rails 5 needs ruby >= 2.2.2