Skip to content

Commit a98bb92

Browse files
committed
Fix problem with mime-types gem version
The latest version is not compatible with Ruby 1.9.3
1 parent ce85298 commit a98bb92

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

.travis.yml

+2-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ language: ruby
22
cache: bundler
33
sudo: false
44
rvm:
5-
- 1.9.3
5+
- 1.9.3 # when removed, get rid of the before_script hack and also the one in application_generator.rb
66
- 2.0.0
77
- 2.1.5
88
- 2.2.0
@@ -12,4 +12,5 @@ env:
1212
- RAILS_VERSION="~> 4.1.0"
1313
- RAILS_VERSION="~> 4.2.0"
1414
before_script:
15+
- "[ $TRAVIS_RUBY_VERSION = \"1.9.3\" ] && travis_retry gem install mime-types --version \"~> 2\" || true"
1516
- travis_retry gem install rails --version "$RAILS_VERSION"

lib/spring/test/application_generator.rb

+4
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,10 @@ def generate_files
5858
append_to_file(application.gemfile, "gem 'spring-commands-testunit'")
5959
end
6060

61+
if RUBY_VERSION == "1.9.3"
62+
append_to_file(application.gemfile, "gem 'mime-types', '~> 2'")
63+
end
64+
6165
rewrite_file(application.gemfile) do |c|
6266
c.sub!("https://rubygems.org", "http://rubygems.org")
6367
c.gsub!(/(gem '(byebug|web-console|sdoc|jbuilder)')/, "# \\1")

0 commit comments

Comments
 (0)