Skip to content

Commit

Permalink
Support rack 2.
Browse files Browse the repository at this point in the history
* Prepare test environment for both rack 1 and rack 2 on Travis.
  * Update .travis.yml.
    * Add "bundle list" in script section to check rack's version
      from Travis log page.
  * Update Gemfile for rack 2 test, and
    add gemfiles/Gemfile.rack-1 for rack 1 test.
    * Keep codeclimate-test-reporter version < 1.
      To supress deprecated warning temporary.
      Later update it to latest version.
    * Add gems to Gemfile for Thorfile.
    * Specify sinatra 2.0.0.rc2 version for rack 2 test.
  * Delete Gemfile.lock
* Fix test suite for Rack 2.x compatiblity.
  • Loading branch information
junaruga committed May 1, 2017
1 parent 78bd9f3 commit d308d79
Show file tree
Hide file tree
Showing 5 changed files with 33 additions and 55 deletions.
5 changes: 3 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
pkg
doc
coverage
Gemfile.lock
/Gemfile*.lock
VERSION
*.rbc
.bundle
*.swp
/.bundle
6 changes: 6 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,19 @@ language: ruby
sudo: false
before_install:
- which bundle || gem install bundler
script:
- bundle list
- bundle exec rake
rvm:
- 2.2.7
- 2.3.4
- 2.4.1
- ruby-head
- jruby-9.1.8.0
- jruby-head
gemfile:
- Gemfile
- Gemfile.rack-1.x
matrix:
allow_failures:
- rvm: ruby-head
Expand Down
15 changes: 11 additions & 4 deletions Gemfile
Original file line number Diff line number Diff line change
@@ -1,8 +1,15 @@
source 'https://rubygems.org'

gem 'rspec'
gem "rack"
gem "sinatra"
gemspec

# Development dependency
gem 'rake'
gem 'rspec'
# To use rack 2
gem 'sinatra', '~> 2.0.0.rc2'
# Keep version < 1 to supress deprecated warning temporary.
gem 'codeclimate-test-reporter', '< 1', :require => false

gem "codeclimate-test-reporter", group: :test, require: nil
# For Thorfile. Run "bundle exec thor help" to see the help.
gem 'thor'
gem 'git'
49 changes: 0 additions & 49 deletions Gemfile.lock

This file was deleted.

13 changes: 13 additions & 0 deletions Gemfile.rack-1.x
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
source 'https://rubygems.org'

gemspec

# Runtime dependency
gem 'rack', '< 2'

# Development dependency
gem 'rake'
gem 'rspec'
gem 'sinatra'
# Keep version < 1 to supress deprecated warning temporary.
gem 'codeclimate-test-reporter', '< 1', :require => false

0 comments on commit d308d79

Please sign in to comment.