rails-dsl 0.2.0 → 0.2.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +2 -2
- data/VERSION +1 -1
- data/lib/rails-dsl/kill_server.rb +5 -4
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: d3e0a10e6c90da72b81fb2f994eba5b27f0d321d
|
4
|
+
data.tar.gz: 156343ca599ac755c44ec0304e71e0f5e3359fdb
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b82ff865c0622b449b54a5b90bfbcb99ce5bc14925880ffd751cffadc1c3cfa5abc8e1a717aebfbf35d8fc288c2b5bb44823e299d9f317bf2de8239ffcbf3017
|
7
|
+
data.tar.gz: b47a5d1fc516320d0de9942b458993a44c46929b411ded28ba344581e6ffc595fcd99dc31a5fbc658489a12a5cdc9b765dd66d28e9a280d39e84a339a59e02ee
|
data/README.md
CHANGED
@@ -13,7 +13,7 @@ like:
|
|
13
13
|
* "2011-03-12" to Date obj
|
14
14
|
* etc etc etc
|
15
15
|
|
16
|
-
if you call rails with
|
16
|
+
if you call rails with kill / k command from now on, it will kill the application by it's pid file
|
17
17
|
|
18
|
-
$ rails
|
18
|
+
$ rails kill
|
19
19
|
#> At pid: 24922 the app is killed with pidfile: /home/asdf/rails_app/tmp/pids/server.pid
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.2.
|
1
|
+
0.2.1
|
@@ -34,7 +34,7 @@ module Rails
|
|
34
34
|
|
35
35
|
def kill?
|
36
36
|
|
37
|
-
unless %W[ -k --kill ].select{|sym| ARGV.include?(sym) }.empty?
|
37
|
+
unless %W[ -k --kill kill ].select{|sym| ARGV.include?(sym) }.empty?
|
38
38
|
|
39
39
|
previous_stderr, $stderr = $stderr, StringIO.new
|
40
40
|
previous_stdout, $stdout = $stdout, StringIO.new
|
@@ -45,15 +45,16 @@ module Rails
|
|
45
45
|
$stdout= previous_stdout
|
46
46
|
|
47
47
|
Rails::Server.new.tap { |server|
|
48
|
+
|
48
49
|
# We need to require application after the server sets environment,
|
49
50
|
# otherwise the --environment option given to the server won't propagate.
|
50
51
|
require APP_PATH
|
51
52
|
Dir.chdir(Rails.application.root)
|
52
53
|
Commands::Helpers.kill(server.options[:pid])
|
53
|
-
|
54
|
+
|
54
55
|
}
|
55
56
|
|
56
|
-
|
57
|
+
Process.exit!
|
57
58
|
|
58
59
|
end
|
59
60
|
|
@@ -70,4 +71,4 @@ module Rails
|
|
70
71
|
end
|
71
72
|
end
|
72
73
|
|
73
|
-
Rails::DSL.kill?
|
74
|
+
Rails::DSL.kill?
|