File tree 5 files changed +32
-7
lines changed
spec/dummy/config/initializers
5 files changed +32
-7
lines changed Original file line number Diff line number Diff line change 6
6
global :
7
7
- CC_TEST_REPORTER_ID=98c9b3070ea9ac0e8f7afb6570f181506c3a06372b1db5c7deb8e46089fdf132
8
8
- GIT_COMMITTED_AT=$(if [ "$TRAVIS_PULL_REQUEST" == "false" ]; then git log -1 --pretty=format:%ct; else git log -1 --skip 1 --pretty=format:%ct; fi)
9
+ matrix :
10
+ - " RAILS_VERSION=5.0.7.1"
11
+ - " RAILS_VERSION=5.1.6.1"
12
+ - " RAILS_VERSION=5.2.2"
13
+ - " RAILS_VERSION=master"
9
14
rvm :
10
- - 2.2.2
11
- - 2.3.3
15
+ - 2.2.9
16
+ - 2.3.8
17
+ - 2.6.1
12
18
- ruby-head
13
19
matrix :
14
20
allow_failures :
15
21
- rvm : ruby-head
22
+ - env : " RAILS_VERSION=master"
16
23
before_script :
17
24
- curl -L https://codeclimate.com/downloads/test-reporter/test-reporter-latest-linux-amd64 > ./cc-test-reporter
18
25
- chmod +x ./cc-test-reporter
19
26
- ./cc-test-reporter before-build
20
27
after_script :
21
- # Preferably you will run test-reporter on branch update events. But
22
- # if you setup travis to build PR updates only, you don't need to run
28
+ # Preferably you will run test-reporter on branch update events. But
29
+ # if you setup travis to build PR updates only, you don't need to run
23
30
# the line below
24
31
- if [ "$TRAVIS_PULL_REQUEST" == "false" ]; then ./cc-test-reporter after-build --exit-code $TRAVIS_TEST_RESULT; fi
25
- # In the case where travis is setup to build PR updates only,
32
+ # In the case where travis is setup to build PR updates only,
26
33
# uncomment the line below
27
34
# - ./cc-test-reporter after-build --exit-code $TRAVIS_TEST_RESULT
Original file line number Diff line number Diff line change 1
1
source 'https://rubygems.org'
2
2
3
+ rails_version = ENV [ 'RAILS_VERSION' ] || "default"
4
+ rails =
5
+ case rails_version
6
+ when 'master'
7
+ { github : 'rails/rails' }
8
+ when 'default'
9
+ '>= 5.0'
10
+ else
11
+ "~> #{ ENV [ 'RAILS_VERSION' ] } "
12
+ end
13
+
14
+ gem 'rails' , rails
15
+
3
16
gemspec
Original file line number Diff line number Diff line change @@ -18,7 +18,7 @@ Gem::Specification.new do |spec|
18
18
spec . add_dependency 'jsonapi-parser' , '~> 0.1.0'
19
19
20
20
spec . add_development_dependency 'rails' , '~> 5.0'
21
- spec . add_development_dependency 'sqlite3'
21
+ spec . add_development_dependency 'sqlite3' , '~> 1.3.6'
22
22
spec . add_development_dependency 'rake' , '~> 11.3'
23
23
spec . add_development_dependency 'rspec-rails' , '~> 3.5'
24
24
spec . add_development_dependency 'with_model' , '~> 2.0'
Original file line number Diff line number Diff line change 18
18
Rails . application . config . active_record . belongs_to_required_by_default = true
19
19
20
20
# Do not halt callback chains when a callback returns false. Previous versions had true.
21
- ActiveSupport . halt_callback_chains_on_return_false = false
21
+ if Rails . version < '5.2'
22
+ ActiveSupport . halt_callback_chains_on_return_false = false
23
+ end
22
24
23
25
# Configure SSL options to enable HSTS with subdomains. Previous versions had false.
24
26
Rails . application . config . ssl_options = { hsts : { subdomains : true } }
Original file line number Diff line number Diff line change
1
+ if Rails . version >= '5.1.0' && Rails . application . config . active_record . sqlite3 . present?
2
+ Rails . application . config . active_record . sqlite3 . represent_boolean_as_integer = true
3
+ end
You can’t perform that action at this time.
0 commit comments