From dd29e0b3b96a036e7c724ca09e7e3cb747fd95a2 Mon Sep 17 00:00:00 2001 From: Sam Date: Thu, 15 Aug 2013 12:55:19 +1000 Subject: [PATCH] removing Guardfile, we no longer use is and rake autospec covers everything it used to do. --- Gemfile | 8 +---- Gemfile.lock | 31 ++++++----------- Gemfile_rails4.lock | 13 ------- Guardfile | 85 --------------------------------------------- 4 files changed, 11 insertions(+), 126 deletions(-) delete mode 100644 Guardfile diff --git a/Gemfile b/Gemfile index 01615d82e..fc3738e4b 100644 --- a/Gemfile +++ b/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 diff --git a/Gemfile.lock b/Gemfile.lock index 1739b7e4f..6b0e740df 100644 --- a/Gemfile.lock +++ b/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 diff --git a/Gemfile_rails4.lock b/Gemfile_rails4.lock index 178b0573d..505a3a223 100644 --- a/Gemfile_rails4.lock +++ b/Gemfile_rails4.lock @@ -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 diff --git a/Guardfile b/Guardfile deleted file mode 100644 index 2ca66ee7a..000000000 --- a/Guardfile +++ /dev/null @@ -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