forked from refinery/refinerycms
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added spring support for slightly faster development.
- Loading branch information
Showing
6 changed files
with
38 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,11 @@ | ||
#!/usr/bin/env ruby | ||
# This command will automatically be run when you run "rails" with Rails 3 gems installed from the root of your application. | ||
|
||
begin | ||
if Dir.exist?(File.expand_path('../../spec/dummy', __FILE__)) | ||
load File.expand_path("../spring", __FILE__) | ||
end | ||
rescue LoadError | ||
end | ||
ENGINE_PATH = File.expand_path('../..', __FILE__) | ||
load File.expand_path('../../spec/dummy/bin/rails', __FILE__) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
Spring.application_root = File.expand_path('../../spec/dummy', __FILE__) if defined?(Spring) |