guard-rails 0.4.4 → 0.4.5
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +1 -1
- data/Rakefile +2 -6
- data/VERSION +1 -1
- data/lib/guard/rails/runner.rb +16 -7
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 83779b3970067b635fd096eec98a5ff0c9614352
|
4
|
+
data.tar.gz: 39ef4bb2fbef9290ad1da8422527d88f106c9b55
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 3a79fc3e85b8219dbb7d6ff8cd274dcf3cebd7da1f4cf3eaddbd2e71b8bebe5a267e32d3bd9d2c3f62b99899e0ff85fe3b20757a265f1f200b7e18515ff592aa
|
7
|
+
data.tar.gz: 131b2580e8a82b5a4598da3216fa7c5c6f66b360b3eb1c3f6c6e2e940b81634cc5e0d765ff928361715b220ec83c1eba3cfd294e910369be129fd38939ae9fa7
|
data/README.md
CHANGED
@@ -52,7 +52,7 @@ Now I can automatically restart your Rails development server as your files chan
|
|
52
52
|
## Philosophy
|
53
53
|
|
54
54
|
* **All Platforms** MRI is the main test case. But will be tested under REE and JRuby.
|
55
|
-
* **Live in edge**
|
55
|
+
* **Live in edge** Ruby 1.8.7 has been deprecated. Guard-Rails will be tested under Ruby 1.9.3, 2.0.0 with newest gems. Will be rewrited with features of Ruby 2.0.0 as version 1.0.0.
|
56
56
|
* [Semantic Version](http://semver.org/)
|
57
57
|
|
58
58
|
## Contribute
|
data/Rakefile
CHANGED
@@ -8,13 +8,13 @@ require 'rake/version_task'
|
|
8
8
|
Rake::VersionTask.new
|
9
9
|
|
10
10
|
include Rake::DSL if defined?(Rake::DSL)
|
11
|
-
RVM_PREFIX = "rvm
|
11
|
+
RVM_PREFIX = "rvm jruby,1.9.3,2.0.0 do"
|
12
12
|
|
13
13
|
|
14
14
|
namespace :spec do
|
15
15
|
desc "Run on three Rubies"
|
16
16
|
task :platforms do
|
17
|
-
exit $?.exitstatus unless system "#{RVM_PREFIX} bundle install"
|
17
|
+
exit $?.exitstatus unless system "#{RVM_PREFIX} bundle install 2>&1 1>/dev/null "
|
18
18
|
exit $?.exitstatus unless system "#{RVM_PREFIX} bundle exec rake spec"
|
19
19
|
end
|
20
20
|
end
|
@@ -26,10 +26,6 @@ task :publish do
|
|
26
26
|
system %{git push origin}
|
27
27
|
system %{git push guard}
|
28
28
|
system %{git push gitcafe}
|
29
|
-
end
|
30
|
-
|
31
|
-
desc 'Push tags'
|
32
|
-
task :publish_tags do
|
33
29
|
system %{git push origin --tags}
|
34
30
|
system %{git push guard --tags}
|
35
31
|
system %{git push gitcafe --tags}
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.4.
|
1
|
+
0.4.5
|
data/lib/guard/rails/runner.rb
CHANGED
@@ -19,12 +19,12 @@ module Guard
|
|
19
19
|
|
20
20
|
def stop
|
21
21
|
if File.file?(pid_file)
|
22
|
-
pid = File.read(pid_file).strip
|
23
|
-
|
24
|
-
wait_for_no_pid if
|
22
|
+
pid = File.read(pid_file).strip.to_i
|
23
|
+
sig_sent = kill_process("INT", pid)
|
24
|
+
wait_for_no_pid if sig_sent
|
25
25
|
|
26
26
|
# If you lost your pid_file, you are already died.
|
27
|
-
|
27
|
+
kill_process("KILL", pid)
|
28
28
|
FileUtils.rm pid_file, :force => true
|
29
29
|
end
|
30
30
|
end
|
@@ -38,7 +38,7 @@ module Guard
|
|
38
38
|
command = build_cli_command if options[:CLI]
|
39
39
|
command ||= build_zeus_command if options[:zeus]
|
40
40
|
command ||= build_rails_command
|
41
|
-
"
|
41
|
+
"sh -c 'cd \"#{@root}\" && #{command} &'"
|
42
42
|
end
|
43
43
|
|
44
44
|
def environment
|
@@ -96,7 +96,7 @@ module Guard
|
|
96
96
|
end
|
97
97
|
|
98
98
|
def run_rails_command!
|
99
|
-
system
|
99
|
+
system(environment, build_command)
|
100
100
|
end
|
101
101
|
|
102
102
|
def has_pid?
|
@@ -109,7 +109,7 @@ module Guard
|
|
109
109
|
|
110
110
|
def kill_unmanaged_pid!
|
111
111
|
if pid = unmanaged_pid
|
112
|
-
|
112
|
+
kill_process("KILL", pid)
|
113
113
|
FileUtils.rm pid_file
|
114
114
|
wait_for_no_pid
|
115
115
|
end
|
@@ -143,5 +143,14 @@ module Guard
|
|
143
143
|
end
|
144
144
|
!(count == MAX_WAIT_COUNT)
|
145
145
|
end
|
146
|
+
|
147
|
+
def kill_process(signal, pid)
|
148
|
+
begin
|
149
|
+
Process.kill(signal, pid)
|
150
|
+
true
|
151
|
+
rescue Errno::EINVAL, Errno::ESRCH, RangeError
|
152
|
+
false
|
153
|
+
end
|
154
|
+
end
|
146
155
|
end
|
147
156
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: guard-rails
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.4.
|
4
|
+
version: 0.4.5
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- John Bintz
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2013-
|
12
|
+
date: 2013-07-04 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: guard
|