Add Spring binstubs for RSpec

This commit is contained in:
Josep Jaume Rey Peroy
2015-12-07 09:30:49 +01:00
parent 33cbc88ee8
commit 9914e4f331
4 changed files with 16 additions and 7 deletions

View File

@@ -64,6 +64,7 @@ group :development, :test do
gem 'web-console', '~> 2.0'
# Spring speeds up development by keeping your application running in the background. Read more: https://github.com/rails/spring
gem 'spring'
gem 'spring-commands-rspec'
gem 'rspec-rails', '~> 3.3'
gem 'capybara'
gem 'factory_girl_rails'

View File

@@ -368,8 +368,10 @@ GEM
simplecov-html (~> 0.10.0)
simplecov-html (0.10.0)
spring (1.4.4)
sprockets (3.4.1)
spring-commands-rspec (1.0.4)
rack (> 1, < 3)
spring (>= 0.9.1)
sprockets (3.4.1)
sprockets-rails (2.3.3)
actionpack (>= 3.0)
activesupport (>= 3.0)
@@ -485,6 +487,7 @@ DEPENDENCIES
simple_captcha2
social-share-button!
spring
spring-commands-rspec
turbolinks
turnout
uglifier (>= 1.3.0)

View File

@@ -1,4 +1,9 @@
#!/usr/bin/env ruby
begin
load File.expand_path('../spring', __FILE__)
rescue LoadError => e
raise unless e.message.include?('spring')
end
#
# This file was generated by Bundler.
#

View File

@@ -4,12 +4,12 @@
# It gets overwritten when you run the `spring binstub` command.
unless defined?(Spring)
require "rubygems"
require "bundler"
require 'rubygems'
require 'bundler'
if match = Bundler.default_lockfile.read.match(/^GEM$.*?^ (?: )*spring \((.*?)\)$.*?^$/m)
Gem.paths = { "GEM_PATH" => [Bundler.bundle_path.to_s, *Gem.path].uniq }
gem "spring", match[1]
require "spring/binstub"
if (match = Bundler.default_lockfile.read.match(/^GEM$.*?^ (?: )*spring \((.*?)\)$.*?^$/m))
Gem.paths = { 'GEM_PATH' => [Bundler.bundle_path.to_s, *Gem.path].uniq }
gem 'spring', match[1]
require 'spring/binstub'
end
end