nestor 0.1.1 → 0.2.0
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 +7 -1
- data/Rakefile +19 -15
- data/VERSION +1 -1
- data/doc/state-diagram.graffle +1788 -1776
- data/doc/state-diagram.png +0 -0
- data/lib/nestor/cli.rb +61 -25
- data/lib/nestor/machine.rb +57 -30
- data/lib/nestor/mappers/rails/test/rails_test_unit.rb +58 -0
- data/lib/nestor/mappers/rails/test/unit.rb +259 -0
- data/lib/nestor/mappers.rb +26 -0
- data/lib/nestor/script.rb +9 -0
- data/lib/nestor.rb +1 -0
- data/test/machine_test.rb +20 -0
- data/test/rails_mapper_test.rb +88 -0
- data/test/riot_macros/map.rb +13 -0
- data/test/script_test.rb +7 -0
- data/test/test_helper.rb +10 -0
- metadata +20 -17
- data/lib/nestor/strategies/test/unit.rb +0 -127
- data/lib/nestor/strategies.rb +0 -18
- data/lib/nestor/watchers/rails.rb +0 -56
- data/lib/nestor/watchers/rails_script.rb +0 -89
- data/lib/nestor/watchers.rb +0 -1
- data/spec/machine_spec.rb +0 -9
- data/spec/spec_helper.rb +0 -9
- data/spec/test_unit_strategy_spec.rb +0 -41
data/README.rdoc
CHANGED
@@ -8,7 +8,7 @@ Nestor is a continuous testing server for Rails. It has provisions for testing
|
|
8
8
|
|
9
9
|
$ gem install nestor
|
10
10
|
$ cd railsapp
|
11
|
-
$ nestor
|
11
|
+
$ nestor
|
12
12
|
|
13
13
|
Nestor listens for file change events. When a file is changed, it will run the tests for that file only, and then verify your whole build. If a failure or error is found, Nestor will focus on the failing tests and files. Changing a file that is currently unfocused tells Nestor you've cast a wider net.
|
14
14
|
|
@@ -18,6 +18,12 @@ At this early stage, Nestor is pretty verbose regarding it's operations. You ca
|
|
18
18
|
|
19
19
|
Yes, I mean server in the sense that Nestor will load +test/test_helper.rb+ and run your tests by forking. Changing +test/test_helper.rb+ or anything in +config/+ will abort Nestor. With some more work, Nestor will be able to restart itself. Nestor also knows about +db/schema.rb+ and will run +rake db:test:prepare+ in the advent your schema changes.
|
20
20
|
|
21
|
+
=== Caveats / Warnings
|
22
|
+
|
23
|
+
Nestor internally uses the [http://codeforpeople.com/lib/ruby/slave/ Slave] gem to process results in a slave process. The processes communicate using DRb. Behavior is undefined if your own tests make use of DRb.
|
24
|
+
|
25
|
+
Also, all the top-level constants that Nestor's dependencies declare will pollute your application's namespace: Watchr, Slave, StateMachine and Thor. Should this be a problem, it would be possible to run your tests in a sub-process fashion, similar to the original Autotest. Running in this mode, none of Nestor's constants would impact your process, except DRb, which Slave uses.
|
26
|
+
|
21
27
|
== Note on Patches/Pull Requests
|
22
28
|
|
23
29
|
* Fork the project.
|
data/Rakefile
CHANGED
@@ -10,8 +10,8 @@ begin
|
|
10
10
|
gem.email = "francois@teksol.info"
|
11
11
|
gem.homepage = "http://github.com/francois/nestor"
|
12
12
|
gem.authors = ["François Beausoleil"]
|
13
|
-
gem.add_development_dependency "
|
14
|
-
gem.add_development_dependency "
|
13
|
+
gem.add_development_dependency "yard", ">= 0.2.3.5"
|
14
|
+
gem.add_development_dependency "riot", ">= 0.9.12"
|
15
15
|
# gem is a Gem::Specification... see http://www.rubygems.org/read/chapter/20 for additional settings
|
16
16
|
|
17
17
|
gem.add_dependency "watchr", ">= 0.5.7"
|
@@ -24,20 +24,15 @@ rescue LoadError
|
|
24
24
|
puts "Jeweler (or a dependency) not available. Install it with: sudo gem install jeweler"
|
25
25
|
end
|
26
26
|
|
27
|
-
require '
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
27
|
+
require 'rake/testtask'
|
28
|
+
Rake::TestTask.new(:test) do |t|
|
29
|
+
t.libs << "test"
|
30
|
+
Dir["vendor/*/lib"].each {|lib| t.libs << lib}
|
31
|
+
t.pattern = "test/**/*_test.rb"
|
32
|
+
t.verbose = true
|
32
33
|
end
|
33
34
|
|
34
|
-
|
35
|
-
spec.libs << 'lib' << 'spec'
|
36
|
-
spec.pattern = 'spec/**/*_spec.rb'
|
37
|
-
spec.rcov = true
|
38
|
-
end
|
39
|
-
|
40
|
-
task :spec => :check_dependencies
|
35
|
+
task :test => :check_dependencies
|
41
36
|
|
42
37
|
begin
|
43
38
|
require 'reek/rake_task'
|
@@ -64,7 +59,7 @@ rescue LoadError
|
|
64
59
|
end
|
65
60
|
end
|
66
61
|
|
67
|
-
task :default => :
|
62
|
+
task :default => :test
|
68
63
|
|
69
64
|
begin
|
70
65
|
require 'yard'
|
@@ -74,3 +69,12 @@ rescue LoadError
|
|
74
69
|
abort "YARD is not available. In order to run yardoc, you must: sudo gem install yard"
|
75
70
|
end
|
76
71
|
end
|
72
|
+
|
73
|
+
namespace :state_machine do
|
74
|
+
task :draw do
|
75
|
+
$:.unshift(File.dirname(__FILE__) + "/lib")
|
76
|
+
require "state_machine"
|
77
|
+
require "nestor/machine"
|
78
|
+
StateMachine::Machine.draw("Nestor::Machine", {})
|
79
|
+
end
|
80
|
+
end
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.
|
1
|
+
0.2.0
|