-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathGuardfile
More file actions
61 lines (53 loc) · 1.51 KB
/
Guardfile
File metadata and controls
61 lines (53 loc) · 1.51 KB
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
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
guard :rubocop do
watch(%r{^lib/.+\.rb$})
watch(%r{^spec/.+\.rb$})
end
group :sinatra do
%w[production development].each do |env|
guard :rspec,
all_on_start: true,
cmd: "RACK_ENV=#{env} bundle exec appraisal sinatra14 rspec" do
watch(%r{^spec/integration/sinatra_spec.rb$})
end
end
end
group :rails do
%w[production development].each do |env|
%w[rails52 rails61 rails70].each do |appraisal|
cmd = "RACK_ENV=#{env} bundle exec appraisal #{appraisal} rspec"
guard :rspec, all_on_start: true, cmd: cmd do
watch('lib/loga/railtie.rb') do
[
'spec/integration/rails/request_spec.rb',
'spec/integration/rails/railtie_spec.rb',
]
end
watch(%r{^spec/fixtures/rails\d{2}/.+\.rb$}) do
[
'spec/integration/rails/request_spec.rb',
'spec/integration/rails/railtie_spec.rb',
]
end
watch(%r{^spec/integration/rails/.+_spec\.rb$})
end
end
end
end
group :sidekiq do
cmd = 'bundle exec appraisal sidekiq51 rspec'
guard :rspec, all_on_start: true, cmd: cmd do
watch('lib/loga/sidekiq/job_logger.rb') do
[
'spec/integration/sidekiq_spec.rb',
'spec/loga/sidekiq/job_logger_spec.rb',
'spec/loga/sidekiq_spec.rb',
]
end
end
end
group :unit do
guard :rspec, cmd: 'bundle exec appraisal unit rspec' do
watch(%r{^spec/unit/.+_spec\.rb$})
watch(%r{^lib/(.+)\.rb$}) { |m| "spec/unit/#{m[1]}_spec.rb" }
end
end