rerun 0.8.0 → 0.8.1
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.
- checksums.yaml +7 -0
- data/README.md +21 -3
- data/lib/rerun/glob.rb +2 -2
- data/lib/rerun/options.rb +2 -1
- data/lib/rerun/runner.rb +1 -1
- data/lib/rerun/watcher.rb +5 -5
- data/rerun.gemspec +2 -2
- metadata +10 -17
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA1:
|
3
|
+
metadata.gz: 24ebb61bf57808effe85a825b7cb5d186cf04e31
|
4
|
+
data.tar.gz: dec0d0f15fb3c727b360b6b9baf03626dfab58cb
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: f40a7d4e38bfb192b993f6814a10d1e6dc25f5b4fe5302b026ce7f68d7d95f663e215eb9dd6bdea25ef3db68aa5c42d5f734b43658eaf91be302c4e03992b821
|
7
|
+
data.tar.gz: ca5acd2f6a9b2dbe967a7ea6c320b6a6ed7fbdb73df3191d2ceb64a276dc6f066d41967f6f92869d748204430a98cb84a6842400b2644b797cd7e291f6fd6464
|
data/README.md
CHANGED
@@ -35,6 +35,15 @@ gems-as-libraries from gems-as-tools.)
|
|
35
35
|
|
36
36
|
rvm @global do gem install rerun
|
37
37
|
|
38
|
+
The Listen gem looks for certain platform-dependent gems, and will complain if
|
39
|
+
they're not available. Unfortunately, Rubygems doesn't understand optional
|
40
|
+
dependencies very well, so you may have to install extra gems (and/or put them
|
41
|
+
in your Gemfile) to make Rerun work more smoothly on your system.
|
42
|
+
(Learn more at <https://github.com/guard/listen#listen-adapters>.)
|
43
|
+
For example, on Mac OS X, use
|
44
|
+
|
45
|
+
gem install rb-fsevent
|
46
|
+
|
38
47
|
# Usage:
|
39
48
|
|
40
49
|
rerun [options] [--] cmd
|
@@ -141,11 +150,14 @@ While the app is (re)running, you can make things happen by pressing keys:
|
|
141
150
|
* **c** -- clear the screen
|
142
151
|
* **x** or **q** -- exit (just like control-C)
|
143
152
|
|
153
|
+
If you're backgrounding or using Pry or a debugger, you might not want these
|
154
|
+
keys to be trapped, so use the `--background` option.
|
155
|
+
|
144
156
|
# Signals
|
145
157
|
|
146
158
|
The current algorithm for killing the process is:
|
147
159
|
|
148
|
-
* send [SIGTERM](http://en.wikipedia.org/wiki/SIGTERM)
|
160
|
+
* send [SIGTERM](http://en.wikipedia.org/wiki/SIGTERM) (or the value of the `--signal` option)
|
149
161
|
* if that doesn't work after 4 seconds, send SIGINT (aka control-C)
|
150
162
|
* if that doesn't work after 2 more seconds, send SIGKILL (aka kill -9)
|
151
163
|
|
@@ -231,13 +243,15 @@ of Ruby nor config file syntax.
|
|
231
243
|
# Why did you write this?
|
232
244
|
|
233
245
|
I've been using [Sinatra](http://sinatrarb.com) and loving it. In order
|
234
|
-
to simplify their system, the Rat Pack
|
246
|
+
to simplify their system, the Rat Pack removed auto-reloading from
|
235
247
|
Sinatra proper. I approve of this: a web application framework should be
|
236
248
|
focused on serving requests, not on munging Ruby ObjectSpace for
|
237
249
|
dev-time convenience. But I still wanted automatic reloading during
|
238
250
|
development. Shotgun wasn't working for me (see above) so I spliced
|
239
251
|
Rerun together out of code from Rspactor, FileSystemWatcher, and Shotgun
|
240
|
-
-- with a heavy amount of refactoring and rewriting.
|
252
|
+
-- with a heavy amount of refactoring and rewriting. In late 2012 I
|
253
|
+
migrated the backend to the Listen gem, which was extracted from Guard,
|
254
|
+
so it should be more reliable and performant on multiple platforms.
|
241
255
|
|
242
256
|
# Credits
|
243
257
|
|
@@ -258,9 +272,13 @@ Based upon and/or inspired by:
|
|
258
272
|
* Dreamcat4
|
259
273
|
* <https://github.com/FND>
|
260
274
|
* Barry Sia <https://github.com/bsia>
|
275
|
+
* Paul Rangel <https://github.com/ismell>
|
261
276
|
|
262
277
|
# Version History
|
263
278
|
|
279
|
+
* v0.8.1
|
280
|
+
* bugfix release (#30 and #34)
|
281
|
+
|
264
282
|
* v0.8.0
|
265
283
|
* --background option (thanks FND!) to disable the keyboard listener
|
266
284
|
* --signal option (thanks FND!)
|
data/lib/rerun/glob.rb
CHANGED
data/lib/rerun/options.rb
CHANGED
@@ -1,7 +1,8 @@
|
|
1
1
|
require 'optparse'
|
2
2
|
|
3
3
|
libdir = "#{File.expand_path(File.dirname(File.dirname(__FILE__)))}"
|
4
|
-
|
4
|
+
|
5
|
+
$spec = Gem::Specification.load(File.join(libdir, "..", "rerun.gemspec"))
|
5
6
|
|
6
7
|
module Rerun
|
7
8
|
class Options
|
data/lib/rerun/runner.rb
CHANGED
@@ -159,7 +159,7 @@ module Rerun
|
|
159
159
|
end
|
160
160
|
watcher.start
|
161
161
|
@watcher = watcher
|
162
|
-
say "Watching #{dir}
|
162
|
+
say "Watching #{dir.join(', ')} for #{pattern} using #{watcher.adapter.class.name.split('::').last} adapter"
|
163
163
|
end
|
164
164
|
end
|
165
165
|
|
data/lib/rerun/watcher.rb
CHANGED
@@ -43,7 +43,7 @@ module Rerun
|
|
43
43
|
unless FileTest.exists?(d) && FileTest.readable?(d) && FileTest.directory?(d)
|
44
44
|
raise InvalidDirectoryError, "Directory '#{d}' either doesnt exist or isnt readable"
|
45
45
|
end
|
46
|
-
d
|
46
|
+
File.expand_path(d)
|
47
47
|
end
|
48
48
|
end
|
49
49
|
|
@@ -53,13 +53,13 @@ module Rerun
|
|
53
53
|
end
|
54
54
|
|
55
55
|
@thread = Thread.new do
|
56
|
-
regexp = Glob.new(@pattern).to_regexp
|
56
|
+
regexp = Rerun::Glob.new(@pattern).to_regexp
|
57
57
|
dirs = @directories
|
58
|
-
params = dirs << { :filter => regexp }
|
59
|
-
@listener = Listen::
|
58
|
+
params = dirs << { :filter => regexp, :relative_paths => false }
|
59
|
+
@listener = Listen::Listener.new(*params) do |modified, added, removed|
|
60
60
|
@client_callback.call(:modified => modified, :added => added, :removed => removed)
|
61
61
|
end
|
62
|
-
@listener.start
|
62
|
+
@listener.start!
|
63
63
|
end
|
64
64
|
|
65
65
|
@thread.priority = @priority
|
data/rerun.gemspec
CHANGED
@@ -3,7 +3,7 @@ $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.8.
|
6
|
+
s.version = '0.8.1'
|
7
7
|
|
8
8
|
s.description = "Restarts your app when a file changes. A no-frills, command-line alternative to Guard, Shotgun, Autotest, etc."
|
9
9
|
s.summary = "Launches an app, and restarts it whenever the filesystem changes. A no-frills, command-line alternative to Guard, Shotgun, Autotest, etc."
|
@@ -25,7 +25,7 @@ $spec = Gem::Specification.new do |s|
|
|
25
25
|
|
26
26
|
s.extra_rdoc_files = %w[README.md]
|
27
27
|
|
28
|
-
s.add_dependency 'listen'
|
28
|
+
s.add_dependency 'listen', '>= 1.0.3'
|
29
29
|
|
30
30
|
s.homepage = "http://github.com/alexch/rerun/"
|
31
31
|
s.require_paths = %w[lib]
|
metadata
CHANGED
@@ -1,32 +1,29 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rerun
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.8.
|
5
|
-
prerelease:
|
4
|
+
version: 0.8.1
|
6
5
|
platform: ruby
|
7
6
|
authors:
|
8
7
|
- Alex Chaffee
|
9
8
|
autorequire:
|
10
9
|
bindir: bin
|
11
10
|
cert_chain: []
|
12
|
-
date: 2013-
|
11
|
+
date: 2013-05-02 00:00:00.000000000 Z
|
13
12
|
dependencies:
|
14
13
|
- !ruby/object:Gem::Dependency
|
15
14
|
name: listen
|
16
15
|
requirement: !ruby/object:Gem::Requirement
|
17
|
-
none: false
|
18
16
|
requirements:
|
19
|
-
- -
|
17
|
+
- - '>='
|
20
18
|
- !ruby/object:Gem::Version
|
21
|
-
version:
|
19
|
+
version: 1.0.3
|
22
20
|
type: :runtime
|
23
21
|
prerelease: false
|
24
22
|
version_requirements: !ruby/object:Gem::Requirement
|
25
|
-
none: false
|
26
23
|
requirements:
|
27
|
-
- -
|
24
|
+
- - '>='
|
28
25
|
- !ruby/object:Gem::Version
|
29
|
-
version:
|
26
|
+
version: 1.0.3
|
30
27
|
description: Restarts your app when a file changes. A no-frills, command-line alternative
|
31
28
|
to Guard, Shotgun, Autotest, etc.
|
32
29
|
email: alex@stinky.com
|
@@ -51,28 +48,24 @@ files:
|
|
51
48
|
- lib/rerun.rb
|
52
49
|
homepage: http://github.com/alexch/rerun/
|
53
50
|
licenses: []
|
51
|
+
metadata: {}
|
54
52
|
post_install_message:
|
55
53
|
rdoc_options: []
|
56
54
|
require_paths:
|
57
55
|
- lib
|
58
56
|
required_ruby_version: !ruby/object:Gem::Requirement
|
59
|
-
none: false
|
60
57
|
requirements:
|
61
|
-
- -
|
58
|
+
- - '>='
|
62
59
|
- !ruby/object:Gem::Version
|
63
60
|
version: '0'
|
64
|
-
segments:
|
65
|
-
- 0
|
66
|
-
hash: 3891504021895001236
|
67
61
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
68
|
-
none: false
|
69
62
|
requirements:
|
70
|
-
- -
|
63
|
+
- - '>='
|
71
64
|
- !ruby/object:Gem::Version
|
72
65
|
version: '0'
|
73
66
|
requirements: []
|
74
67
|
rubyforge_project:
|
75
|
-
rubygems_version:
|
68
|
+
rubygems_version: 2.0.3
|
76
69
|
signing_key:
|
77
70
|
specification_version: 2
|
78
71
|
summary: Launches an app, and restarts it whenever the filesystem changes. A no-frills,
|