bin/irt in irt-1.2.7 vs bin/irt in irt-1.2.8

- old
+ new

@@ -94,19 +94,26 @@ File.open('Gemfile', 'a') do |f| f.puts %(\ngem "irt") end end end + rails_version = gemfile.match(/\bgem\b.+\brails\b.+3\.0\.\d/) ? '=3.0.*' : '>=3.1.*' 'rails c %s %s %s' elsif File.exists?('./script/console') + rails_version = '2.*' 'ruby script/console --irb="irt_rails2 %2$s" %1$s %3$s' end else 'irt_irb %s %s' end ENV['IRT_INTERACTIVE_EOF'] = options[:interactive_eof].inspect if options[:interactive_eof] files.each do |file| - ENV['IRT_COMMAND'] = sprintf cmd_format, options[:irb_options], file, options[:rails_env] + ENV['IRT_COMMAND'] = case rails_version + when '2.*', '=3.0.*' + sprintf cmd_format, options[:irb_options], file, options[:rails_env] + when '>=3.1.*' + sprintf cmd_format, options[:rails_env], options[:irb_options], file + end exit(1) unless system ENV['IRT_COMMAND'] end