working 0.0.3 → 0.0.4
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/working/guard.rb +24 -24
- data/lib/working/version.rb +1 -1
- metadata +1 -1
data/lib/working/guard.rb
CHANGED
@@ -1,30 +1,30 @@
|
|
1
|
-
|
2
|
-
# Rerun bundler, if needed
|
3
|
-
guard 'bundler' do watch /^(Gemfile|.*\.gemspec)$/ end
|
1
|
+
Guard::Dsl.new.instance_eval do
|
2
|
+
# Rerun bundler, if needed
|
3
|
+
guard 'bundler' do watch /^(Gemfile|.*\.gemspec)$/ end
|
4
4
|
|
5
|
-
# These reboot spork completely
|
6
|
-
guard 'spork',
|
7
|
-
|
8
|
-
|
5
|
+
# These reboot spork completely
|
6
|
+
guard 'spork',
|
7
|
+
minitest: true,
|
8
|
+
test_unit: false,
|
9
9
|
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
10
|
+
# Four lines of Rails stuff:
|
11
|
+
minitest_unit_env: { 'RAILS_ENV' => 'test' } do
|
12
|
+
watch %r{config/(?:application|environment(?:s/test)?).rb}
|
13
|
+
watch %r{^config/initializers/.+\.rb$}
|
14
|
+
watch /Gemfile(?:\.lock)?/
|
15
15
|
|
16
|
-
|
17
|
-
end
|
16
|
+
watch 'test/test_helper.rb' do :minitest end
|
17
|
+
end
|
18
18
|
|
19
|
-
guard 'sporkminitest', drb: true do
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
19
|
+
guard 'sporkminitest', drb: true do
|
20
|
+
# Minitest::Unit style test files
|
21
|
+
watch %r|^test/.*_test\.rb|
|
22
|
+
watch %r|^lib/(.*)\.rb| do |m| "test/#{m[1]}_test.rb" end
|
23
|
+
watch %r|^test/test_helper\.rb| do 'test' end
|
24
24
|
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
end
|
25
|
+
# Rails app/ dir mapping directly parallel to test/* dirs.
|
26
|
+
# Assumes all test/* dir names are the same as the dirs in app/*
|
27
|
+
# Will need adjustment if you use app/controllers ⇒ test/functional, etc.
|
28
|
+
watch %r|^app/(.*)\.rb| do |m| "test/#{m[1]}_test.rb" end
|
29
|
+
end
|
30
30
|
end # end hack
|
data/lib/working/version.rb
CHANGED