diff --git a/Gemfile b/Gemfile index b13b07aa7..e8aaec961 100644 --- a/Gemfile +++ b/Gemfile @@ -57,6 +57,7 @@ group :development do gem 'spring-commands-rspec', '~> 1.0.2' gem 'guard', '~> 2.6.1' # run tests automatically gem 'guard-rspec', '~> 4.3.1' + gem 'guard-rails', '~> 0.7.0' # run EPP server automatically gem 'rubocop', '~> 0.26.1' gem 'guard-rubocop', '~> 1.1.0' diff --git a/Gemfile.lock b/Gemfile.lock index b270e28ef..0108658db 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -164,6 +164,8 @@ GEM lumberjack (~> 1.0) pry (>= 0.9.12) thor (>= 0.18.1) + guard-rails (0.7.0) + guard (~> 2.0) guard-rspec (4.3.1) guard (~> 2.1) rspec (>= 2.14, < 4.0) @@ -447,6 +449,7 @@ DEPENDENCIES faker (~> 1.3.0) grape (~> 0.10.1) guard (~> 2.6.1) + guard-rails (~> 0.7.0) guard-rspec (~> 4.3.1) guard-rubocop (~> 1.1.0) haml-rails (~> 0.6.0) diff --git a/Guardfile b/Guardfile index c03e7c426..0d4ca4b62 100644 --- a/Guardfile +++ b/Guardfile @@ -1,4 +1,13 @@ group :red_green_refactor, halt_on_fail: true do + # start test EPP server automatically on port 8989, + # be sure you have apache2 configured to + # accept EPP request on port 701, what proxy to 8989. + # port and environment is just for correct notification, all is overwritten by CLI + guard :rails, port: 8989, environment: 'test', CLI: 'RAILS_ENV=test unicorn -p 8989' do + watch('Gemfile.lock') + watch(%r{^(config|lib)/.*}) + end + guard :rspec, cmd: 'bundle exec rspec', notification: false do watch(%r{^spec/.+_spec\.rb$}) watch(%r{^lib/(.+)\.rb$}) { |m| "spec/lib/#{m[1]}_spec.rb" }