Skip to content

Commit b653c57

Browse files
committed
Use spring gem as part of rails 4.1 upgrade.
1 parent 54bca48 commit b653c57

File tree

5 files changed

+26
-0
lines changed

5 files changed

+26
-0
lines changed

Gemfile

+1
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ group :development, :test do
2828
gem 'capybara'
2929
gem 'annotate', '>=2.5.0'
3030
gem 'rubocop'
31+
gem 'spring'
3132
end
3233
group :test do
3334
gem 'webmock' #for testing http requests to pvoutput.org

Gemfile.lock

+2
Original file line numberDiff line numberDiff line change
@@ -205,6 +205,7 @@ GEM
205205
tilt (>= 1.3.3, < 2.1)
206206
slop (3.4.7)
207207
spork (1.0.0rc4)
208+
spring (1.3.6)
208209
sprockets (2.12.3)
209210
hike (~> 1.2)
210211
multi_json (~> 1.0)
@@ -265,6 +266,7 @@ DEPENDENCIES
265266
sdoc
266267
slim
267268
spork-rails!
269+
spring
268270
turbolinks
269271
uglifier (>= 1.3.0)
270272
unicorn

bin/rails

+4
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,8 @@
11
#!/usr/bin/env ruby
2+
begin
3+
load File.expand_path("../spring", __FILE__)
4+
rescue LoadError
5+
end
26
APP_PATH = File.expand_path('../../config/application', __FILE__)
37
require_relative '../config/boot'
48
require 'rails/commands'

bin/rake

+4
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,8 @@
11
#!/usr/bin/env ruby
2+
begin
3+
load File.expand_path("../spring", __FILE__)
4+
rescue LoadError
5+
end
26
require_relative '../config/boot'
37
require 'rake'
48
Rake.application.run

bin/spring

+15
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
#!/usr/bin/env ruby
2+
3+
# This file loads spring without using Bundler, in order to be fast.
4+
# It gets overwritten when you run the `spring binstub` command.
5+
6+
unless defined?(Spring)
7+
require "rubygems"
8+
require "bundler"
9+
10+
if match = Bundler.default_lockfile.read.match(/^GEM$.*?^ (?: )*spring \((.*?)\)$.*?^$/m)
11+
Gem.paths = { "GEM_PATH" => [Bundler.bundle_path.to_s, *Gem.path].uniq }
12+
gem "spring", match[1]
13+
require "spring/binstub"
14+
end
15+
end

0 commit comments

Comments
 (0)