forked from topofocus/ib-ruby
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathGuardfile
30 lines (24 loc) · 1.05 KB
/
Guardfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
# A sample Guardfile
# More info at https://github.com/guard/guard#readme
#guard :rspec, cmd: "bundle exec rspec -rdb" do
guard :rspec, cmd: "bundle exec rspec " do
require "ostruct"
# Generic Ruby apps
rspec = OpenStruct.new
rspec.spec = ->(m) { "spec/#{m}_spec.rb" }
rspec.spec_dir = "spec"
rspec.spec_helper = "spec/spec_helper.rb"
# watch(%r{^spec/.+_spec\.rb$})
# watch(%r{^lib/(.+)\.rb$}) { |m| rspec.spec.("lib/#{m[1]}") }
# watch(rspec.spec_helper) { rspec.spec_dir }
#
watch(%r{^spec/.+_spec\.rb$})
watch(%r{^lib/models/ib/(.+)\.rb$}) { |m| "spec/#{m[1]}_spec.rb" }
watch(%r{^lib/ib/alerts/(.+)\.rb$}) { |m| "spec/#{m[1]}_spec.rb" }
watch(%r{^lib/ib/messages/(.+)\.rb$}) { |m| "spec/#{m[1]}_spec.rb" }
# watch(%r{^lib/ib/alerts/(.+)\.rb$}) { |m| "spec/#{m[1]}_spec.rb" }
watch('spec/spec_helper.rb') { "spec" }
watch(%r{^ib/(.+)\.rb$}) { |m| "spec/ib/#{m[1]}_spec.rb" }
watch(%r{^models/(.+)\.rb$}) { |m| "spec/models/#{m[1]}_spec.rb" }
watch(%r{^spec/support/(.+)\.rb$}) { "spec" }
end