Skip to content

Commit c4a3ee0

Browse files
junarugajonleighton
authored andcommitted
Update .travis.yml (#520)
* Update Rubies to latest version. * Add ruby-head as allow_failures. * It's good to know new version Ruby's issue as faster before the release. * fast_finish is to get the Travis result as faster without waiting the result of the "allow_failures" items. See https://blog.travis-ci.com/2013-11-27-fast-finishing-builds/ * Do hack for Ruby 1.9.3 and 2.0.0. Because the Rails 4.2 dependency's nokogiri latest version requires Ruby version >= 2.1.0.
1 parent d1ae630 commit c4a3ee0

File tree

2 files changed

+15
-4
lines changed

2 files changed

+15
-4
lines changed

.travis.yml

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,11 @@ sudo: false
44
rvm:
55
- 1.9.3 # when removed, get rid of the before_script hack and also the one in application_generator.rb
66
- 2.0.0
7-
- 2.1.9
8-
- 2.2.5
9-
- 2.3.1
7+
- 2.1.10
8+
- 2.2.7
9+
- 2.3.4
10+
- 2.4.1
11+
- ruby-head
1012
env:
1113
- RAILS_VERSION="~> 4.2.0"
1214
- RAILS_VERSION="~> 5.0.0"
@@ -16,8 +18,12 @@ matrix:
1618
env: RAILS_VERSION="~> 5.0.0"
1719
- rvm: 2.0.0
1820
env: RAILS_VERSION="~> 5.0.0"
19-
- rvm: 2.1.9
21+
- rvm: 2.1.10
2022
env: RAILS_VERSION="~> 5.0.0"
23+
allow_failures:
24+
- rvm: ruby-head
25+
fast_finish: true
2126
before_script:
2227
- "[ $TRAVIS_RUBY_VERSION = \"1.9.3\" ] && travis_retry gem install mime-types --version \"~> 2\" || true"
28+
- "[ $TRAVIS_RUBY_VERSION = \"1.9.3\" -o $TRAVIS_RUBY_VERSION = \"2.0.0\" ] && travis_retry gem install nokogiri --version \"~> 1.6.8\" || true"
2329
- travis_retry gem install rails --version "$RAILS_VERSION"

lib/spring/test/application_generator.rb

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -92,6 +92,11 @@ def install_spring
9292

9393
build_and_install_gems
9494

95+
# TO prevent nokogiri install error in application.bundle.
96+
if RUBY_VERSION < "2.1.0"
97+
append_to_file(application.gemfile, "gem 'nokogiri', '~> 1.6.8'")
98+
end
99+
95100
application.bundle
96101

97102
FileUtils.rm_rf application.path("bin")

0 commit comments

Comments
 (0)