add an error when bundling if bundler is older than version 1.5

Andrew Cantino %!s(int64=10) %!d(string=hace) años
padre
commit
6041746fb8
Se han modificado 1 ficheros con 7 adiciones y 1 borrados
  1. 7 1
      Gemfile

+ 7 - 1
Gemfile

@@ -1,6 +1,12 @@
1 1
 source 'https://rubygems.org'
2 2
 
3
-# bundler <1.5 does not recognize :x64_mingw as a valid platform name
3
+# Bundler <1.5 does not recognize :x64_mingw as a valid platform name.
4
+# Unfortunately, it can't self-update because it errors when encountering :x64_mingw.
5
+unless Gem::Version.new(Bundler::VERSION) >= Gem::Version.new('1.5.0')
6
+  STDERR.puts "Bundler >=1.5.0 is required.  Please upgrade bundler with 'gem install bundler'"
7
+  exit 1
8
+end
9
+
4 10
 gem 'bundler', '>= 1.5.0'
5 11
 
6 12
 gem 'protected_attributes', '~>1.0.7'