harmon-autowatchr 0.1.5 → 0.1.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/README.rdoc +8 -4
- data/VERSION +1 -1
- data/harmon-autowatchr.gemspec +4 -4
- data/lib/autowatchr.rb +3 -3
- data/test/test_autowatchr.rb +6 -6
- metadata +4 -4
data/README.rdoc
CHANGED
@@ -1,10 +1,12 @@
|
|
1
1
|
= autowatchr
|
2
2
|
|
3
|
-
|
3
|
+
Fork of viking's autowatchr library (http://github.com/viking/autowatchr) to fix
|
4
|
+
issues and add features. Provides some autotest-like behavior for
|
5
|
+
watchr (http://github.com/mynyml/watchr).
|
4
6
|
|
5
7
|
== Installation
|
6
8
|
|
7
|
-
gem install autowatchr
|
9
|
+
gem install harmon-autowatchr
|
8
10
|
|
9
11
|
== Current features
|
10
12
|
|
@@ -39,8 +41,10 @@ test.watchr
|
|
39
41
|
* run_method
|
40
42
|
* The way the ruby files are "require"-ed.
|
41
43
|
* Two options:
|
42
|
-
* <tt>:
|
43
|
-
* <tt>:
|
44
|
+
* <tt>:require => ruby -e "%w[test/first_test.rb test/second_test.rb].each { |file| require file }"</tt>
|
45
|
+
* <tt>:load => ruby -e "%w[test/first_test.rb test/second_test.rb].each { |file| load file }"</tt>
|
46
|
+
* Default: <tt>:require</tt>
|
47
|
+
* It is advised to use <tt>:load</tt> when running tests in Rails since that is what "rake test" uses.
|
44
48
|
* include
|
45
49
|
* Paths to include (with -I)
|
46
50
|
* Default: <tt>".:#{self.lib_dir}:#{self.test_dir}"</tt>
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.1.
|
1
|
+
0.1.6
|
data/harmon-autowatchr.gemspec
CHANGED
@@ -1,15 +1,15 @@
|
|
1
1
|
# Generated by jeweler
|
2
2
|
# DO NOT EDIT THIS FILE DIRECTLY
|
3
|
-
# Instead, edit Jeweler::Tasks in
|
3
|
+
# Instead, edit Jeweler::Tasks in Rakefile, and run 'rake gemspec'
|
4
4
|
# -*- encoding: utf-8 -*-
|
5
5
|
|
6
6
|
Gem::Specification.new do |s|
|
7
7
|
s.name = %q{harmon-autowatchr}
|
8
|
-
s.version = "0.1.
|
8
|
+
s.version = "0.1.6"
|
9
9
|
|
10
10
|
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
11
11
|
s.authors = ["Jeremy Stephens", "Adam Grant"]
|
12
|
-
s.date = %q{
|
12
|
+
s.date = %q{2011-01-25}
|
13
13
|
s.description = %q{Fork of viking's autowatchr library to fix some issues and add some features. Provides some autotest-like behavior for watchr (http://github.com/mynyml/watchr).}
|
14
14
|
s.email = %q{harmon@harmonius.net}
|
15
15
|
s.extra_rdoc_files = [
|
@@ -22,7 +22,7 @@ Gem::Specification.new do |s|
|
|
22
22
|
"README.rdoc",
|
23
23
|
"Rakefile",
|
24
24
|
"VERSION",
|
25
|
-
"autowatchr.gemspec",
|
25
|
+
"harmon-autowatchr.gemspec",
|
26
26
|
"lib/autowatchr.rb",
|
27
27
|
"test.watchr",
|
28
28
|
"test/fixtures/lib/bar.rb",
|
data/lib/autowatchr.rb
CHANGED
@@ -157,10 +157,10 @@ class Autowatchr
|
|
157
157
|
|
158
158
|
if !passing.empty?
|
159
159
|
if passing.length > 1
|
160
|
-
if @config.run_method == :
|
161
|
-
predicate = "
|
160
|
+
if @config.run_method == :load
|
161
|
+
predicate = "-e \"%w[#{passing.join(" ")}].each { |file| load file }\""
|
162
162
|
else
|
163
|
-
predicate = "-e \"%w[#{passing.join(" ")}].each
|
163
|
+
predicate = "-e \"%w[#{passing.join(" ")}].each { |file| require file }\""
|
164
164
|
end
|
165
165
|
else
|
166
166
|
predicate = passing[0]
|
data/test/test_autowatchr.rb
CHANGED
@@ -117,7 +117,7 @@ class TestAutowatchr < Test::Unit::TestCase
|
|
117
117
|
end
|
118
118
|
|
119
119
|
def test_running_multiple_test_files_with_require_run_method
|
120
|
-
expected_cmd = "/usr/local/bin/ruby -I.:#{@lib_dir}:#{@test_dir} -e \"%w[#{@test_dir}/test_bar.rb #{@test_dir}/test_foo.rb].each
|
120
|
+
expected_cmd = "/usr/local/bin/ruby -I.:#{@lib_dir}:#{@test_dir} -e \"%w[#{@test_dir}/test_bar.rb #{@test_dir}/test_foo.rb].each { |file| require file }\""
|
121
121
|
Autowatchr.any_instance.expects_system_call(expected_cmd, "all")
|
122
122
|
|
123
123
|
silence_stream(STDOUT) do
|
@@ -126,19 +126,19 @@ class TestAutowatchr < Test::Unit::TestCase
|
|
126
126
|
end
|
127
127
|
end
|
128
128
|
|
129
|
-
def
|
130
|
-
expected_cmd = "/usr/local/bin/ruby -I.:#{@lib_dir}:#{@test_dir}
|
129
|
+
def test_running_multiple_test_files_with_load_run_method
|
130
|
+
expected_cmd = "/usr/local/bin/ruby -I.:#{@lib_dir}:#{@test_dir} -e \"%w[#{@test_dir}/test_bar.rb #{@test_dir}/test_foo.rb].each { |file| load file }\""
|
131
131
|
Autowatchr.any_instance.expects_system_call(expected_cmd, "all")
|
132
132
|
|
133
133
|
silence_stream(STDOUT) do
|
134
|
-
aw = new_autowatchr(:run_method => :
|
134
|
+
aw = new_autowatchr(:run_method => :load)
|
135
135
|
aw.run_test_file(["#{@test_dir}/test_bar.rb", "#{@test_dir}/test_foo.rb"])
|
136
136
|
end
|
137
137
|
end
|
138
138
|
|
139
139
|
def test_runs_all_test_files_on_start
|
140
140
|
files = Dir.glob("#{@test_dir}/**/test_*.rb").join(" ")
|
141
|
-
expected_cmd = %!/usr/local/bin/ruby -I.:#{@lib_dir}:#{@test_dir} -e "%w[#{files}].each
|
141
|
+
expected_cmd = %!/usr/local/bin/ruby -I.:#{@lib_dir}:#{@test_dir} -e "%w[#{files}].each { |file| require file }"!
|
142
142
|
Autowatchr.any_instance.expects_system_call(expected_cmd, "all")
|
143
143
|
|
144
144
|
silence_stream(STDOUT) do
|
@@ -240,7 +240,7 @@ class TestAutowatchr < Test::Unit::TestCase
|
|
240
240
|
aw.expects_system_call(expected_cmd_3, "bar_pass")
|
241
241
|
|
242
242
|
files = Dir.glob("#{@test_dir}/**/test_*.rb").join(" ")
|
243
|
-
expected_cmd_4 = %!/usr/local/bin/ruby -I.:#{@lib_dir}:#{@test_dir} -e "%w[#{files}].each
|
243
|
+
expected_cmd_4 = %!/usr/local/bin/ruby -I.:#{@lib_dir}:#{@test_dir} -e "%w[#{files}].each { |file| require file }"!
|
244
244
|
aw.expects_system_call(expected_cmd_4, "all")
|
245
245
|
|
246
246
|
silence_stream(STDOUT) do
|
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: harmon-autowatchr
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 23
|
5
5
|
prerelease: false
|
6
6
|
segments:
|
7
7
|
- 0
|
8
8
|
- 1
|
9
|
-
-
|
10
|
-
version: 0.1.
|
9
|
+
- 6
|
10
|
+
version: 0.1.6
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- Jeremy Stephens
|
@@ -16,7 +16,7 @@ autorequire:
|
|
16
16
|
bindir: bin
|
17
17
|
cert_chain: []
|
18
18
|
|
19
|
-
date:
|
19
|
+
date: 2011-01-25 00:00:00 -08:00
|
20
20
|
default_executable:
|
21
21
|
dependencies:
|
22
22
|
- !ruby/object:Gem::Dependency
|