From 954e79579c01b856dd466e02e327c7f59b69d8c4 Mon Sep 17 00:00:00 2001 From: kares Date: Mon, 27 Apr 2015 21:07:29 +0200 Subject: [PATCH 01/76] appraise latest rails versions --- Appraisals | 10 +++- gemfiles/rails32.gemfile | 2 +- gemfiles/rails32.gemfile.lock | 62 ++++++++++---------- gemfiles/rails40.gemfile | 2 +- gemfiles/rails40.gemfile.lock | 21 +++---- gemfiles/rails41.gemfile | 2 +- gemfiles/rails41.gemfile.lock | 68 ++++++++++----------- gemfiles/rails42.gemfile | 8 +++ gemfiles/rails42.gemfile.lock | 107 ++++++++++++++++++++++++++++++++++ 9 files changed, 195 insertions(+), 87 deletions(-) create mode 100644 gemfiles/rails42.gemfile create mode 100644 gemfiles/rails42.gemfile.lock diff --git a/Appraisals b/Appraisals index 36ee94f6..324653b1 100644 --- a/Appraisals +++ b/Appraisals @@ -11,15 +11,19 @@ appraise "rails31" do end appraise "rails32" do - gem "rails", "~> 3.2.18" + gem "rails", "~> 3.2.21" end appraise "rails40" do - gem "rails", "~> 4.0.4" + gem "rails", "~> 4.0.13" end appraise "rails41" do - gem "rails", "~> 4.1.1" + gem "rails", "~> 4.1.10" +end + +appraise "rails42" do + gem "rails", "~> 4.2.1" end appraise "railsNG" do diff --git a/gemfiles/rails32.gemfile b/gemfiles/rails32.gemfile index 2392e03c..26cad906 100644 --- a/gemfiles/rails32.gemfile +++ b/gemfiles/rails32.gemfile @@ -4,5 +4,5 @@ source "https://rubygems.org" gem "rake", "~> 10.3.1", :group=>:test, :require=>nil gem "rspec", "~> 2.14.1", :group=>:test -gem "rails", "~> 3.2.18" +gem "rails", "~> 3.2.21" diff --git a/gemfiles/rails32.gemfile.lock b/gemfiles/rails32.gemfile.lock index d98f9def..be82186d 100644 --- a/gemfiles/rails32.gemfile.lock +++ b/gemfiles/rails32.gemfile.lock @@ -1,12 +1,12 @@ GEM remote: https://rubygems.org/ specs: - actionmailer (3.2.19) - actionpack (= 3.2.19) + actionmailer (3.2.21) + actionpack (= 3.2.21) mail (~> 2.5.4) - actionpack (3.2.19) - activemodel (= 3.2.19) - activesupport (= 3.2.19) + actionpack (3.2.21) + activemodel (= 3.2.21) + activesupport (= 3.2.21) builder (~> 3.0.0) erubis (~> 2.7.0) journey (~> 1.0.4) @@ -14,18 +14,18 @@ GEM rack-cache (~> 1.2) rack-test (~> 0.6.1) sprockets (~> 2.2.1) - activemodel (3.2.19) - activesupport (= 3.2.19) + activemodel (3.2.21) + activesupport (= 3.2.21) builder (~> 3.0.0) - activerecord (3.2.19) - activemodel (= 3.2.19) - activesupport (= 3.2.19) + activerecord (3.2.21) + activemodel (= 3.2.21) + activesupport (= 3.2.21) arel (~> 3.0.2) tzinfo (~> 0.3.29) - activeresource (3.2.19) - activemodel (= 3.2.19) - activesupport (= 3.2.19) - activesupport (3.2.19) + activeresource (3.2.21) + activemodel (= 3.2.21) + activesupport (= 3.2.21) + activesupport (3.2.21) i18n (~> 0.6, >= 0.6.4) multi_json (~> 1.0) arel (3.0.3) @@ -33,33 +33,33 @@ GEM diff-lcs (1.2.5) erubis (2.7.0) hike (1.2.3) - i18n (0.6.11) + i18n (0.7.0) journey (1.0.4) - json (1.8.1-java) + json (1.8.2-java) mail (2.5.4) mime-types (~> 1.16) treetop (~> 1.4.8) mime-types (1.25.1) - multi_json (1.10.1) + multi_json (1.11.0) polyglot (0.3.5) rack (1.4.5) rack-cache (1.2) rack (>= 0.4) rack-ssl (1.3.4) rack - rack-test (0.6.2) + rack-test (0.6.3) rack (>= 1.0) - rails (3.2.19) - actionmailer (= 3.2.19) - actionpack (= 3.2.19) - activerecord (= 3.2.19) - activeresource (= 3.2.19) - activesupport (= 3.2.19) + rails (3.2.21) + actionmailer (= 3.2.21) + actionpack (= 3.2.21) + activerecord (= 3.2.21) + activeresource (= 3.2.21) + activesupport (= 3.2.21) bundler (~> 1.0) - railties (= 3.2.19) - railties (3.2.19) - actionpack (= 3.2.19) - activesupport (= 3.2.19) + railties (= 3.2.21) + railties (3.2.21) + actionpack (= 3.2.21) + activesupport (= 3.2.21) rack-ssl (~> 1.3.2) rake (>= 0.8.7) rdoc (~> 3.4) @@ -75,7 +75,7 @@ GEM rspec-expectations (2.14.5) diff-lcs (>= 1.1.3, < 2.0) rspec-mocks (2.14.6) - sprockets (2.2.2) + sprockets (2.2.3) hike (~> 1.2) multi_json (~> 1.0) rack (~> 1.0) @@ -85,12 +85,12 @@ GEM treetop (1.4.15) polyglot polyglot (>= 0.3.1) - tzinfo (0.3.40) + tzinfo (0.3.44) PLATFORMS java DEPENDENCIES - rails (~> 3.2.18) + rails (~> 3.2.21) rake (~> 10.3.1) rspec (~> 2.14.1) diff --git a/gemfiles/rails40.gemfile b/gemfiles/rails40.gemfile index bb1c06f4..b1932544 100644 --- a/gemfiles/rails40.gemfile +++ b/gemfiles/rails40.gemfile @@ -4,5 +4,5 @@ source "https://rubygems.org" gem "rake", "~> 10.3.1", :group=>:test, :require=>nil gem "rspec", "~> 2.14.1", :group=>:test -gem "rails", "~> 4.0.4" +gem "rails", "~> 4.0.13" diff --git a/gemfiles/rails40.gemfile.lock b/gemfiles/rails40.gemfile.lock index b15a4cf8..4e3e4c7d 100644 --- a/gemfiles/rails40.gemfile.lock +++ b/gemfiles/rails40.gemfile.lock @@ -18,7 +18,7 @@ GEM activerecord-deprecated_finders (~> 1.0.2) activesupport (= 4.0.13) arel (~> 4.0.0) - activerecord-deprecated_finders (1.0.3) + activerecord-deprecated_finders (1.0.4) activesupport (4.0.13) i18n (~> 0.6, >= 0.6.9) minitest (~> 4.2) @@ -29,13 +29,12 @@ GEM builder (3.1.4) diff-lcs (1.2.5) erubis (2.7.0) - hike (1.2.3) i18n (0.7.0) mail (2.6.3) mime-types (>= 1.16, < 3) - mime-types (2.4.3) + mime-types (2.5) minitest (4.7.5) - multi_json (1.10.1) + multi_json (1.11.0) rack (1.5.2) rack-test (0.6.3) rack (>= 1.0) @@ -61,24 +60,20 @@ GEM rspec-expectations (2.14.5) diff-lcs (>= 1.1.3, < 2.0) rspec-mocks (2.14.6) - sprockets (2.12.3) - hike (~> 1.2) - multi_json (~> 1.0) + sprockets (3.0.2) rack (~> 1.0) - tilt (~> 1.1, != 1.3.0) - sprockets-rails (2.2.2) + sprockets-rails (2.2.4) actionpack (>= 3.0) activesupport (>= 3.0) sprockets (>= 2.8, < 4.0) thor (0.19.1) - thread_safe (0.3.4-java) - tilt (1.4.1) - tzinfo (0.3.42) + thread_safe (0.3.5-java) + tzinfo (0.3.44) PLATFORMS java DEPENDENCIES - rails (~> 4.0.4) + rails (~> 4.0.13) rake (~> 10.3.1) rspec (~> 2.14.1) diff --git a/gemfiles/rails41.gemfile b/gemfiles/rails41.gemfile index 298d6162..4c85f2aa 100644 --- a/gemfiles/rails41.gemfile +++ b/gemfiles/rails41.gemfile @@ -4,5 +4,5 @@ source "https://rubygems.org" gem "rake", "~> 10.3.1", :group=>:test, :require=>nil gem "rspec", "~> 2.14.1", :group=>:test -gem "rails", "~> 4.1.1" +gem "rails", "~> 4.1.10" diff --git a/gemfiles/rails41.gemfile.lock b/gemfiles/rails41.gemfile.lock index 51e6ae5e..9b374054 100644 --- a/gemfiles/rails41.gemfile.lock +++ b/gemfiles/rails41.gemfile.lock @@ -1,27 +1,27 @@ GEM remote: https://rubygems.org/ specs: - actionmailer (4.1.9) - actionpack (= 4.1.9) - actionview (= 4.1.9) + actionmailer (4.1.10) + actionpack (= 4.1.10) + actionview (= 4.1.10) mail (~> 2.5, >= 2.5.4) - actionpack (4.1.9) - actionview (= 4.1.9) - activesupport (= 4.1.9) + actionpack (4.1.10) + actionview (= 4.1.10) + activesupport (= 4.1.10) rack (~> 1.5.2) rack-test (~> 0.6.2) - actionview (4.1.9) - activesupport (= 4.1.9) + actionview (4.1.10) + activesupport (= 4.1.10) builder (~> 3.1) erubis (~> 2.7.0) - activemodel (4.1.9) - activesupport (= 4.1.9) + activemodel (4.1.10) + activesupport (= 4.1.10) builder (~> 3.1) - activerecord (4.1.9) - activemodel (= 4.1.9) - activesupport (= 4.1.9) + activerecord (4.1.10) + activemodel (= 4.1.10) + activesupport (= 4.1.10) arel (~> 5.0.0) - activesupport (4.1.9) + activesupport (4.1.10) i18n (~> 0.6, >= 0.6.9) json (~> 1.7, >= 1.7.7) minitest (~> 5.1) @@ -31,30 +31,28 @@ GEM builder (3.2.2) diff-lcs (1.2.5) erubis (2.7.0) - hike (1.2.3) i18n (0.7.0) json (1.8.2-java) mail (2.6.3) mime-types (>= 1.16, < 3) - mime-types (2.4.3) - minitest (5.5.1) - multi_json (1.10.1) + mime-types (2.5) + minitest (5.6.0) rack (1.5.2) rack-test (0.6.3) rack (>= 1.0) - rails (4.1.9) - actionmailer (= 4.1.9) - actionpack (= 4.1.9) - actionview (= 4.1.9) - activemodel (= 4.1.9) - activerecord (= 4.1.9) - activesupport (= 4.1.9) + rails (4.1.10) + actionmailer (= 4.1.10) + actionpack (= 4.1.10) + actionview (= 4.1.10) + activemodel (= 4.1.10) + activerecord (= 4.1.10) + activesupport (= 4.1.10) bundler (>= 1.3.0, < 2.0) - railties (= 4.1.9) + railties (= 4.1.10) sprockets-rails (~> 2.0) - railties (4.1.9) - actionpack (= 4.1.9) - activesupport (= 4.1.9) + railties (4.1.10) + actionpack (= 4.1.10) + activesupport (= 4.1.10) rake (>= 0.8.7) thor (>= 0.18.1, < 2.0) rake (10.3.2) @@ -66,18 +64,14 @@ GEM rspec-expectations (2.14.5) diff-lcs (>= 1.1.3, < 2.0) rspec-mocks (2.14.6) - sprockets (2.12.3) - hike (~> 1.2) - multi_json (~> 1.0) + sprockets (3.0.2) rack (~> 1.0) - tilt (~> 1.1, != 1.3.0) - sprockets-rails (2.2.2) + sprockets-rails (2.2.4) actionpack (>= 3.0) activesupport (>= 3.0) sprockets (>= 2.8, < 4.0) thor (0.19.1) - thread_safe (0.3.4-java) - tilt (1.4.1) + thread_safe (0.3.5-java) tzinfo (1.2.2) thread_safe (~> 0.1) @@ -85,6 +79,6 @@ PLATFORMS java DEPENDENCIES - rails (~> 4.1.1) + rails (~> 4.1.10) rake (~> 10.3.1) rspec (~> 2.14.1) diff --git a/gemfiles/rails42.gemfile b/gemfiles/rails42.gemfile new file mode 100644 index 00000000..114569a6 --- /dev/null +++ b/gemfiles/rails42.gemfile @@ -0,0 +1,8 @@ +# This file was generated by Appraisal + +source "https://rubygems.org" + +gem "rake", "~> 10.3.1", :group=>:test, :require=>nil +gem "rspec", "~> 2.14.1", :group=>:test +gem "rails", "~> 4.2.1" + diff --git a/gemfiles/rails42.gemfile.lock b/gemfiles/rails42.gemfile.lock new file mode 100644 index 00000000..8e94e936 --- /dev/null +++ b/gemfiles/rails42.gemfile.lock @@ -0,0 +1,107 @@ +GEM + remote: https://rubygems.org/ + specs: + actionmailer (4.2.1) + actionpack (= 4.2.1) + actionview (= 4.2.1) + activejob (= 4.2.1) + mail (~> 2.5, >= 2.5.4) + rails-dom-testing (~> 1.0, >= 1.0.5) + actionpack (4.2.1) + actionview (= 4.2.1) + activesupport (= 4.2.1) + rack (~> 1.6) + rack-test (~> 0.6.2) + rails-dom-testing (~> 1.0, >= 1.0.5) + rails-html-sanitizer (~> 1.0, >= 1.0.1) + actionview (4.2.1) + activesupport (= 4.2.1) + builder (~> 3.1) + erubis (~> 2.7.0) + rails-dom-testing (~> 1.0, >= 1.0.5) + rails-html-sanitizer (~> 1.0, >= 1.0.1) + activejob (4.2.1) + activesupport (= 4.2.1) + globalid (>= 0.3.0) + activemodel (4.2.1) + activesupport (= 4.2.1) + builder (~> 3.1) + activerecord (4.2.1) + activemodel (= 4.2.1) + activesupport (= 4.2.1) + arel (~> 6.0) + activesupport (4.2.1) + i18n (~> 0.7) + json (~> 1.7, >= 1.7.7) + minitest (~> 5.1) + thread_safe (~> 0.3, >= 0.3.4) + tzinfo (~> 1.1) + arel (6.0.0) + builder (3.2.2) + diff-lcs (1.2.5) + erubis (2.7.0) + globalid (0.3.5) + activesupport (>= 4.1.0) + i18n (0.7.0) + json (1.8.2-java) + loofah (2.0.1) + nokogiri (>= 1.5.9) + mail (2.6.3) + mime-types (>= 1.16, < 3) + mime-types (2.5) + minitest (5.6.0) + nokogiri (1.6.6.2-java) + rack (1.6.0) + rack-test (0.6.3) + rack (>= 1.0) + rails (4.2.1) + actionmailer (= 4.2.1) + actionpack (= 4.2.1) + actionview (= 4.2.1) + activejob (= 4.2.1) + activemodel (= 4.2.1) + activerecord (= 4.2.1) + activesupport (= 4.2.1) + bundler (>= 1.3.0, < 2.0) + railties (= 4.2.1) + sprockets-rails + rails-deprecated_sanitizer (1.0.3) + activesupport (>= 4.2.0.alpha) + rails-dom-testing (1.0.6) + activesupport (>= 4.2.0.beta, < 5.0) + nokogiri (~> 1.6.0) + rails-deprecated_sanitizer (>= 1.0.1) + rails-html-sanitizer (1.0.2) + loofah (~> 2.0) + railties (4.2.1) + actionpack (= 4.2.1) + activesupport (= 4.2.1) + rake (>= 0.8.7) + thor (>= 0.18.1, < 2.0) + rake (10.3.2) + rspec (2.14.1) + rspec-core (~> 2.14.0) + rspec-expectations (~> 2.14.0) + rspec-mocks (~> 2.14.0) + rspec-core (2.14.8) + rspec-expectations (2.14.5) + diff-lcs (>= 1.1.3, < 2.0) + rspec-mocks (2.14.6) + sprockets (3.0.2) + rack (~> 1.0) + sprockets-rails (2.2.4) + actionpack (>= 3.0) + activesupport (>= 3.0) + sprockets (>= 2.8, < 4.0) + thor (0.19.1) + thread_safe (0.3.5-java) + tzinfo (1.2.2) + thread_safe (~> 0.1) + +PLATFORMS + java + +DEPENDENCIES + rails (~> 4.2.1) + rake (~> 10.3.1) + rspec (~> 2.14.1) From 342d4f8c87633aa8b056b0fdb86204a3ba5eb8e6 Mon Sep 17 00:00:00 2001 From: kares Date: Mon, 27 Apr 2015 21:18:30 +0200 Subject: [PATCH 02/76] let us see how we're doing with the travis-ci test matrix --- .travis.yml | 58 ++++++++++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 57 insertions(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 8d72ce81..dd883f4d 100644 --- a/.travis.yml +++ b/.travis.yml @@ -23,6 +23,7 @@ gemfile: - gemfiles/rails32.gemfile - gemfiles/rails40.gemfile - gemfiles/rails41.gemfile + - gemfiles/rails42.gemfile env: - JRUBY_OPTS="--1.8 $JRUBY_OPTS" - JRUBY_OPTS="$JRUBY_OPTS" JAVA_OPTS="-Djruby.version=$JRUBY_VERSION" # for mvn's jruby plugins @@ -37,7 +38,8 @@ before_install: matrix: allow_failures: - rvm: jruby-1.6.8 - #- gemfile: gemfiles/rails41.gemfile + - rvm: jruby-head + - gemfile: gemfiles/rails42.gemfile exclude: ## avoid jruby-head with JDK6 : - rvm: jruby-head @@ -96,6 +98,14 @@ matrix: gemfile: gemfiles/rails41.gemfile env: JRUBY_OPTS="$JRUBY_OPTS" JAVA_OPTS="-Djruby.version=$JRUBY_VERSION" jdk: openjdk6 + - rvm: jruby-head + gemfile: gemfiles/rails42.gemfile + env: JRUBY_OPTS="--1.8 $JRUBY_OPTS" + jdk: openjdk6 + - rvm: jruby-head + gemfile: gemfiles/rails42.gemfile + env: JRUBY_OPTS="$JRUBY_OPTS" JAVA_OPTS="-Djruby.version=$JRUBY_VERSION" + jdk: openjdk6 ## avoid jruby-1.6.8 with JDK8 : - rvm: jruby-1.6.8 gemfile: Gemfile @@ -153,6 +163,14 @@ matrix: gemfile: gemfiles/rails41.gemfile env: JRUBY_OPTS="$JRUBY_OPTS" JAVA_OPTS="-Djruby.version=$JRUBY_VERSION" jdk: oraclejdk8 + - rvm: jruby-1.6.8 + gemfile: gemfiles/rails42.gemfile + env: JRUBY_OPTS="--1.8 $JRUBY_OPTS" + jdk: oraclejdk8 + - rvm: jruby-1.6.8 + gemfile: gemfiles/rails42.gemfile + env: JRUBY_OPTS="$JRUBY_OPTS" JAVA_OPTS="-Djruby.version=$JRUBY_VERSION" + jdk: oraclejdk8 ## rails 4.0 does not run on --1.8 - rvm: jruby-1.7.16 gemfile: gemfiles/rails40.gemfile @@ -229,6 +247,44 @@ matrix: gemfile: gemfiles/rails41.gemfile env: JRUBY_OPTS="$JRUBY_OPTS" JAVA_OPTS="-Djruby.version=$JRUBY_VERSION" jdk: oraclejdk8 + ## rails 4.2 won't run on --1.8 + - rvm: jruby-1.7.16 + gemfile: gemfiles/rails42.gemfile + env: JRUBY_OPTS="--1.8 $JRUBY_OPTS" + jdk: openjdk6 + - rvm: jruby-1.7.16 + gemfile: gemfiles/rails42.gemfile + env: JRUBY_OPTS="--1.8 $JRUBY_OPTS" + jdk: oraclejdk7 + - rvm: jruby-1.7.16 + gemfile: gemfiles/rails42.gemfile + env: JRUBY_OPTS="--1.8 $JRUBY_OPTS" + jdk: oraclejdk8 + ## rails 4.2 won't run on JRuby 1.6 + - rvm: jruby-1.6.8 + gemfile: gemfiles/rails42.gemfile + env: JRUBY_OPTS="--1.8 $JRUBY_OPTS" + jdk: openjdk6 + - rvm: jruby-1.6.8 + gemfile: gemfiles/rails42.gemfile + env: JRUBY_OPTS="--1.8 $JRUBY_OPTS" + jdk: oraclejdk7 + - rvm: jruby-1.6.8 + gemfile: gemfiles/rails42.gemfile + env: JRUBY_OPTS="--1.8 $JRUBY_OPTS" + jdk: oraclejdk8 + - rvm: jruby-1.6.8 + gemfile: gemfiles/rails42.gemfile + env: JRUBY_OPTS="$JRUBY_OPTS" JAVA_OPTS="-Djruby.version=$JRUBY_VERSION" + jdk: openjdk6 + - rvm: jruby-1.6.8 + gemfile: gemfiles/rails42.gemfile + env: JRUBY_OPTS="$JRUBY_OPTS" JAVA_OPTS="-Djruby.version=$JRUBY_VERSION" + jdk: oraclejdk7 + - rvm: jruby-1.6.8 + gemfile: gemfiles/rails42.gemfile + env: JRUBY_OPTS="$JRUBY_OPTS" JAVA_OPTS="-Djruby.version=$JRUBY_VERSION" + jdk: oraclejdk8 ## rails 4.0 does not run on --1.8 (jruby-head) #- rvm: jruby-head # gemfile: gemfiles/rails40.gemfile From 564f5f611229ecedace1075e671defa9bc7960ac Mon Sep 17 00:00:00 2001 From: kares Date: Tue, 28 Apr 2015 09:28:50 +0200 Subject: [PATCH 03/76] make sure i18n < 0.7 for Rails 3.x still test run with 1.8 mode --- Appraisals | 2 ++ gemfiles/rails31.gemfile | 1 + gemfiles/rails31.gemfile.lock | 11 ++++++----- gemfiles/rails32.gemfile | 1 + gemfiles/rails32.gemfile.lock | 3 ++- 5 files changed, 12 insertions(+), 6 deletions(-) diff --git a/Appraisals b/Appraisals index 324653b1..28f79ca7 100644 --- a/Appraisals +++ b/Appraisals @@ -7,10 +7,12 @@ appraise "rails30" do end appraise "rails31" do + gem "i18n", "< 0.7" gem "rails", "~> 3.1.12" end appraise "rails32" do + gem "i18n", "< 0.7" gem "rails", "~> 3.2.21" end diff --git a/gemfiles/rails31.gemfile b/gemfiles/rails31.gemfile index 7ade1cb9..6d56f2cb 100644 --- a/gemfiles/rails31.gemfile +++ b/gemfiles/rails31.gemfile @@ -4,5 +4,6 @@ source "https://rubygems.org" gem "rake", "~> 10.3.1", :group=>:test, :require=>nil gem "rspec", "~> 2.14.1", :group=>:test +gem "i18n", "< 0.7" gem "rails", "~> 3.1.12" diff --git a/gemfiles/rails31.gemfile.lock b/gemfiles/rails31.gemfile.lock index 308380e4..05e8e0fd 100644 --- a/gemfiles/rails31.gemfile.lock +++ b/gemfiles/rails31.gemfile.lock @@ -35,13 +35,13 @@ GEM erubis (2.7.0) hike (1.2.3) i18n (0.6.11) - json (1.8.1-java) + json (1.8.2-java) mail (2.4.4) i18n (>= 0.4.0) mime-types (~> 1.16) treetop (~> 1.4.8) mime-types (1.25.1) - multi_json (1.10.1) + multi_json (1.11.0) polyglot (0.3.5) rack (1.3.10) rack-cache (1.2) @@ -50,7 +50,7 @@ GEM rack (>= 1.0.0) rack-ssl (1.3.4) rack - rack-test (0.6.2) + rack-test (0.6.3) rack (>= 1.0) rails (3.1.12) actionmailer (= 3.1.12) @@ -78,7 +78,7 @@ GEM rspec-expectations (2.14.5) diff-lcs (>= 1.1.3, < 2.0) rspec-mocks (2.14.6) - sprockets (2.0.4) + sprockets (2.0.5) hike (~> 1.2) rack (~> 1.0) tilt (~> 1.1, != 1.3.0) @@ -87,12 +87,13 @@ GEM treetop (1.4.15) polyglot polyglot (>= 0.3.1) - tzinfo (0.3.40) + tzinfo (0.3.44) PLATFORMS java DEPENDENCIES + i18n (< 0.7) rails (~> 3.1.12) rake (~> 10.3.1) rspec (~> 2.14.1) diff --git a/gemfiles/rails32.gemfile b/gemfiles/rails32.gemfile index 26cad906..b76a1fd2 100644 --- a/gemfiles/rails32.gemfile +++ b/gemfiles/rails32.gemfile @@ -4,5 +4,6 @@ source "https://rubygems.org" gem "rake", "~> 10.3.1", :group=>:test, :require=>nil gem "rspec", "~> 2.14.1", :group=>:test +gem "i18n", "< 0.7" gem "rails", "~> 3.2.21" diff --git a/gemfiles/rails32.gemfile.lock b/gemfiles/rails32.gemfile.lock index be82186d..76f1fa26 100644 --- a/gemfiles/rails32.gemfile.lock +++ b/gemfiles/rails32.gemfile.lock @@ -33,7 +33,7 @@ GEM diff-lcs (1.2.5) erubis (2.7.0) hike (1.2.3) - i18n (0.7.0) + i18n (0.6.11) journey (1.0.4) json (1.8.2-java) mail (2.5.4) @@ -91,6 +91,7 @@ PLATFORMS java DEPENDENCIES + i18n (< 0.7) rails (~> 3.2.21) rake (~> 10.3.1) rspec (~> 2.14.1) From 0c67f6cf988f330d36b425508eab9534d108a079 Mon Sep 17 00:00:00 2001 From: kares Date: Tue, 28 Apr 2015 18:25:48 +0200 Subject: [PATCH 04/76] more travis-ci magic to get specs rolling again --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index dd883f4d..05aa588f 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,7 +1,7 @@ language: ruby sudo: false bundler_args: --without development -script: rake spec +script: jruby -G -S rake spec branches: only: - master From ce31f75d0ac230d718c6b4f042f389f66bdbeb6d Mon Sep 17 00:00:00 2001 From: kares Date: Tue, 28 Apr 2015 18:47:48 +0200 Subject: [PATCH 05/76] just to be sure about travis-ci ... update rake everywhere to 10.4.2 --- Gemfile | 2 +- Gemfile.lock | 4 ++-- gemfiles/rails23.gemfile | 2 +- gemfiles/rails23.gemfile.lock | 4 ++-- gemfiles/rails30.gemfile | 2 +- gemfiles/rails30.gemfile.lock | 4 ++-- gemfiles/rails31.gemfile | 2 +- gemfiles/rails31.gemfile.lock | 4 ++-- gemfiles/rails32.gemfile | 2 +- gemfiles/rails32.gemfile.lock | 4 ++-- gemfiles/rails40.gemfile | 2 +- gemfiles/rails40.gemfile.lock | 4 ++-- gemfiles/rails41.gemfile | 2 +- gemfiles/rails41.gemfile.lock | 4 ++-- gemfiles/rails42.gemfile | 2 +- gemfiles/rails42.gemfile.lock | 4 ++-- 16 files changed, 24 insertions(+), 24 deletions(-) diff --git a/Gemfile b/Gemfile index 77beedbf..d61c8666 100644 --- a/Gemfile +++ b/Gemfile @@ -12,6 +12,6 @@ group :development do gem 'appraisal', :require => nil end -gem 'rake', '~> 10.3.1', :group => :test, :require => nil +gem 'rake', '~> 10.4.2', :group => :test, :require => nil gem 'rspec', '~> 2.14.1', :group => :test gem 'jruby-openssl', :group => :test if JRUBY_VERSION < '1.7.0' diff --git a/Gemfile.lock b/Gemfile.lock index 1ba3769b..ded93f14 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -7,7 +7,7 @@ GEM diff-lcs (1.2.5) jruby-openssl (0.9.6-java) rack (1.5.2) - rake (10.3.2) + rake (10.4.2) rspec (2.14.1) rspec-core (~> 2.14.0) rspec-expectations (~> 2.14.0) @@ -24,5 +24,5 @@ DEPENDENCIES appraisal jruby-openssl rack (~> 1.5.2) - rake (~> 10.3.1) + rake (~> 10.4.2) rspec (~> 2.14.1) diff --git a/gemfiles/rails23.gemfile b/gemfiles/rails23.gemfile index 95fff13a..5a2f084a 100644 --- a/gemfiles/rails23.gemfile +++ b/gemfiles/rails23.gemfile @@ -2,7 +2,7 @@ source "https://rubygems.org" -gem "rake", "~> 10.3.1", :group=>:test, :require=>nil +gem "rake", "~> 10.4.2", :group=>:test, :require=>nil gem "rspec", "~> 2.14.1", :group=>:test gem "rails", "~> 2.3.18" diff --git a/gemfiles/rails23.gemfile.lock b/gemfiles/rails23.gemfile.lock index dff3a162..20a91a1d 100644 --- a/gemfiles/rails23.gemfile.lock +++ b/gemfiles/rails23.gemfile.lock @@ -20,7 +20,7 @@ GEM activeresource (= 2.3.18) activesupport (= 2.3.18) rake (>= 0.8.3) - rake (10.3.2) + rake (10.4.2) rspec (2.14.1) rspec-core (~> 2.14.0) rspec-expectations (~> 2.14.0) @@ -35,5 +35,5 @@ PLATFORMS DEPENDENCIES rails (~> 2.3.18) - rake (~> 10.3.1) + rake (~> 10.4.2) rspec (~> 2.14.1) diff --git a/gemfiles/rails30.gemfile b/gemfiles/rails30.gemfile index e2954083..f729b9f1 100644 --- a/gemfiles/rails30.gemfile +++ b/gemfiles/rails30.gemfile @@ -2,7 +2,7 @@ source "https://rubygems.org" -gem "rake", "~> 10.3.1", :group=>:test, :require=>nil +gem "rake", "~> 10.4.2", :group=>:test, :require=>nil gem "rspec", "~> 2.14.1", :group=>:test gem "rails", "~> 3.0.20" diff --git a/gemfiles/rails30.gemfile.lock b/gemfiles/rails30.gemfile.lock index 833ccd9d..1de9aaef 100644 --- a/gemfiles/rails30.gemfile.lock +++ b/gemfiles/rails30.gemfile.lock @@ -61,7 +61,7 @@ GEM rake (>= 0.8.7) rdoc (~> 3.4) thor (~> 0.14.4) - rake (10.3.2) + rake (10.4.2) rdoc (3.12.2) json (~> 1.4) rspec (2.14.1) @@ -106,5 +106,5 @@ PLATFORMS DEPENDENCIES rails (~> 3.0.20) - rake (~> 10.3.1) + rake (~> 10.4.2) rspec (~> 2.14.1) diff --git a/gemfiles/rails31.gemfile b/gemfiles/rails31.gemfile index 6d56f2cb..b9221a47 100644 --- a/gemfiles/rails31.gemfile +++ b/gemfiles/rails31.gemfile @@ -2,7 +2,7 @@ source "https://rubygems.org" -gem "rake", "~> 10.3.1", :group=>:test, :require=>nil +gem "rake", "~> 10.4.2", :group=>:test, :require=>nil gem "rspec", "~> 2.14.1", :group=>:test gem "i18n", "< 0.7" gem "rails", "~> 3.1.12" diff --git a/gemfiles/rails31.gemfile.lock b/gemfiles/rails31.gemfile.lock index 05e8e0fd..63296653 100644 --- a/gemfiles/rails31.gemfile.lock +++ b/gemfiles/rails31.gemfile.lock @@ -67,7 +67,7 @@ GEM rake (>= 0.8.7) rdoc (~> 3.4) thor (~> 0.14.6) - rake (10.3.2) + rake (10.4.2) rdoc (3.12.2) json (~> 1.4) rspec (2.14.1) @@ -95,5 +95,5 @@ PLATFORMS DEPENDENCIES i18n (< 0.7) rails (~> 3.1.12) - rake (~> 10.3.1) + rake (~> 10.4.2) rspec (~> 2.14.1) diff --git a/gemfiles/rails32.gemfile b/gemfiles/rails32.gemfile index b76a1fd2..73935172 100644 --- a/gemfiles/rails32.gemfile +++ b/gemfiles/rails32.gemfile @@ -2,7 +2,7 @@ source "https://rubygems.org" -gem "rake", "~> 10.3.1", :group=>:test, :require=>nil +gem "rake", "~> 10.4.2", :group=>:test, :require=>nil gem "rspec", "~> 2.14.1", :group=>:test gem "i18n", "< 0.7" gem "rails", "~> 3.2.21" diff --git a/gemfiles/rails32.gemfile.lock b/gemfiles/rails32.gemfile.lock index 76f1fa26..ac3bf21d 100644 --- a/gemfiles/rails32.gemfile.lock +++ b/gemfiles/rails32.gemfile.lock @@ -64,7 +64,7 @@ GEM rake (>= 0.8.7) rdoc (~> 3.4) thor (>= 0.14.6, < 2.0) - rake (10.3.2) + rake (10.4.2) rdoc (3.12.2) json (~> 1.4) rspec (2.14.1) @@ -93,5 +93,5 @@ PLATFORMS DEPENDENCIES i18n (< 0.7) rails (~> 3.2.21) - rake (~> 10.3.1) + rake (~> 10.4.2) rspec (~> 2.14.1) diff --git a/gemfiles/rails40.gemfile b/gemfiles/rails40.gemfile index b1932544..9d52f5b7 100644 --- a/gemfiles/rails40.gemfile +++ b/gemfiles/rails40.gemfile @@ -2,7 +2,7 @@ source "https://rubygems.org" -gem "rake", "~> 10.3.1", :group=>:test, :require=>nil +gem "rake", "~> 10.4.2", :group=>:test, :require=>nil gem "rspec", "~> 2.14.1", :group=>:test gem "rails", "~> 4.0.13" diff --git a/gemfiles/rails40.gemfile.lock b/gemfiles/rails40.gemfile.lock index 4e3e4c7d..04bf3d99 100644 --- a/gemfiles/rails40.gemfile.lock +++ b/gemfiles/rails40.gemfile.lock @@ -51,7 +51,7 @@ GEM activesupport (= 4.0.13) rake (>= 0.8.7) thor (>= 0.18.1, < 2.0) - rake (10.3.2) + rake (10.4.2) rspec (2.14.1) rspec-core (~> 2.14.0) rspec-expectations (~> 2.14.0) @@ -75,5 +75,5 @@ PLATFORMS DEPENDENCIES rails (~> 4.0.13) - rake (~> 10.3.1) + rake (~> 10.4.2) rspec (~> 2.14.1) diff --git a/gemfiles/rails41.gemfile b/gemfiles/rails41.gemfile index 4c85f2aa..27b1da78 100644 --- a/gemfiles/rails41.gemfile +++ b/gemfiles/rails41.gemfile @@ -2,7 +2,7 @@ source "https://rubygems.org" -gem "rake", "~> 10.3.1", :group=>:test, :require=>nil +gem "rake", "~> 10.4.2", :group=>:test, :require=>nil gem "rspec", "~> 2.14.1", :group=>:test gem "rails", "~> 4.1.10" diff --git a/gemfiles/rails41.gemfile.lock b/gemfiles/rails41.gemfile.lock index 9b374054..44f66da8 100644 --- a/gemfiles/rails41.gemfile.lock +++ b/gemfiles/rails41.gemfile.lock @@ -55,7 +55,7 @@ GEM activesupport (= 4.1.10) rake (>= 0.8.7) thor (>= 0.18.1, < 2.0) - rake (10.3.2) + rake (10.4.2) rspec (2.14.1) rspec-core (~> 2.14.0) rspec-expectations (~> 2.14.0) @@ -80,5 +80,5 @@ PLATFORMS DEPENDENCIES rails (~> 4.1.10) - rake (~> 10.3.1) + rake (~> 10.4.2) rspec (~> 2.14.1) diff --git a/gemfiles/rails42.gemfile b/gemfiles/rails42.gemfile index 114569a6..390d4d38 100644 --- a/gemfiles/rails42.gemfile +++ b/gemfiles/rails42.gemfile @@ -2,7 +2,7 @@ source "https://rubygems.org" -gem "rake", "~> 10.3.1", :group=>:test, :require=>nil +gem "rake", "~> 10.4.2", :group=>:test, :require=>nil gem "rspec", "~> 2.14.1", :group=>:test gem "rails", "~> 4.2.1" diff --git a/gemfiles/rails42.gemfile.lock b/gemfiles/rails42.gemfile.lock index 8e94e936..db2ea17c 100644 --- a/gemfiles/rails42.gemfile.lock +++ b/gemfiles/rails42.gemfile.lock @@ -78,7 +78,7 @@ GEM activesupport (= 4.2.1) rake (>= 0.8.7) thor (>= 0.18.1, < 2.0) - rake (10.3.2) + rake (10.4.2) rspec (2.14.1) rspec-core (~> 2.14.0) rspec-expectations (~> 2.14.0) @@ -103,5 +103,5 @@ PLATFORMS DEPENDENCIES rails (~> 4.2.1) - rake (~> 10.3.1) + rake (~> 10.4.2) rspec (~> 2.14.1) From 22bb8b29f03887bf7899c115a34d52147269e444 Mon Sep 17 00:00:00 2001 From: kares Date: Tue, 28 Apr 2015 12:00:10 +0200 Subject: [PATCH 06/76] allow for more `JRuby::Rack::ErrorApp` customizations + retrieve cause when needed --- src/main/ruby/jruby/rack/error_app.rb | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/src/main/ruby/jruby/rack/error_app.rb b/src/main/ruby/jruby/rack/error_app.rb index 8763a126..b528422b 100644 --- a/src/main/ruby/jruby/rack/error_app.rb +++ b/src/main/ruby/jruby/rack/error_app.rb @@ -22,6 +22,8 @@ class ErrorApp # org.jruby.rack.RackInitializationException ] + ALLOW_METHODS = 'HEAD, GET, POST, PUT, DELETE, OPTIONS' + attr_reader :root def initialize(root = nil) @@ -35,8 +37,7 @@ def initialize(root = nil) def call(env) if env['REQUEST_METHOD'] == 'OPTIONS' - allow_methods = 'HEAD, GET, POST, PUT, DELETE, OPTIONS' - return [ 200, {'Allow' => allow_methods, 'Content-Length' => '0'}, [] ] + return [ 200, {'Allow' => ALLOW_METHODS, 'Content-Length' => '0'}, [] ] end code = response_code(env) @@ -86,10 +87,9 @@ def serve(code, path, env) protected def map_error_code(exc) - cause = exc.respond_to?(:cause) ? exc.cause : nil if UNAVAILABLE_EXCEPTIONS.any? { |type| exc.kind_of?(type) } 503 # Service Unavailable - elsif cause.kind_of?(Java::JavaLang::InterruptedException) + elsif exc.respond_to?(:cause) && exc.cause.kind_of?(Java::JavaLang::InterruptedException) 503 # Service Unavailable else 500 @@ -107,6 +107,8 @@ def respond(status = nil, body = nil, headers = DEFAULT_HEADERS) class FileBody + CHUNK_SIZE = 8192 + attr_reader :path, :size alias to_path path @@ -116,7 +118,7 @@ def each File.open(@path, "rb") do |file| # file.seek(0) remaining = @size || (1.0 / 0) - chunk_size = 8192 + chunk_size = CHUNK_SIZE while remaining > 0 chunk_size = remaining if remaining < chunk_size break unless part = file.read(chunk_size) From e3691462bb3d3ac34e6c650265eeabf5f5cca040 Mon Sep 17 00:00:00 2001 From: kares Date: Tue, 28 Apr 2015 14:32:16 +0200 Subject: [PATCH 07/76] tune ErrorApp + ShowStatus (use-d by default) to respect set 'rack.showstatus.detail' --- src/main/ruby/jruby/rack/error_app.rb | 15 +++- .../ruby/jruby/rack/error_app/show_status.rb | 19 +++-- src/spec/ruby/jruby/rack/error_app_spec.rb | 73 +++++++++++++++++-- 3 files changed, 90 insertions(+), 17 deletions(-) diff --git a/src/main/ruby/jruby/rack/error_app.rb b/src/main/ruby/jruby/rack/error_app.rb index b528422b..de153455 100644 --- a/src/main/ruby/jruby/rack/error_app.rb +++ b/src/main/ruby/jruby/rack/error_app.rb @@ -11,7 +11,11 @@ class ErrorApp autoload :ShowStatus, 'jruby/rack/error_app/show_status' + # @private + InterruptedException = Java::JavaLang::InterruptedException + EXCEPTION = org.jruby.rack.RackEnvironment::EXCEPTION + DEFAULT_EXCEPTION_DETAIL = '' DEFAULT_RESPONSE_CODE = 500 DEFAULT_MIME = 'text/plain' @@ -57,7 +61,14 @@ def call(env) def response_code(env) if exc = env[EXCEPTION] - env['rack.showstatus.detail'] = exc.message rescue '' + unless env.key?(key = 'rack.showstatus.detail') + begin + env[key] = exc.message || DEFAULT_EXCEPTION_DETAIL + rescue => e + env[key] = DEFAULT_EXCEPTION_DETAIL + warn e.inspect + end + end map_error_code(exc) else nil @@ -89,7 +100,7 @@ def serve(code, path, env) def map_error_code(exc) if UNAVAILABLE_EXCEPTIONS.any? { |type| exc.kind_of?(type) } 503 # Service Unavailable - elsif exc.respond_to?(:cause) && exc.cause.kind_of?(Java::JavaLang::InterruptedException) + elsif exc.respond_to?(:cause) && exc.cause.kind_of?(InterruptedException) 503 # Service Unavailable else 500 diff --git a/src/main/ruby/jruby/rack/error_app/show_status.rb b/src/main/ruby/jruby/rack/error_app/show_status.rb index 8adf37a6..537947df 100644 --- a/src/main/ruby/jruby/rack/error_app/show_status.rb +++ b/src/main/ruby/jruby/rack/error_app/show_status.rb @@ -10,8 +10,7 @@ class ShowStatus def initialize(app) require 'rack/request'; require 'rack/utils' - @app = app - @template = ERB.new(TEMPLATE) + @app = app; @template = ERB.new(TEMPLATE, nil, '-') end def call(env) @@ -19,12 +18,13 @@ def call(env) headers = ::Rack::Utils::HeaderHash.new(headers) empty = headers['Content-Length'].to_i <= 0 + detail = env['rack.showstatus.detail'] # client or server error, or explicit message - if (status.to_i >= 400 && empty) || env["rack.showstatus.detail"] + if (status.to_i >= 400 && empty) || detail # required erb template variables (captured with binding) : - req = req = ::Rack::Request.new(env) + request = req = ::Rack::Request.new(env); request && req # avoid un-used warning message = ::Rack::Utils::HTTP_STATUS_CODES[status.to_i] || status.to_s - detail = detail = env["rack.showstatus.detail"] || message + detail = detail.nil? ? message : detail # false for no detail body = @template.result(binding) size = ::Rack::Utils.bytesize(body) @@ -55,7 +55,7 @@ def h(obj) - <%=h message %> at <%=h req.script_name + req.path_info %> + <%=h message %> at <%=h request.script_name + request.path_info %>