Use spring gem to speed up dev testing
This commit is contained in:
parent
3ca6055f47
commit
a74eb11e32
3
Gemfile
3
Gemfile
@ -10,7 +10,8 @@ gem 'jquery-rails'
|
||||
gem 'turbolinks'
|
||||
gem 'jbuilder' #, '~> 2.0'
|
||||
gem 'sdoc', group: :doc #, '~> 0.4.0'
|
||||
# gem 'spring', group: :development
|
||||
gem 'spring', group: :development
|
||||
gem 'spring-commands-rspec', group: :development
|
||||
gem 'devise'
|
||||
gem 'devise_invitable'
|
||||
gem 'haml-rails'
|
||||
|
||||
@ -379,6 +379,9 @@ GEM
|
||||
simplecov_json_formatter (~> 0.1)
|
||||
simplecov-html (0.12.3)
|
||||
simplecov_json_formatter (0.1.3)
|
||||
spring (3.0.0)
|
||||
spring-commands-rspec (1.0.4)
|
||||
spring (>= 0.9.1)
|
||||
sprockets (3.7.2)
|
||||
concurrent-ruby (~> 1.0)
|
||||
rack (> 1, < 3)
|
||||
@ -472,6 +475,8 @@ DEPENDENCIES
|
||||
selenium-webdriver
|
||||
simple_form
|
||||
simplecov
|
||||
spring
|
||||
spring-commands-rspec
|
||||
sprockets (~> 3.7)
|
||||
turbolinks
|
||||
uglifier
|
||||
|
||||
@ -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
|
||||
if ENV['RAILS_ENV'] == 'development'
|
||||
ENV['PORT'] = '9012'
|
||||
end
|
||||
|
||||
5
bin/rake
5
bin/rake
@ -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
|
||||
require_relative '../config/boot'
|
||||
require 'rake'
|
||||
Rake.application.run
|
||||
|
||||
@ -5,6 +5,11 @@
|
||||
# The application 'rspec' is installed as part of a gem, and
|
||||
# this file is here to facilitate running it.
|
||||
#
|
||||
begin
|
||||
load File.expand_path('../spring', __FILE__)
|
||||
rescue LoadError => e
|
||||
raise unless e.message.include?('spring')
|
||||
end
|
||||
|
||||
require 'pathname'
|
||||
ENV['BUNDLE_GEMFILE'] ||= File.expand_path("../../Gemfile",
|
||||
|
||||
25
bin/spring
25
bin/spring
@ -1,16 +1,17 @@
|
||||
#!/usr/bin/env ruby
|
||||
#
|
||||
# This file was generated by Bundler.
|
||||
#
|
||||
# The application 'spring' is installed as part of a gem, and
|
||||
# this file is here to facilitate running it.
|
||||
#
|
||||
|
||||
require 'pathname'
|
||||
ENV['BUNDLE_GEMFILE'] ||= File.expand_path("../../Gemfile",
|
||||
Pathname.new(__FILE__).realpath)
|
||||
# This file loads Spring without using Bundler, in order to be fast.
|
||||
# It gets overwritten when you run the `spring binstub` command.
|
||||
|
||||
require 'rubygems'
|
||||
require 'bundler/setup'
|
||||
unless defined?(Spring)
|
||||
require 'rubygems'
|
||||
require 'bundler'
|
||||
|
||||
load Gem.bin_path('spring', 'spring')
|
||||
lockfile = Bundler::LockfileParser.new(Bundler.default_lockfile.read)
|
||||
spring = lockfile.specs.detect { |spec| spec.name == 'spring' }
|
||||
if spring
|
||||
Gem.use_paths Gem.dir, Bundler.bundle_path.to_s, *Gem.path
|
||||
gem 'spring', spring.version
|
||||
require 'spring/binstub'
|
||||
end
|
||||
end
|
||||
|
||||
@ -5,7 +5,7 @@ Rails.application.configure do
|
||||
# test suite. You never need to work with it otherwise. Remember that
|
||||
# your test database is "scratch space" for the test suite and is wiped
|
||||
# and recreated between test runs. Don't rely on the data there!
|
||||
config.cache_classes = true
|
||||
config.cache_classes = false
|
||||
|
||||
# Do not eager load code on boot. This avoids loading your whole application
|
||||
# just for the purpose of running a single test. If you are using a tool that
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user