Skip to content

Commit

Permalink
Update tests & CI configuration
Browse files Browse the repository at this point in the history
  • Loading branch information
nsarno committed Sep 21, 2016
1 parent f1dd201 commit ac38845
Show file tree
Hide file tree
Showing 11 changed files with 350 additions and 8 deletions.
10 changes: 7 additions & 3 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,12 @@
language: ruby
rvm:
- 2.1.0
- 2.1.7
- 2.3.0
- 2.3.1
- 2.2.5
gemfile:
- gemfiles/rails_4.gemfile
- gemfiles/rails_5.gemfile
after_install:
- bundle exec rake db:test:prepare
addons:
code_climate:
repo_token: 61c3ea804322306871a6b7e06a0a6435672cd29aea0c2b286e6b837234ba9d90
Expand Down
8 changes: 8 additions & 0 deletions Appraisals
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
appraise "rails-4" do
gem "rack", "< 2"
gem "rails", "~> 4.2.6"
end

appraise "rails-5" do
gem "rails", "~> 5.0.0"
end
6 changes: 6 additions & 0 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -15,3 +15,9 @@ gemspec

gem "codeclimate-test-reporter", group: :test, require: nil
gem "simplecov", require: false, group: :test

group :development do
gem "bundler"
gem "rake"
gem "appraisal"
end
2 changes: 2 additions & 0 deletions Rakefile
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
require "rubygems"

begin
require 'bundler/setup'
rescue LoadError
Expand Down
16 changes: 16 additions & 0 deletions gemfiles/rails_4.gemfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
# This file was generated by Appraisal

source "https://rubygems.org"

gem "codeclimate-test-reporter", :group => :test, :require => nil
gem "simplecov", :require => false, :group => :test
gem "rack", "< 2"
gem "rails", "~> 4.2.6"

group :development do
gem "bundler"
gem "rake"
gem "appraisal"
end

gemspec :path => "../"
140 changes: 140 additions & 0 deletions gemfiles/rails_4.gemfile.lock
Original file line number Diff line number Diff line change
@@ -0,0 +1,140 @@
PATH
remote: ../
specs:
knock (1.5)
bcrypt (~> 3.1)
jwt (~> 1.5)
rails (>= 4.2)

GEM
remote: https://rubygems.org/
specs:
actionmailer (4.2.6)
actionpack (= 4.2.6)
actionview (= 4.2.6)
activejob (= 4.2.6)
mail (~> 2.5, >= 2.5.4)
rails-dom-testing (~> 1.0, >= 1.0.5)
actionpack (4.2.6)
actionview (= 4.2.6)
activesupport (= 4.2.6)
rack (~> 1.6)
rack-test (~> 0.6.2)
rails-dom-testing (~> 1.0, >= 1.0.5)
rails-html-sanitizer (~> 1.0, >= 1.0.2)
actionview (4.2.6)
activesupport (= 4.2.6)
builder (~> 3.1)
erubis (~> 2.7.0)
rails-dom-testing (~> 1.0, >= 1.0.5)
rails-html-sanitizer (~> 1.0, >= 1.0.2)
activejob (4.2.6)
activesupport (= 4.2.6)
globalid (>= 0.3.0)
activemodel (4.2.6)
activesupport (= 4.2.6)
builder (~> 3.1)
activerecord (4.2.6)
activemodel (= 4.2.6)
activesupport (= 4.2.6)
arel (~> 6.0)
activesupport (4.2.6)
i18n (~> 0.7)
json (~> 1.7, >= 1.7.7)
minitest (~> 5.1)
thread_safe (~> 0.3, >= 0.3.4)
tzinfo (~> 1.1)
appraisal (2.1.0)
bundler
rake
thor (>= 0.14.0)
arel (6.0.3)
bcrypt (3.1.11)
builder (3.2.2)
codeclimate-test-reporter (0.6.0)
simplecov (>= 0.7.1, < 1.0.0)
concurrent-ruby (1.0.2)
docile (1.1.5)
erubis (2.7.0)
globalid (0.3.7)
activesupport (>= 4.1.0)
i18n (0.7.0)
json (1.8.3)
jwt (1.5.6)
loofah (2.0.3)
nokogiri (>= 1.5.9)
mail (2.6.4)
mime-types (>= 1.16, < 4)
mime-types (3.1)
mime-types-data (~> 3.2015)
mime-types-data (3.2016.0521)
mini_portile2 (2.1.0)
minitest (5.9.0)
nokogiri (1.6.8)
mini_portile2 (~> 2.1.0)
pkg-config (~> 1.1.7)
pkg-config (1.1.7)
rack (1.6.4)
rack-test (0.6.3)
rack (>= 1.0)
rails (4.2.6)
actionmailer (= 4.2.6)
actionpack (= 4.2.6)
actionview (= 4.2.6)
activejob (= 4.2.6)
activemodel (= 4.2.6)
activerecord (= 4.2.6)
activesupport (= 4.2.6)
bundler (>= 1.3.0, < 2.0)
railties (= 4.2.6)
sprockets-rails
rails-deprecated_sanitizer (1.0.3)
activesupport (>= 4.2.0.alpha)
rails-dom-testing (1.0.7)
activesupport (>= 4.2.0.beta, < 5.0)
nokogiri (~> 1.6.0)
rails-deprecated_sanitizer (>= 1.0.1)
rails-html-sanitizer (1.0.3)
loofah (~> 2.0)
railties (4.2.6)
actionpack (= 4.2.6)
activesupport (= 4.2.6)
rake (>= 0.8.7)
thor (>= 0.18.1, < 2.0)
rake (11.3.0)
simplecov (0.12.0)
docile (~> 1.1.0)
json (>= 1.8, < 3)
simplecov-html (~> 0.10.0)
simplecov-html (0.10.0)
sprockets (3.7.0)
concurrent-ruby (~> 1.0)
rack (> 1, < 3)
sprockets-rails (3.2.0)
actionpack (>= 4.0)
activesupport (>= 4.0)
sprockets (>= 3.0.0)
sqlite3 (1.3.11)
thor (0.19.1)
thread_safe (0.3.5)
timecop (0.8.1)
tzinfo (1.2.2)
thread_safe (~> 0.1)

PLATFORMS
ruby

DEPENDENCIES
appraisal
bundler
codeclimate-test-reporter
knock!
rack (< 2)
rails (~> 4.2.6)
rake
simplecov
sqlite3 (~> 1.3)
timecop (~> 0.8.0)

BUNDLED WITH
1.12.5
15 changes: 15 additions & 0 deletions gemfiles/rails_5.gemfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
# This file was generated by Appraisal

source "https://rubygems.org"

gem "codeclimate-test-reporter", :group => :test, :require => nil
gem "simplecov", :require => false, :group => :test
gem "rails", "~> 5.0.0"

group :development do
gem "bundler"
gem "rake"
gem "appraisal"
end

gemspec :path => "../"
145 changes: 145 additions & 0 deletions gemfiles/rails_5.gemfile.lock
Original file line number Diff line number Diff line change
@@ -0,0 +1,145 @@
PATH
remote: ../
specs:
knock (1.5)
bcrypt (~> 3.1)
jwt (~> 1.5)
rails (>= 4.2)

GEM
remote: https://rubygems.org/
specs:
actioncable (5.0.0.1)
actionpack (= 5.0.0.1)
nio4r (~> 1.2)
websocket-driver (~> 0.6.1)
actionmailer (5.0.0.1)
actionpack (= 5.0.0.1)
actionview (= 5.0.0.1)
activejob (= 5.0.0.1)
mail (~> 2.5, >= 2.5.4)
rails-dom-testing (~> 2.0)
actionpack (5.0.0.1)
actionview (= 5.0.0.1)
activesupport (= 5.0.0.1)
rack (~> 2.0)
rack-test (~> 0.6.3)
rails-dom-testing (~> 2.0)
rails-html-sanitizer (~> 1.0, >= 1.0.2)
actionview (5.0.0.1)
activesupport (= 5.0.0.1)
builder (~> 3.1)
erubis (~> 2.7.0)
rails-dom-testing (~> 2.0)
rails-html-sanitizer (~> 1.0, >= 1.0.2)
activejob (5.0.0.1)
activesupport (= 5.0.0.1)
globalid (>= 0.3.6)
activemodel (5.0.0.1)
activesupport (= 5.0.0.1)
activerecord (5.0.0.1)
activemodel (= 5.0.0.1)
activesupport (= 5.0.0.1)
arel (~> 7.0)
activesupport (5.0.0.1)
concurrent-ruby (~> 1.0, >= 1.0.2)
i18n (~> 0.7)
minitest (~> 5.1)
tzinfo (~> 1.1)
appraisal (2.1.0)
bundler
rake
thor (>= 0.14.0)
arel (7.1.2)
bcrypt (3.1.11)
builder (3.2.2)
codeclimate-test-reporter (0.6.0)
simplecov (>= 0.7.1, < 1.0.0)
concurrent-ruby (1.0.2)
docile (1.1.5)
erubis (2.7.0)
globalid (0.3.7)
activesupport (>= 4.1.0)
i18n (0.7.0)
json (2.0.2)
jwt (1.5.6)
loofah (2.0.3)
nokogiri (>= 1.5.9)
mail (2.6.4)
mime-types (>= 1.16, < 4)
method_source (0.8.2)
mime-types (3.1)
mime-types-data (~> 3.2015)
mime-types-data (3.2016.0521)
mini_portile2 (2.1.0)
minitest (5.9.0)
nio4r (1.2.1)
nokogiri (1.6.8)
mini_portile2 (~> 2.1.0)
pkg-config (~> 1.1.7)
pkg-config (1.1.7)
rack (2.0.1)
rack-test (0.6.3)
rack (>= 1.0)
rails (5.0.0.1)
actioncable (= 5.0.0.1)
actionmailer (= 5.0.0.1)
actionpack (= 5.0.0.1)
actionview (= 5.0.0.1)
activejob (= 5.0.0.1)
activemodel (= 5.0.0.1)
activerecord (= 5.0.0.1)
activesupport (= 5.0.0.1)
bundler (>= 1.3.0, < 2.0)
railties (= 5.0.0.1)
sprockets-rails (>= 2.0.0)
rails-dom-testing (2.0.1)
activesupport (>= 4.2.0, < 6.0)
nokogiri (~> 1.6.0)
rails-html-sanitizer (1.0.3)
loofah (~> 2.0)
railties (5.0.0.1)
actionpack (= 5.0.0.1)
activesupport (= 5.0.0.1)
method_source
rake (>= 0.8.7)
thor (>= 0.18.1, < 2.0)
rake (11.3.0)
simplecov (0.12.0)
docile (~> 1.1.0)
json (>= 1.8, < 3)
simplecov-html (~> 0.10.0)
simplecov-html (0.10.0)
sprockets (3.7.0)
concurrent-ruby (~> 1.0)
rack (> 1, < 3)
sprockets-rails (3.2.0)
actionpack (>= 4.0)
activesupport (>= 4.0)
sprockets (>= 3.0.0)
sqlite3 (1.3.11)
thor (0.19.1)
thread_safe (0.3.5)
timecop (0.8.1)
tzinfo (1.2.2)
thread_safe (~> 0.1)
websocket-driver (0.6.4)
websocket-extensions (>= 0.1.0)
websocket-extensions (0.1.2)

PLATFORMS
ruby

DEPENDENCIES
appraisal
bundler
codeclimate-test-reporter
knock!
rails (~> 5.0.0)
rake
simplecov
sqlite3 (~> 1.3)
timecop (~> 0.8.0)

BUNDLED WITH
1.12.5
6 changes: 4 additions & 2 deletions test/dummy/config/application.rb
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,10 @@ class Application < Rails::Application
# config.i18n.load_path += Dir[Rails.root.join('my', 'locales', '*.{rb,yml}').to_s]
# config.i18n.default_locale = :de

# Do not swallow errors in after_commit/after_rollback callbacks.
config.active_record.raise_in_transactional_callbacks = true
unless Gem.loaded_specs["rails"].version.to_s =~ /^5/
# Do not swallow errors in after_commit/after_rollback callbacks.
config.active_record.raise_in_transactional_callbacks = true
end
end
end

9 changes: 7 additions & 2 deletions test/dummy/config/environments/test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,13 @@
config.eager_load = false

# Configure static file server for tests with Cache-Control for performance.
config.serve_static_files = true
config.static_cache_control = 'public, max-age=3600'
if Gem.loaded_specs["rails"].version.to_s.to_i >= 5
config.public_file_server.enabled = true
config.public_file_server.headers = { 'Cache-Control' => 'public, max-age=3600' }
else
config.serve_static_files = true
config.static_cache_control = 'public, max-age=3600'
end

# Show full error reports and disable caching.
config.consider_all_requests_local = true
Expand Down
1 change: 0 additions & 1 deletion test/dummy/db/schema.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
# encoding: UTF-8
# This file is auto-generated from the current state of the database. Instead
# of editing this file, please use the migrations feature of Active Record to
# incrementally modify your database, and then regenerate this schema definition.
Expand Down

0 comments on commit ac38845

Please sign in to comment.