Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Port readme to markdown

  • Loading branch information...
commit 7b55c3a7d80f59f35d8fd56f4ab01d0028f30111 1 parent 772eafd
@mynyml mynyml authored
Showing with 116 additions and 107 deletions.
  1. +1 −1  Manifest
  2. +113 −0 README.md
  3. +0 −104 README.rdoc
  4. +2 −2 docs.watchr
View
2  Manifest
@@ -2,7 +2,7 @@
History.txt
LICENSE
Manifest
-README.rdoc
+README.md
Rakefile
TODO.txt
bin/watchr
View
113 README.md
@@ -0,0 +1,113 @@
+Summary
+-------
+
+Agile development tool that monitors a directory tree, and triggers a user
+defined action whenever an observed file is modified. Its most typical use is
+continuous testing, and as such it is a more flexible alternative to autotest.
+
+Features
+--------
+
+watchr is:
+
+* Simple to use
+* Highly flexible
+* Evented ( Listens for filesystem events with native c libs )
+* Portable ( Linux, \*BSD, OSX, Solaris, Windows )
+* Fast ( Immediately reacts to file changes )
+
+Most importantly it allows running tests in an environment that is **agnostic** to:
+
+* Web frameworks ( rails, merb, sinatra, camping, invisible, ... )
+* Test frameworks ( test/unit, minitest, rspec, test/spec, expectations, ... )
+* Ruby interpreters ( ruby1.8, ruby1.9, MRI, JRuby, Rubinius, ... )
+* Package frameworks ( rubygems, rip, ... )
+
+Usage
+-----
+
+On the command line,
+
+ $ watchr path/to/script.file
+
+will monitor files in the current directory tree, and react to events on those
+files in accordance with the script.
+
+Scripts
+-------
+
+The script contains a set of simple rules that map observed files to an action.
+Its DSL is a single method: `watch(pattern, &action)`
+
+ watch( 'a regexp pattern matching paths to observe' ) {|match_data_object| command_to_run }
+
+So for example,
+
+ watch( 'test/test_.*\.rb' ) {|md| system("ruby #{md[0]}") }
+
+will match any test file and run it whenever it is saved.
+
+A continuous testing script for a basic project could be
+
+ watch( 'test/test_.*\.rb' ) {|md| system("ruby #{md[0]}") }
+ watch( 'lib/(.*)\.rb' ) {|md| system("ruby test/test_#{md[1]}.rb") }
+
+which, in addition to running any saved test file as above, will also run a
+lib file's associated test. This mimics the equivalent autotest behaviour.
+
+It's easy to see why watchr is so flexible, since the whole command is custom.
+The above actions could just as easily call "jruby", "ruby --rubygems", "ruby
+-Ilib", "specrb", "rbx", ... or any combination of these. For the sake of
+comparison, autotest runs with:
+
+ $ /usr/bin/ruby1.8 -I.:lib:test -rubygems -e "%w[test/unit test/test_helper.rb test/test_watchr.rb].each { |f| require f }"
+
+locking the environment into ruby1.8, rubygems and test/unit for all tests.
+
+And remember the scripts are pure ruby, so feel free to add methods,
+`Signal#trap` calls, etc. Updates to script files are picked up on the fly (no
+need to restart watchr) so experimenting is painless.
+
+The [wiki][5] has more details and examples. You might also want to take a
+look at watchr's own scripts, [specs.watchr][1], [docs.watchr][2] and
+[gem.watchr][3], to get you started.
+
+Install
+-------
+
+ gem install watchr
+
+If you're on \*nix and have the [rev][4] gem installed, Watchr will detect it
+and use it automatically. This will make Watchr evented.
+
+ gem install rev
+
+See Also
+--------
+
+* [redgreen][6]: Standalone redgreen eye candy for test results, ala autotest.
+* [phocus][7]: Run focused tests when running the whole file/suite is unnecessary.
+* [autowatchr][8]: Provides some autotest-like behavior for watchr
+* [nestor][9]: Continuous testing server for Rails
+
+Links
+-----
+
+* code: <http://github.com/mynyml/watchr>
+* docs: <http://yardoc.org/docs/mynyml-watchr/file:README.rdoc>
+* wiki: <http://wiki.github.com/mynyml/watchr>
+* bugs: <http://github.com/mynyml/watchr/issues>
+
+
+
+
+[1]: http://github.com/mynyml/watchr/blob/master/specs.watchr
+[2]: http://github.com/mynyml/watchr/blob/master/docs.watchr
+[3]: http://github.com/mynyml/watchr/blob/master/gem.watchr
+[4]: http://github.com/tarcieri/rev/
+[5]: http://wiki.github.com/mynyml/watchr
+[6]: http://github.com/mynyml/redgreen
+[7]: http://github.com/mynyml/phocus
+[8]: http://github.com/viking/autowatchr
+[9]: http://github.com/francois/nestor
+
View
104 README.rdoc
@@ -1,104 +0,0 @@
-=== Summary
-
-Agile development tool that monitors a directory tree, and triggers a user
-defined action whenever an observed file is modified. Its most typical use is
-continuous testing, and as such it is a more flexible alternative to autotest.
-
-
-=== Features
-
-watchr is:
-
-* Simple to use
-* Highly flexible
-* Evented ( Listens for filesystem events with native c libs )
-* Portable ( Linux, *BSD, OSX, Solaris, Windows )
-* Fast ( Immediately reacts to file changes )
-
-Most importantly it allows running tests in an environment that is *agnostic* to:
-
-* Web frameworks ( rails, merb, sinatra, camping, invisible, ... )
-* Test frameworks ( test/unit, minitest, rspec, test/spec, expectations, ... )
-* Ruby interpreters ( ruby1.8, ruby1.9, MRI, JRuby, Rubinius, ... )
-* Package frameworks ( rubygems, rip, ... )
-
-
-=== Usage
-
-On the command line,
-
- $ watchr path/to/script.file
-
-will monitor files in the current directory tree, and react to events on those
-files in accordance with the script.
-
-
-=== Scripts
-
-The script contains a set of simple rules that map observed files to an action.
-Its DSL is a single method: watch(pattern, &action)
-
- watch( 'a regexp pattern matching paths to observe' ) {|match_data_object| command_to_run }
-
-So for example,
-
- watch( 'test/test_.*\.rb' ) {|md| system("ruby #{md[0]}") }
-
-will match any test file and run it whenever it is saved.
-
-A continuous testing script for a basic project could be
-
- watch( 'test/test_.*\.rb' ) {|md| system("ruby #{md[0]}") }
- watch( 'lib/(.*)\.rb' ) {|md| system("ruby test/test_#{md[1]}.rb") }
-
-which, in addition to running any saved test file as above, will also run a
-lib file's associated test. This mimics the equivalent autotest behaviour.
-
-It's easy to see why watchr is so flexible, since the whole command is custom.
-The above actions could just as easily call "jruby", "ruby --rubygems", "ruby
--Ilib", "specrb", "rbx", ... or any combination of these. For the sake of
-comparison, autotest runs with:
-
- /usr/bin/ruby1.8 -I.:lib:test -rubygems -e "%w[test/unit test/test_helper.rb test/test_watchr.rb].each { |f| require f }"
-
-locking the environment into ruby1.8, rubygems and test/unit for all tests.
-
-And remember the scripts are pure ruby, so feel free to add methods,
-Signal#trap calls, etc. Updates to script files are picked up on the fly (no
-need to restart watchr) so experimenting is painless.
-
-The wiki[http://wiki.github.com/mynyml/watchr] has more details and examples.
-You might also want to take a look at watchr's own scripts,
-specs.watchr[http://github.com/mynyml/watchr/blob/master/specs.watchr],
-docs.watchr[http://github.com/mynyml/watchr/blob/master/docs.watchr] and
-gem.watchr[http://github.com/mynyml/watchr/blob/master/gem.watchr], to get you
-started.
-
-
-=== Install
-
- gem install watchr --source http://gemcutter.org
-
-If you're on *nix and have the rev[http://github.com/tarcieri/rev/] gem
-installed, Watchr will detect it and use it automatically. This will make
-Watchr evented.
-
- gem install rev
-
-
-=== See Also
-
-redgreen[http://github.com/mynyml/redgreen]:: Standalone redgreen eye candy for test results, ala autotest.
-phocus[http://github.com/mynyml/phocus]:: Run focused tests when running the whole file/suite is unnecessary.
-autowatchr[http://github.com/viking/autowatchr]:: Provides some autotest-like behavior for watchr
-nestor[http://github.com/francois/nestor]:: Continuous testing server for Rails
-
-
-=== Links
-
-source:: http://github.com/mynyml/watchr
-docs:: http://docs.github.com/mynyml/watchr
-wiki:: http://wiki.github.com/mynyml/watchr
-bugs:: http://github.com/mynyml/watchr/issues
-group:: http://groups.google.com/group/watchr
-
View
4 docs.watchr
@@ -6,7 +6,7 @@ require 'yard'
# Rules
# --------------------------------------------------
watch( 'lib/.*\.rb' ) { yard }
-watch( 'README.rdoc' ) { yard }
+watch( 'README.md' ) { yard }
watch( 'TODO.txt' ) { yard }
watch( 'LICENSE' ) { yard }
@@ -21,6 +21,6 @@ Signal.trap('INT' ) { abort("\n") } # Ctrl-C
# --------------------------------------------------
def yard
print "Updating yardocs... "; STDOUT.flush
- YARD::CLI::Yardoc.run *%w( -o doc/yard --readme README.rdoc --markup rdoc - LICENSE TODO.txt )
+ YARD::CLI::Yardoc.run *%w( -o doc/yard --readme README.md --markup rdoc - LICENSE TODO.txt )
print "done\n"
end
Please sign in to comment.
Something went wrong with that request. Please try again.