removing Guardfile, we no longer use is and rake autospec covers everything it used to do.
This commit is contained in:
parent
1f0de36e41
commit
dd29e0b3b9
8
Gemfile
8
Gemfile
|
@ -38,7 +38,6 @@ if rails4?
|
|||
gem 'rails-observers'
|
||||
gem 'actionpack-action_caching'
|
||||
gem 'seed-fu' , github: 'mbleigh/seed-fu'
|
||||
gem 'spork-rails', :github => 'sporkrb/spork-rails'
|
||||
else
|
||||
# we had pain with the 3.2.13 upgrade so monkey patch the security fix
|
||||
# next time around we hope to upgrade
|
||||
|
@ -51,10 +50,6 @@ else
|
|||
gem 'seed-fu'
|
||||
gem 'activerecord-postgres-hstore'
|
||||
gem 'active_attr'
|
||||
|
||||
# not compatible, but we don't really use guard much anymore anyway
|
||||
# instead we use bundle exec rake autospec
|
||||
gem 'guard-spork', require: false
|
||||
end
|
||||
|
||||
gem 'redis'
|
||||
|
@ -158,18 +153,17 @@ group :test, :development do
|
|||
gem 'fabrication', require: false
|
||||
end
|
||||
gem 'qunit-rails'
|
||||
gem 'guard-rspec', require: false
|
||||
gem 'mocha', require: false
|
||||
gem 'rb-fsevent', require: RUBY_PLATFORM =~ /darwin/i ? 'rb-fsevent' : false
|
||||
gem 'rb-inotify', '~> 0.9', require: RUBY_PLATFORM =~ /linux/i ? 'rb-inotify' : false
|
||||
gem 'rspec-rails', require: false
|
||||
gem 'shoulda', require: false
|
||||
gem 'simplecov', require: false
|
||||
gem 'terminal-notifier-guard', require: false
|
||||
gem 'timecop'
|
||||
gem 'rspec-given'
|
||||
gem 'pry-rails'
|
||||
gem 'pry-nav'
|
||||
gem 'spork-rails', :github => 'sporkrb/spork-rails'
|
||||
end
|
||||
|
||||
group :development do
|
||||
|
|
31
Gemfile.lock
31
Gemfile.lock
|
@ -1,3 +1,11 @@
|
|||
GIT
|
||||
remote: git://github.com/sporkrb/spork-rails.git
|
||||
revision: 3224f84d8c31fcb0894e9a43f6c3ac67e3aa0d71
|
||||
specs:
|
||||
spork-rails (3.2.1)
|
||||
rails (>= 3.0.0, < 5)
|
||||
spork (>= 1.0rc0)
|
||||
|
||||
GIT
|
||||
remote: https://github.com/CodeMonkeySteve/fast_xor.git
|
||||
revision: 85b79ec6d116f9680f23bd2c5c8c2c2039d477d8
|
||||
|
@ -147,8 +155,6 @@ GEM
|
|||
celluloid (0.14.1)
|
||||
timers (>= 1.0.0)
|
||||
certified (0.1.1)
|
||||
childprocess (0.3.9)
|
||||
ffi (~> 1.0, >= 1.0.11)
|
||||
coderay (1.0.9)
|
||||
connection_pool (1.1.0)
|
||||
daemons (1.1.9)
|
||||
|
@ -191,19 +197,6 @@ GEM
|
|||
ruby-hmac
|
||||
formatador (0.2.4)
|
||||
fspath (2.0.4)
|
||||
guard (1.7.0)
|
||||
formatador (>= 0.2.4)
|
||||
listen (>= 0.6.0)
|
||||
lumberjack (>= 1.0.2)
|
||||
pry (>= 0.9.10)
|
||||
thor (>= 0.14.6)
|
||||
guard-rspec (2.5.4)
|
||||
guard (>= 1.1)
|
||||
rspec (~> 2.11)
|
||||
guard-spork (1.5.0)
|
||||
childprocess (>= 0.2.3)
|
||||
guard (>= 1.1)
|
||||
spork (>= 0.8.4)
|
||||
handlebars-source (1.0.12)
|
||||
hashie (2.0.4)
|
||||
highline (1.6.18)
|
||||
|
@ -231,7 +224,6 @@ GEM
|
|||
libv8 (3.11.8.17)
|
||||
listen (0.7.3)
|
||||
lru_redux (0.0.6)
|
||||
lumberjack (1.0.3)
|
||||
mail (2.4.4)
|
||||
i18n (>= 0.4.0)
|
||||
mime-types (~> 1.16)
|
||||
|
@ -427,13 +419,12 @@ GEM
|
|||
tilt (~> 1.3.3)
|
||||
slop (3.4.4)
|
||||
sorcerer (0.3.10)
|
||||
spork (0.9.2)
|
||||
spork (1.0.0rc3)
|
||||
strong_parameters (0.2.1)
|
||||
actionpack (~> 3.0)
|
||||
activemodel (~> 3.0)
|
||||
railties (~> 3.0)
|
||||
temple (0.6.4)
|
||||
terminal-notifier-guard (1.5.3)
|
||||
therubyracer (0.11.4)
|
||||
libv8 (~> 3.11.8.12)
|
||||
ref
|
||||
|
@ -485,8 +476,6 @@ DEPENDENCIES
|
|||
fast_xs
|
||||
fastimage
|
||||
fog
|
||||
guard-rspec
|
||||
guard-spork
|
||||
handlebars-source (= 1.0.12)
|
||||
highline
|
||||
hiredis
|
||||
|
@ -543,9 +532,9 @@ DEPENDENCIES
|
|||
simplecov
|
||||
sinatra
|
||||
slim
|
||||
spork-rails!
|
||||
sprockets!
|
||||
strong_parameters
|
||||
terminal-notifier-guard
|
||||
therubyracer
|
||||
thin
|
||||
timecop
|
||||
|
|
|
@ -235,15 +235,6 @@ GEM
|
|||
fspath (2.0.4)
|
||||
given_core (3.0.0)
|
||||
sorcerer (>= 0.3.7)
|
||||
guard (1.8.1)
|
||||
formatador (>= 0.2.4)
|
||||
listen (>= 1.0.0)
|
||||
lumberjack (>= 1.0.2)
|
||||
pry (>= 0.9.10)
|
||||
thor (>= 0.14.6)
|
||||
guard-rspec (3.0.2)
|
||||
guard (>= 1.8)
|
||||
rspec (~> 2.13)
|
||||
handlebars-source (1.0.12)
|
||||
hashie (2.0.5)
|
||||
highline (1.6.19)
|
||||
|
@ -273,7 +264,6 @@ GEM
|
|||
rb-inotify (>= 0.9)
|
||||
rb-kqueue (>= 0.2)
|
||||
lru_redux (0.0.6)
|
||||
lumberjack (1.0.4)
|
||||
mail (2.5.4)
|
||||
mime-types (~> 1.16)
|
||||
treetop (~> 1.4.8)
|
||||
|
@ -444,7 +434,6 @@ GEM
|
|||
activesupport (>= 3.0)
|
||||
sprockets (~> 2.8)
|
||||
temple (0.6.5)
|
||||
terminal-notifier-guard (1.5.3)
|
||||
therubyracer (0.11.4)
|
||||
libv8 (~> 3.11.8.12)
|
||||
ref
|
||||
|
@ -497,7 +486,6 @@ DEPENDENCIES
|
|||
fast_xs
|
||||
fastimage
|
||||
fog
|
||||
guard-rspec
|
||||
handlebars-source (= 1.0.12)
|
||||
highline
|
||||
hiredis
|
||||
|
@ -556,7 +544,6 @@ DEPENDENCIES
|
|||
sinatra
|
||||
slim
|
||||
spork-rails!
|
||||
terminal-notifier-guard
|
||||
therubyracer
|
||||
thin
|
||||
timecop
|
||||
|
|
85
Guardfile
85
Guardfile
|
@ -1,85 +0,0 @@
|
|||
require 'terminal-notifier-guard' if RUBY_PLATFORM.include?('darwin')
|
||||
|
||||
phantom_path = File.expand_path('~/phantomjs/bin/phantomjs')
|
||||
phantom_path = nil unless File.exists?(phantom_path)
|
||||
|
||||
unless ENV["USING_AUTOSPEC"]
|
||||
|
||||
puts "Sam strongly recommends you Run: `bundle exec rake autospec` in favor of guard for specs, set USING_AUTOSPEC in .rvmrc to disable from Guard"
|
||||
guard :spork, wait: 120 do
|
||||
watch('config/application.rb')
|
||||
watch('config/environment.rb')
|
||||
watch(%r{^config/environments/.*\.rb$})
|
||||
watch(%r{^config/initializers/.*\.rb$})
|
||||
watch('Gemfile')
|
||||
watch('Gemfile.lock')
|
||||
watch('spec/spec_helper.rb') { :rspec }
|
||||
end
|
||||
|
||||
guard 'rspec', :focus_on_failed => true, :cli => "--drb" do
|
||||
watch(%r{^spec/.+_spec\.rb$})
|
||||
watch(%r{^lib/(.+)\.rb$}) { |m| "spec/components/#{m[1]}_spec.rb" }
|
||||
watch('spec/spec_helper.rb') { "spec" }
|
||||
|
||||
# Rails example
|
||||
watch(%r{^app/(.+)\.rb$}) { |m| "spec/#{m[1]}_spec.rb" }
|
||||
watch(%r{^app/(.*)(\.erb|\.haml)$}) { |m| "spec/#{m[1]}#{m[2]}_spec.rb" }
|
||||
watch(%r{^app/controllers/(.+)_(controller)\.rb$}) { |m| "spec/#{m[2]}s/#{m[1]}_#{m[2]}_spec.rb" }
|
||||
watch(%r{^spec/support/(.+)\.rb$}) { "spec" }
|
||||
watch('app/controllers/application_controller.rb') { "spec/controllers" }
|
||||
|
||||
# Capybara request specs
|
||||
watch(%r{^app/views/(.+)/.*\.(erb|haml)$}) { |m| "spec/requests/#{m[1]}_spec.rb" }
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
module ::Guard
|
||||
class AutoReload < ::Guard::Guard
|
||||
|
||||
require File.dirname(__FILE__) + '/config/environment'
|
||||
|
||||
def self.message_bus
|
||||
MessageBus::Instance.new.tap do |bus|
|
||||
bus.site_id_lookup do
|
||||
# this is going to be dev the majority of the time, if you have multisite configured in dev stuff may be different
|
||||
"default"
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
def run_on_change(paths)
|
||||
paths.map! do |p|
|
||||
hash = nil
|
||||
fullpath = Rails.root.to_s + "/" + p
|
||||
hash = Digest::MD5.hexdigest(File.read(fullpath)) if File.exists? fullpath
|
||||
p = p.sub /\.sass\.erb/, ""
|
||||
p = p.sub /\.sass/, ""
|
||||
p = p.sub /\.scss/, ""
|
||||
p = p.sub /^app\/assets\/stylesheets/, "assets"
|
||||
{name: p, hash: hash}
|
||||
end
|
||||
self.class.message_bus.publish "/file-change", paths
|
||||
end
|
||||
|
||||
def run_all
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
Thread.new do
|
||||
Listen.to('tmp/') do |modified,added,removed|
|
||||
modified.each do |m|
|
||||
Guard::AutoReload.message_bus.publish "/file-change", ["refresh"] if m =~ /refresh_browser/
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
guard :autoreload do
|
||||
watch(/tmp\/refresh_browser/)
|
||||
watch(/\.css$/)
|
||||
watch(/\.sass$/)
|
||||
watch(/\.scss$/)
|
||||
watch(/\.sass\.erb$/)
|
||||
watch(/\.handlebars$/)
|
||||
end
|
Loading…
Reference in New Issue