mirror of
https://github.com/Fishwaldo/huginn.git
synced 2025-03-15 19:31:26 +00:00
Fix running specs with guard and spring
Updated spring to allow running the specs with guard and spring again.
This commit is contained in:
parent
509528fd19
commit
36ece6cd3b
4 changed files with 35 additions and 34 deletions
8
Gemfile
8
Gemfile
|
@ -131,9 +131,9 @@ gem 'uglifier', '~> 2.7.2'
|
||||||
group :development do
|
group :development do
|
||||||
gem 'better_errors', '~> 1.1'
|
gem 'better_errors', '~> 1.1'
|
||||||
gem 'binding_of_caller'
|
gem 'binding_of_caller'
|
||||||
gem 'guard', '~> 2.13.0'
|
gem 'guard', '~> 2.14.1'
|
||||||
gem 'guard-livereload', '~> 2.5.1'
|
gem 'guard-livereload', '~> 2.5.1'
|
||||||
gem 'guard-rspec', '~> 4.6.4'
|
gem 'guard-rspec', '~> 4.7.3'
|
||||||
gem 'rack-livereload', '~> 0.3.16'
|
gem 'rack-livereload', '~> 0.3.16'
|
||||||
gem 'letter_opener_web', '~> 1.3.1'
|
gem 'letter_opener_web', '~> 1.3.1'
|
||||||
gem 'web-console', '>= 3.3.0'
|
gem 'web-console', '>= 3.3.0'
|
||||||
|
@ -144,8 +144,8 @@ group :development do
|
||||||
|
|
||||||
if_true(ENV['SPRING']) do
|
if_true(ENV['SPRING']) do
|
||||||
gem 'spring-commands-rspec', '~> 1.0.4'
|
gem 'spring-commands-rspec', '~> 1.0.4'
|
||||||
gem 'spring', '~> 1.7.2'
|
gem 'spring', '~> 2.0.2'
|
||||||
gem 'spring-watcher-listen', '~> 2.0.0'
|
gem 'spring-watcher-listen', '~> 2.0.1'
|
||||||
end
|
end
|
||||||
|
|
||||||
group :test do
|
group :test do
|
||||||
|
|
51
Gemfile.lock
51
Gemfile.lock
|
@ -174,7 +174,7 @@ GEM
|
||||||
rspec
|
rspec
|
||||||
chronic (0.10.2)
|
chronic (0.10.2)
|
||||||
cliver (0.3.2)
|
cliver (0.3.2)
|
||||||
coderay (1.1.0)
|
coderay (1.1.2)
|
||||||
coffee-rails (4.2.1)
|
coffee-rails (4.2.1)
|
||||||
coffee-script (>= 2.2.0)
|
coffee-script (>= 2.2.0)
|
||||||
railties (>= 4.0.0, < 5.2.x)
|
railties (>= 4.0.0, < 5.2.x)
|
||||||
|
@ -244,7 +244,7 @@ GEM
|
||||||
faraday_middleware (>= 0.9)
|
faraday_middleware (>= 0.9)
|
||||||
loofah (>= 2.0)
|
loofah (>= 2.0)
|
||||||
sax-machine (>= 1.0)
|
sax-machine (>= 1.0)
|
||||||
ffi (1.9.10)
|
ffi (1.9.18)
|
||||||
font-awesome-sass (4.7.0)
|
font-awesome-sass (4.7.0)
|
||||||
sass (>= 3.2)
|
sass (>= 3.2)
|
||||||
forecast_io (2.0.1)
|
forecast_io (2.0.1)
|
||||||
|
@ -285,9 +285,9 @@ GEM
|
||||||
multi_json (~> 1.11)
|
multi_json (~> 1.11)
|
||||||
os (~> 0.9)
|
os (~> 0.9)
|
||||||
signet (~> 0.7)
|
signet (~> 0.7)
|
||||||
guard (2.13.0)
|
guard (2.14.1)
|
||||||
formatador (>= 0.2.4)
|
formatador (>= 0.2.4)
|
||||||
listen (>= 2.7, <= 4.0)
|
listen (>= 2.7, < 4.0)
|
||||||
lumberjack (~> 1.0)
|
lumberjack (~> 1.0)
|
||||||
nenv (~> 0.1)
|
nenv (~> 0.1)
|
||||||
notiffany (~> 0.0)
|
notiffany (~> 0.0)
|
||||||
|
@ -300,7 +300,7 @@ GEM
|
||||||
guard (~> 2.8)
|
guard (~> 2.8)
|
||||||
guard-compat (~> 1.0)
|
guard-compat (~> 1.0)
|
||||||
multi_json (~> 1.8)
|
multi_json (~> 1.8)
|
||||||
guard-rspec (4.6.5)
|
guard-rspec (4.7.3)
|
||||||
guard (~> 2.1)
|
guard (~> 2.1)
|
||||||
guard-compat (~> 1.1)
|
guard-compat (~> 1.1)
|
||||||
rspec (>= 2.99.0, < 4.0)
|
rspec (>= 2.99.0, < 4.0)
|
||||||
|
@ -352,16 +352,16 @@ GEM
|
||||||
railties (>= 3.2)
|
railties (>= 3.2)
|
||||||
libv8 (3.16.14.19)
|
libv8 (3.16.14.19)
|
||||||
liquid (4.0.0)
|
liquid (4.0.0)
|
||||||
listen (3.0.5)
|
listen (3.0.8)
|
||||||
rb-fsevent (>= 0.9.3)
|
rb-fsevent (~> 0.9, >= 0.9.4)
|
||||||
rb-inotify (>= 0.9)
|
rb-inotify (~> 0.9, >= 0.9.7)
|
||||||
little-plugger (1.1.4)
|
little-plugger (1.1.4)
|
||||||
logging (2.2.2)
|
logging (2.2.2)
|
||||||
little-plugger (~> 1.1)
|
little-plugger (~> 1.1)
|
||||||
multi_json (~> 1.10)
|
multi_json (~> 1.10)
|
||||||
loofah (2.0.3)
|
loofah (2.0.3)
|
||||||
nokogiri (>= 1.5.9)
|
nokogiri (>= 1.5.9)
|
||||||
lumberjack (1.0.10)
|
lumberjack (1.0.12)
|
||||||
macaddr (1.7.1)
|
macaddr (1.7.1)
|
||||||
systemu (~> 2.6.2)
|
systemu (~> 2.6.2)
|
||||||
mail (2.6.5)
|
mail (2.6.5)
|
||||||
|
@ -369,7 +369,7 @@ GEM
|
||||||
memoist (0.16.0)
|
memoist (0.16.0)
|
||||||
memoizable (0.4.2)
|
memoizable (0.4.2)
|
||||||
thread_safe (~> 0.3, >= 0.3.1)
|
thread_safe (~> 0.3, >= 0.3.1)
|
||||||
method_source (0.8.2)
|
method_source (0.9.0)
|
||||||
mime-types (3.1)
|
mime-types (3.1)
|
||||||
mime-types-data (~> 3.2015)
|
mime-types-data (~> 3.2015)
|
||||||
mime-types-data (3.2016.0521)
|
mime-types-data (3.2016.0521)
|
||||||
|
@ -383,7 +383,7 @@ GEM
|
||||||
multipart-post (2.0.0)
|
multipart-post (2.0.0)
|
||||||
mysql2 (0.4.8)
|
mysql2 (0.4.8)
|
||||||
naught (1.1.0)
|
naught (1.1.0)
|
||||||
nenv (0.2.0)
|
nenv (0.3.0)
|
||||||
net-ftp-list (3.2.8)
|
net-ftp-list (3.2.8)
|
||||||
net-scp (1.2.1)
|
net-scp (1.2.1)
|
||||||
net-ssh (>= 2.6.5)
|
net-ssh (>= 2.6.5)
|
||||||
|
@ -392,7 +392,7 @@ GEM
|
||||||
nio4r (2.0.0)
|
nio4r (2.0.0)
|
||||||
nokogiri (1.8.1)
|
nokogiri (1.8.1)
|
||||||
mini_portile2 (~> 2.3.0)
|
mini_portile2 (~> 2.3.0)
|
||||||
notiffany (0.0.8)
|
notiffany (0.1.1)
|
||||||
nenv (~> 0.1)
|
nenv (~> 0.1)
|
||||||
shellany (~> 0.0)
|
shellany (~> 0.0)
|
||||||
oauth (0.4.7)
|
oauth (0.4.7)
|
||||||
|
@ -438,10 +438,9 @@ GEM
|
||||||
multi_json (~> 1.0)
|
multi_json (~> 1.0)
|
||||||
websocket-driver (>= 0.2.0)
|
websocket-driver (>= 0.2.0)
|
||||||
polyglot (0.3.5)
|
polyglot (0.3.5)
|
||||||
pry (0.10.3)
|
pry (0.11.1)
|
||||||
coderay (~> 1.1.0)
|
coderay (~> 1.1.0)
|
||||||
method_source (~> 0.8.1)
|
method_source (~> 0.9.0)
|
||||||
slop (~> 3.4)
|
|
||||||
pry-byebug (3.3.0)
|
pry-byebug (3.3.0)
|
||||||
byebug (~> 8.0)
|
byebug (~> 8.0)
|
||||||
pry (~> 0.10)
|
pry (~> 0.10)
|
||||||
|
@ -482,9 +481,9 @@ GEM
|
||||||
thor (>= 0.18.1, < 2.0)
|
thor (>= 0.18.1, < 2.0)
|
||||||
raindrops (0.17.0)
|
raindrops (0.17.0)
|
||||||
rake (12.0.0)
|
rake (12.0.0)
|
||||||
rb-fsevent (0.9.7)
|
rb-fsevent (0.10.2)
|
||||||
rb-inotify (0.9.5)
|
rb-inotify (0.9.10)
|
||||||
ffi (>= 0.5.0)
|
ffi (>= 0.5.0, < 2)
|
||||||
rb-kqueue (0.2.4)
|
rb-kqueue (0.2.4)
|
||||||
ffi (>= 0.5.0)
|
ffi (>= 0.5.0)
|
||||||
ref (2.0.0)
|
ref (2.0.0)
|
||||||
|
@ -561,15 +560,15 @@ GEM
|
||||||
simplecov-html (~> 0.10.0)
|
simplecov-html (~> 0.10.0)
|
||||||
simplecov-html (0.10.1)
|
simplecov-html (0.10.1)
|
||||||
slack-notifier (1.0.0)
|
slack-notifier (1.0.0)
|
||||||
slop (3.6.0)
|
|
||||||
spectrum-rails (1.3.4)
|
spectrum-rails (1.3.4)
|
||||||
railties (>= 3.1)
|
railties (>= 3.1)
|
||||||
spring (1.7.2)
|
spring (2.0.2)
|
||||||
|
activesupport (>= 4.2)
|
||||||
spring-commands-rspec (1.0.4)
|
spring-commands-rspec (1.0.4)
|
||||||
spring (>= 0.9.1)
|
spring (>= 0.9.1)
|
||||||
spring-watcher-listen (2.0.0)
|
spring-watcher-listen (2.0.1)
|
||||||
listen (>= 2.7, < 4.0)
|
listen (>= 2.7, < 4.0)
|
||||||
spring (~> 1.2)
|
spring (>= 1.2, < 3.0)
|
||||||
sprockets (3.7.1)
|
sprockets (3.7.1)
|
||||||
concurrent-ruby (~> 1.0)
|
concurrent-ruby (~> 1.0)
|
||||||
rack (> 1, < 3)
|
rack (> 1, < 3)
|
||||||
|
@ -675,9 +674,9 @@ DEPENDENCIES
|
||||||
geokit-rails (~> 2.2.0)
|
geokit-rails (~> 2.2.0)
|
||||||
google-api-client (~> 0.13)
|
google-api-client (~> 0.13)
|
||||||
google-cloud-translate (~> 1.0.0)
|
google-cloud-translate (~> 1.0.0)
|
||||||
guard (~> 2.13.0)
|
guard (~> 2.14.1)
|
||||||
guard-livereload (~> 2.5.1)
|
guard-livereload (~> 2.5.1)
|
||||||
guard-rspec (~> 4.6.4)
|
guard-rspec (~> 4.7.3)
|
||||||
haversine
|
haversine
|
||||||
hipchat (~> 1.2.0)
|
hipchat (~> 1.2.0)
|
||||||
httmultiparty (~> 0.3.16)
|
httmultiparty (~> 0.3.16)
|
||||||
|
@ -727,9 +726,9 @@ DEPENDENCIES
|
||||||
shoulda-matchers
|
shoulda-matchers
|
||||||
slack-notifier (~> 1.0.0)
|
slack-notifier (~> 1.0.0)
|
||||||
spectrum-rails
|
spectrum-rails
|
||||||
spring (~> 1.7.2)
|
spring (~> 2.0.2)
|
||||||
spring-commands-rspec (~> 1.0.4)
|
spring-commands-rspec (~> 1.0.4)
|
||||||
spring-watcher-listen (~> 2.0.0)
|
spring-watcher-listen (~> 2.0.1)
|
||||||
therubyracer (~> 0.12.3)
|
therubyracer (~> 0.12.3)
|
||||||
tumblr_client!
|
tumblr_client!
|
||||||
twilio-ruby (~> 3.11.5)
|
twilio-ruby (~> 3.11.5)
|
||||||
|
|
|
@ -8,7 +8,7 @@ guard 'livereload' do
|
||||||
watch(%r{(app|vendor)(/assets/\w+/(.+\.(css|js|html|png|jpg))).*}) { |m| "/assets/#{m[3]}" }
|
watch(%r{(app|vendor)(/assets/\w+/(.+\.(css|js|html|png|jpg))).*}) { |m| "/assets/#{m[3]}" }
|
||||||
end
|
end
|
||||||
|
|
||||||
guard :rspec, cmd: ENV['SPRING'] ? 'bundle exec spring rspec' : 'bundle exec rspec' do
|
guard :rspec, cmd: 'bin/rspec' do
|
||||||
watch(%r{^spec/.+_spec\.rb$})
|
watch(%r{^spec/.+_spec\.rb$})
|
||||||
watch(%r{^lib/(.+)\.rb$}) { |m| "spec/lib/#{m[1]}_spec.rb" }
|
watch(%r{^lib/(.+)\.rb$}) { |m| "spec/lib/#{m[1]}_spec.rb" }
|
||||||
watch('spec/spec_helper.rb') { "spec" }
|
watch('spec/spec_helper.rb') { "spec" }
|
||||||
|
|
|
@ -7,9 +7,11 @@ unless defined?(Spring)
|
||||||
require 'rubygems'
|
require 'rubygems'
|
||||||
require 'bundler'
|
require 'bundler'
|
||||||
|
|
||||||
if (match = Bundler.default_lockfile.read.match(/^GEM$.*?^ (?: )*spring \((.*?)\)$.*?^$/m))
|
lockfile = Bundler::LockfileParser.new(Bundler.default_lockfile.read)
|
||||||
Gem.paths = { 'GEM_PATH' => [Bundler.bundle_path.to_s, *Gem.path].uniq.join(Gem.path_separator) }
|
spring = lockfile.specs.detect { |spec| spec.name == "spring" }
|
||||||
gem 'spring', match[1]
|
if spring
|
||||||
|
Gem.use_paths Gem.dir, Bundler.bundle_path.to_s, *Gem.path
|
||||||
|
gem 'spring', spring.version
|
||||||
require 'spring/binstub'
|
require 'spring/binstub'
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
Loading…
Add table
Reference in a new issue