diff options
Diffstat (limited to 'bin')
| -rwxr-xr-x | bin/rails | 10 | ||||
| -rwxr-xr-x | bin/rake | 7 | ||||
| -rwxr-xr-x | bin/spring | 18 | 
3 files changed, 35 insertions, 0 deletions
| diff --git a/bin/rails b/bin/rails new file mode 100755 index 000000000..9587c07f0 --- /dev/null +++ b/bin/rails @@ -0,0 +1,10 @@ +#!/usr/bin/env jruby +begin +  load File.expand_path("../spring", __FILE__) +rescue LoadError +end +# This command will automatically be run when you run "rails" with Rails 3 gems installed from the root of your application. + +APP_PATH = File.expand_path('../../config/application',  __FILE__) +require File.expand_path('../../config/boot',  __FILE__) +require 'rails/commands' diff --git a/bin/rake b/bin/rake new file mode 100755 index 000000000..0fb4e07e1 --- /dev/null +++ b/bin/rake @@ -0,0 +1,7 @@ +#!/usr/bin/env ruby +begin +  load File.expand_path("../spring", __FILE__) +rescue LoadError +end +require 'bundler/setup' +load Gem.bin_path('rake', 'rake') diff --git a/bin/spring b/bin/spring new file mode 100755 index 000000000..7f24d96fb --- /dev/null +++ b/bin/spring @@ -0,0 +1,18 @@ +#!/usr/bin/env ruby + +# This file loads spring without using Bundler, in order to be fast +# It gets overwritten when you run the `spring binstub` command + +unless defined?(Spring) +  require "rubygems" +  require "bundler" + +  if match = Bundler.default_lockfile.read.match(/^GEM$.*?^    (?:  )*spring \((.*?)\)$.*?^$/m) +    ENV["GEM_PATH"] = ([Bundler.bundle_path.to_s] + Gem.path).join(File::PATH_SEPARATOR) +    ENV["GEM_HOME"] = "" +    Gem.paths = ENV + +    gem "spring", match[1] +    require "spring/binstub" +  end +end | 
