diff --git a/.travis.yml b/.travis.yml index 7e1ad9514..fce0b091b 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,20 +1,31 @@ -before_install: sudo apt-get install lighttpd libfcgi-dev libmemcache-dev memcached -install: +before_install: + - sudo apt-get update >/dev/null + - sudo apt-get install lighttpd libfcgi-dev libmemcache-dev memcached - gem env version | grep '^\(2\|1.\(8\|9\|[0-9][0-9]\)\)' || gem update --system - - bundle install --jobs=3 --retry=3 + - gem update bundler + script: bundle exec rake ci + rvm: - 1.8.7 - 1.9.2 - 1.9.3 - 2.0.0 - 2.1 - - 2.2 + - 2.2.4 + - 2.3.0 - ruby-head - rbx-2 - jruby + - jruby-9.0.4.0 - jruby-head - ree + notifications: email: false irc: "irc.freenode.org#rack" + +matrix: + allow_failures: + - rvm: rbx-2 + - rvm: jruby-head diff --git a/Gemfile b/Gemfile index d764d4029..a15d8702e 100644 --- a/Gemfile +++ b/Gemfile @@ -2,6 +2,10 @@ source 'https://rubygems.org' gemspec +# Rake 11+ is Ruby 1.9+ only. Stick with 10.x to avoid awkward Bundler +# platform and RUBY_VERSION gymnastics, or separate Gemfiles. +gem "rake", "< 11.0" + # What we need to do here is just *exclude* JRuby, but bundler has no way to do # this, because of some argument that I know I had with Yehuda and Carl years # ago, but I've since forgotten. Anyway, we actually need it here, and it's not diff --git a/test/spec_response.rb b/test/spec_response.rb index 4a5ad9b59..5efdefdf1 100644 --- a/test/spec_response.rb +++ b/test/spec_response.rb @@ -100,13 +100,13 @@ it "can set SameSite cookies with symbol value :lax" do response = Rack::Response.new response.set_cookie "foo", {:value => "bar", :same_site => :lax} - response["Set-Cookie"].must_equal "foo=bar; SameSite=Lax" + response["Set-Cookie"].should.equal "foo=bar; SameSite=Lax" end it "can set SameSite cookies with symbol value :Lax" do response = Rack::Response.new response.set_cookie "foo", {:value => "bar", :same_site => :lax} - response["Set-Cookie"].must_equal "foo=bar; SameSite=Lax" + response["Set-Cookie"].should.equal "foo=bar; SameSite=Lax" end it "can set SameSite cookies with string value 'Lax'" do @@ -118,33 +118,33 @@ it "can set SameSite cookies with boolean value true" do response = Rack::Response.new response.set_cookie "foo", {:value => "bar", :same_site => true} - response["Set-Cookie"].must_equal "foo=bar; SameSite=Strict" + response["Set-Cookie"].should.equal "foo=bar; SameSite=Strict" end it "can set SameSite cookies with symbol value :strict" do response = Rack::Response.new response.set_cookie "foo", {:value => "bar", :same_site => :strict} - response["Set-Cookie"].must_equal "foo=bar; SameSite=Strict" + response["Set-Cookie"].should.equal "foo=bar; SameSite=Strict" end it "can set SameSite cookies with symbol value :Strict" do response = Rack::Response.new response.set_cookie "foo", {:value => "bar", :same_site => :Strict} - response["Set-Cookie"].must_equal "foo=bar; SameSite=Strict" + response["Set-Cookie"].should.equal "foo=bar; SameSite=Strict" end it "can set SameSite cookies with string value 'Strict'" do response = Rack::Response.new response.set_cookie "foo", {:value => "bar", :same_site => "Strict"} - response["Set-Cookie"].must_equal "foo=bar; SameSite=Strict" + response["Set-Cookie"].should.equal "foo=bar; SameSite=Strict" end it "validates the SameSite option value" do response = Rack::Response.new lambda { response.set_cookie "foo", {:value => "bar", :same_site => "Foo"} - }.must_raise(ArgumentError). - message.must_match(/Invalid SameSite value: "Foo"/) + }.should.raise(ArgumentError). + message.should.match(/Invalid SameSite value: "Foo"/) end it "can set SameSite cookies with symbol value" do