Permalink
Browse files

Added spring support for slightly faster development.

  • Loading branch information...
parndt committed Dec 6, 2014
1 parent 35ec37a commit b168b9e6ec6f286b8274a36d0d00f11ded694f16
Showing with 38 additions and 1 deletion.
  1. +1 −0 Gemfile
  2. +6 −0 bin/rails
  3. +6 −1 bin/rake
  4. +6 −0 bin/rspec
  5. +18 −0 bin/spring
  6. +1 −0 config/spring.rb
View
@@ -4,6 +4,7 @@ gemspec
gem 'refinerycms-i18n', git: 'https://github.com/refinery/refinerycms-i18n', branch: 'master'
gem 'quiet_assets'
gem 'spring'
# Add support for refinerycms-acts-as-indexed
gem 'refinerycms-acts-as-indexed', ['~> 2.0', '>= 2.0.0']
View
@@ -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__)
View
@@ -5,7 +5,12 @@
# The application 'rake' is installed as part of a gem, and
# this file is here to facilitate running it.
#
begin
if Dir.exist?(File.expand_path('../../spec/dummy', __FILE__))
load File.expand_path("../spring", __FILE__)
end
rescue LoadError
end
require 'pathname'
ENV['BUNDLE_GEMFILE'] ||= File.expand_path("../../Gemfile",
Pathname.new(__FILE__).realpath)
View
@@ -6,6 +6,12 @@
# this file is here to facilitate running it.
#
begin
if Dir.exist?(File.expand_path('../../spec/dummy', __FILE__))
load File.expand_path("../spring", __FILE__)
end
rescue LoadError
end
require 'pathname'
ENV['BUNDLE_GEMFILE'] ||= File.expand_path("../../Gemfile",
Pathname.new(__FILE__).realpath)
View
@@ -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
View
@@ -0,0 +1 @@
Spring.application_root = File.expand_path('../../spec/dummy', __FILE__) if defined?(Spring)

0 comments on commit b168b9e

Please sign in to comment.