rerun 0.4 → 0.5

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.
Files changed (5) hide show
  1. data/README.md +3 -0
  2. data/bin/rerun +4 -0
  3. data/lib/rerun.rb +6 -2
  4. data/rerun.gemspec +2 -2
  5. metadata +2 -2
data/README.md CHANGED
@@ -62,6 +62,7 @@ Also --version and --help.
62
62
  * ".rerun" file to specify options per project or in $HOME.
63
63
  * Test on Linux.
64
64
  * Test on Mac without Growlnotify.
65
+ * Merge with Kicker (using it as a library and writing a Rerun recipe)
65
66
 
66
67
  # Other projects that do similar things
67
68
 
@@ -73,6 +74,8 @@ Rack::Reloader middleware: <http://github.com/rack/rack/blob/5ca8f82fb59f0bf0e8f
73
74
 
74
75
  and the Sinatra FAQ has a discussion at <http://www.sinatrarb.com/faq.html#reloading>
75
76
 
77
+ Kicker: <http://github.com/alloy/kicker/>
78
+
76
79
  # Why would I use this instead of Shotgun?
77
80
 
78
81
  Shotgun does a "fork" after the web framework has loaded but before
data/bin/rerun CHANGED
@@ -24,6 +24,10 @@ opts = OptionParser.new("", 24, ' ') { |opts|
24
24
  options[:dir] = dir
25
25
  end
26
26
 
27
+ opts.on("-p pattern", "--pattern pattern", "file glob, default = \"**/*.rb\"") do |dir|
28
+ options[:dir] = dir
29
+ end
30
+
27
31
  opts.on_tail("-h", "--help", "--usage", "show this message") do
28
32
  puts opts
29
33
  exit
@@ -23,6 +23,10 @@ module Rerun
23
23
  def dir
24
24
  @options[:dir] || "."
25
25
  end
26
+
27
+ def pattern
28
+ @options[:pattern] || "**/*.rb"
29
+ end
26
30
 
27
31
  def start
28
32
  if windows?
@@ -80,8 +84,8 @@ module Rerun
80
84
  watcher = watcher_class.new do
81
85
  restart unless @restarting
82
86
  end
83
- puts "Watching #{dir}"
84
- watcher.add_directory(dir, "**/*.rb")
87
+ puts "Watching #{dir}/#{pattern}"
88
+ watcher.add_directory(dir, pattern)
85
89
  watcher.sleep_time = 1
86
90
  watcher.start
87
91
  @watcher = watcher
@@ -3,8 +3,8 @@ $spec = Gem::Specification.new do |s|
3
3
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
4
4
 
5
5
  s.name = 'rerun'
6
- s.version = '0.4'
7
- s.date = '2009-06-16'
6
+ s.version = '0.5'
7
+ s.date = '2009-12-03'
8
8
 
9
9
  s.description = "Restarts your app when a file changes"
10
10
  s.summary = "Launches an app, and restarts it whenever the filesystem changes."
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rerun
3
3
  version: !ruby/object:Gem::Version
4
- version: "0.4"
4
+ version: "0.5"
5
5
  platform: ruby
6
6
  authors:
7
7
  - Alex Chaffee
@@ -9,7 +9,7 @@ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
11
 
12
- date: 2009-06-16 00:00:00 -07:00
12
+ date: 2009-12-03 00:00:00 -08:00
13
13
  default_executable:
14
14
  dependencies: []
15
15