Merge pull request #503 from knu/respring

Readd Spring fixing a problem with a git-sourced gem.
This commit is contained in:
Andrew Cantino 2014-09-16 14:43:08 -07:00
commit 56e2afc38c
3 changed files with 12 additions and 5 deletions

View file

@ -108,8 +108,8 @@ group :development, :test do
gem 'delorean'
gem 'webmock', '~> 1.17.4', require: false
gem 'coveralls', require: false
# gem 'spring'
# gem 'spring-commands-rspec'
gem 'spring'
gem 'spring-commands-rspec'
end
group :production do

View file

@ -316,6 +316,9 @@ GEM
slop (3.6.0)
spectrum-rails (1.3.4)
railties (>= 3.1)
spring (1.1.3)
spring-commands-rspec (1.0.2)
spring (>= 0.9.1)
sprockets (2.11.0)
hike (~> 1.2)
multi_json (~> 1.0)
@ -446,6 +449,8 @@ DEPENDENCIES
shoulda-matchers
slack-notifier (~> 0.5.0)
spectrum-rails
spring
spring-commands-rspec
therubyracer (~> 0.12.1)
twilio-ruby (~> 3.11.5)
twitter (~> 5.8.0)

View file

@ -7,12 +7,14 @@ unless defined?(Spring)
require "rubygems"
require "bundler"
if match = Bundler.default_lockfile.read.match(/^GEM$.*?^ spring \((.*?)\)$.*?^$/m)
case lockfile = Bundler.default_lockfile.read
when /^GEM$.*?^ spring \((.*?)\)$.*?^$/m
version = $1
ENV["GEM_PATH"] = ([Bundler.bundle_path.to_s] + Gem.path).join(File::PATH_SEPARATOR)
ENV["GEM_HOME"] = ""
ENV["GEM_HOME"] = "" unless /^GIT$/ === lockfile
Gem.paths = ENV
gem "spring", match[1]
gem "spring", version
require "spring/binstub"
end
end