mirror of
https://github.com/TracksApp/tracks.git
synced 2025-12-16 15:20:13 +01:00
Add Spring and spring-aware binstubs
Also remove /script, which is no longer used in Rails 4
This commit is contained in:
parent
782d94bdc9
commit
7d7e47deff
15 changed files with 59 additions and 25 deletions
7
bin/cucumber
Executable file
7
bin/cucumber
Executable file
|
|
@ -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('cucumber', 'cucumber')
|
||||
10
bin/rails
Executable file
10
bin/rails
Executable file
|
|
@ -0,0 +1,10 @@
|
|||
#!/usr/bin/env ruby
|
||||
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'
|
||||
7
bin/rake
Executable file
7
bin/rake
Executable file
|
|
@ -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')
|
||||
18
bin/spring
Executable file
18
bin/spring
Executable file
|
|
@ -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
|
||||
Loading…
Add table
Add a link
Reference in a new issue