add guard gem

This commit is contained in:
Tanguy PATTE 2015-11-19 11:37:29 +01:00
parent fde504b54d
commit 2d8ffc949d
3 changed files with 80 additions and 0 deletions

View file

@ -74,6 +74,8 @@ group :test do
gem 'simplecov', require: false
gem 'poltergeist'
gem 'timecop'
gem 'guard'
gem 'guard-rspec', require: false
end
group :development, :test do

View file

@ -118,8 +118,21 @@ GEM
ffi (1.9.6)
font-awesome-rails (4.4.0.0)
railties (>= 3.2, < 5.0)
formatador (0.2.5)
globalid (0.3.5)
activesupport (>= 4.1.0)
guard (2.13.0)
formatador (>= 0.2.4)
listen (>= 2.7, <= 4.0)
lumberjack (~> 1.0)
nenv (~> 0.1)
notiffany (~> 0.0)
pry (>= 0.9.12)
shellany (~> 0.0)
thor (>= 0.18.1)
guard-rspec (4.3.1)
guard (~> 2.1)
rspec (>= 2.14, < 4.0)
haml (4.0.6)
tilt
haml-rails (0.9.0)
@ -157,12 +170,16 @@ GEM
leaflet-markercluster-rails (0.7.0)
railties (>= 3.1)
leaflet-rails (0.7.4)
listen (3.0.4)
rb-fsevent (>= 0.9.3)
rb-inotify (>= 0.9)
logstash-event (1.2.02)
logstasher (0.6.5)
logstash-event (~> 1.2.0)
request_store
loofah (2.0.2)
nokogiri (>= 1.5.9)
lumberjack (1.0.9)
mail (2.6.3)
mime-types (>= 1.16, < 3)
method_source (0.8.2)
@ -171,9 +188,13 @@ GEM
minitest (5.7.0)
multi_json (1.11.2)
multipart-post (2.0.0)
nenv (0.2.0)
netrc (0.10.3)
nokogiri (1.6.6.2)
mini_portile (~> 0.6.0)
notiffany (0.0.8)
nenv (~> 0.1)
shellany (~> 0.0)
open4 (1.3.4)
openid_connect (0.9.2)
activemodel
@ -240,6 +261,9 @@ GEM
rainbow (2.0.0)
raindrops (0.13.0)
rake (10.4.2)
rb-fsevent (0.9.6)
rb-inotify (0.9.5)
ffi (>= 0.5.0)
rdoc (4.2.0)
json (~> 1.4)
request_store (1.1.0)
@ -252,6 +276,10 @@ GEM
rgeo (0.3.20)
rgeo-geojson (0.3.1)
rgeo (~> 0.3)
rspec (3.2.0)
rspec-core (~> 3.2.0)
rspec-expectations (~> 3.2.0)
rspec-mocks (~> 3.2.0)
rspec-core (3.2.3)
rspec-support (~> 3.2.0)
rspec-expectations (3.2.1)
@ -302,6 +330,7 @@ GEM
sentry-raven (0.13.1)
faraday (>= 0.7.6)
sexp_processor (4.6.0)
shellany (0.0.1)
shoulda-matchers (2.8.0)
activesupport (>= 3.0.0)
simplecov (0.9.1)
@ -387,6 +416,8 @@ DEPENDENCIES
draper
factory_girl
font-awesome-rails
guard
guard-rspec
haml-rails
hashie
jbuilder (~> 2.0)

47
Guardfile Normal file
View file

@ -0,0 +1,47 @@
# A sample Guardfile
# More info at https://github.com/guard/guard#readme
## Uncomment and set this to only include directories you want to watch
# directories %w(app lib config test spec features) \
# .select{|d| Dir.exists?(d) ? d : UI.warning("Directory #{d} does not exist")}
## Note: if you are using the `directories` clause above and you are not
## watching the project directory ('.'), then you will want to move
## the Guardfile to a watched dir and symlink it back, e.g.
#
# $ mkdir config
# $ mv Guardfile config/
# $ ln -s config/Guardfile .
#
# and, you'll have to watch "config/Guardfile" instead of "Guardfile"
# Note: The cmd option is now required due to the increasing number of ways
# rspec may be run, below are examples of the most common uses.
# * bundler: 'bundle exec rspec'
# * bundler binstubs: 'bin/rspec'
# * spring: 'bin/rsspec' (This will use spring if running and you have
# installed the spring binstubs per the docs)
# * zeus: 'zeus rspec' (requires the server to be started separetly)
# * 'just' rspec: 'rspec'
guard :rspec, cmd: 'bin/rspec' do
watch(%r{^spec/.+_spec\.rb$})
watch(%r{^lib/(.+)\.rb$}) { |m| "spec/lib/#{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|\.slim)$}) { |m| "spec/#{m[1]}#{m[2]}_spec.rb" }
watch(%r{^app/controllers/(.+)_(controller)\.rb$}) { |m| ["spec/routing/#{m[1]}_routing_spec.rb", "spec/#{m[2]}s/#{m[1]}_#{m[2]}_spec.rb", "spec/acceptance/#{m[1]}_spec.rb"] }
watch(%r{^spec/support/(.+)\.rb$}) { "spec" }
watch('config/routes.rb') { "spec/routing" }
watch('app/controllers/application_controller.rb') { "spec/controllers" }
watch('spec/rails_helper.rb') { "spec" }
# Capybara features specs
watch(%r{^app/views/(.+)/.*\.(erb|haml|slim)$}) { |m| "spec/features/#{m[1]}_spec.rb" }
# Turnip features and steps
watch(%r{^spec/acceptance/(.+)\.feature$})
watch(%r{^spec/acceptance/steps/(.+)_steps\.rb$}) { |m| Dir[File.join("**/#{m[1]}.feature")][0] || 'spec/acceptance' }
end