spring 1.1.0.beta4 → 1.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +5 -13
- data/CHANGELOG.md +1 -1
- data/lib/spring/application.rb +5 -7
- data/lib/spring/application/boot.rb +5 -0
- data/lib/spring/binstub.rb +4 -3
- data/lib/spring/command_wrapper.rb +4 -1
- data/lib/spring/version.rb +1 -1
- metadata +11 -10
checksums.yaml
CHANGED
@@ -1,15 +1,7 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
|
5
|
-
data.tar.gz: !binary |-
|
6
|
-
ZTk3ZGJlNGVhODM1YmIxNTkwOTgzYmI4YzQ5ZGEzOWVhN2M0ZTAwYg==
|
2
|
+
SHA1:
|
3
|
+
metadata.gz: a2357648d0fc0f884098f352ab693e66556de6df
|
4
|
+
data.tar.gz: df070385ccdf9fbbb6d48770f21886dbab93516e
|
7
5
|
SHA512:
|
8
|
-
metadata.gz:
|
9
|
-
|
10
|
-
ZTM5ZmUzNjdiMzk3ZjFmYTc0MTQyYjFhYzUxYmVmYjkyMTBlZjllZjAwNTA3
|
11
|
-
NGZiOWY1MGZhNGEyOTQ0MTkzMTdmZDA5ODY2YWJiMDUxNjk3NGE=
|
12
|
-
data.tar.gz: !binary |-
|
13
|
-
MjJmYmYxMmNkNWZiNzgwMGJhMThkOTcxNWU1OTkwNDdmMWIyMjQwNWE3Mzhl
|
14
|
-
Njk1MWE2NjMxMTg3Njk0ZTJmNDZmODE4NDg3YzliY2IxYzFlMzA1MTJhYzU1
|
15
|
-
NTAxODJlOWFlZGQ5MTYzMTc5N2U5MTJiYWQ3MjQ3ZmY2OTFhZjI=
|
6
|
+
metadata.gz: cc65ad0c92b3a134505805c9b8ed999029b49030ab0ca8e46473c47c18a6ff17804de47897a7493e28765dc3fa6dc18df2de5beb4be7b8f6bdf04bd979d2a7da
|
7
|
+
data.tar.gz: 1b408b559590cf9a1b13da2d390d191964809107edc00c4b67e6c54384d05df1a5f9673fcc796318e1962c1f3c4e9fd49141596a3692c80b831d9cc933dd67c5
|
data/CHANGELOG.md
CHANGED
data/lib/spring/application.rb
CHANGED
@@ -31,6 +31,10 @@ module Spring
|
|
31
31
|
ENV['RAILS_ENV']
|
32
32
|
end
|
33
33
|
|
34
|
+
def app_name
|
35
|
+
spring_env.app_name
|
36
|
+
end
|
37
|
+
|
34
38
|
def log(message)
|
35
39
|
spring_env.log "[application:#{app_env}] #{message}"
|
36
40
|
end
|
@@ -107,7 +111,6 @@ module Spring
|
|
107
111
|
def run
|
108
112
|
state :running
|
109
113
|
manager.puts
|
110
|
-
update_process_title
|
111
114
|
|
112
115
|
loop do
|
113
116
|
IO.select [manager, @interrupt.first]
|
@@ -147,6 +150,7 @@ module Spring
|
|
147
150
|
trap("TERM", "DEFAULT")
|
148
151
|
|
149
152
|
ARGV.replace(args)
|
153
|
+
$0 = command.process_title
|
150
154
|
|
151
155
|
# Delete all env vars which are unchanged from before spring started
|
152
156
|
original_env.each { |k, v| ENV.delete k if ENV[k] == v }
|
@@ -269,11 +273,5 @@ module Spring
|
|
269
273
|
stream.puts("#{first}: #{error} (#{error.class})")
|
270
274
|
rest.each { |line| stream.puts("\tfrom #{line}") }
|
271
275
|
end
|
272
|
-
|
273
|
-
def update_process_title
|
274
|
-
ProcessTitleUpdater.run { |distance|
|
275
|
-
"spring app | #{spring_env.app_name} | started #{distance} ago | #{app_env} mode"
|
276
|
-
}
|
277
|
-
end
|
278
276
|
end
|
279
277
|
end
|
@@ -4,8 +4,13 @@ app = Spring::Application.new(
|
|
4
4
|
UNIXSocket.for_fd(3),
|
5
5
|
Spring::JSON.load(ENV.delete("SPRING_ORIGINAL_ENV").dup)
|
6
6
|
)
|
7
|
+
|
7
8
|
Signal.trap("TERM") { app.terminate }
|
8
9
|
Signal.trap("TTOU", "IGNORE")
|
9
10
|
|
11
|
+
Spring::ProcessTitleUpdater.run { |distance|
|
12
|
+
"spring app | #{app.app_name} | started #{distance} ago | #{app.app_env} mode"
|
13
|
+
}
|
14
|
+
|
10
15
|
app.preload if ENV.delete("SPRING_PRELOAD") == "1"
|
11
16
|
app.run
|
data/lib/spring/binstub.rb
CHANGED
@@ -1,12 +1,13 @@
|
|
1
|
-
command
|
1
|
+
command = File.basename($0)
|
2
|
+
bin_path = File.expand_path("../../../bin/spring", __FILE__)
|
2
3
|
|
3
4
|
if command == "spring"
|
4
|
-
load
|
5
|
+
load bin_path
|
5
6
|
else
|
6
7
|
disable = ENV["DISABLE_SPRING"]
|
7
8
|
|
8
9
|
if Process.respond_to?(:fork) && (disable.nil? || disable.empty? || disable == "0")
|
9
10
|
ARGV.unshift(command)
|
10
|
-
load
|
11
|
+
load bin_path
|
11
12
|
end
|
12
13
|
end
|
@@ -37,11 +37,14 @@ module Spring
|
|
37
37
|
if command.respond_to?(:call)
|
38
38
|
command.call
|
39
39
|
else
|
40
|
-
$0 = exec
|
41
40
|
load exec
|
42
41
|
end
|
43
42
|
end
|
44
43
|
|
44
|
+
def process_title
|
45
|
+
["spring", name, *ARGV].join(" ")
|
46
|
+
end
|
47
|
+
|
45
48
|
def gem_name
|
46
49
|
if command.respond_to?(:gem_name)
|
47
50
|
command.gem_name
|
data/lib/spring/version.rb
CHANGED
metadata
CHANGED
@@ -1,41 +1,41 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: spring
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.1.0
|
4
|
+
version: 1.1.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Jon Leighton
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-01-
|
11
|
+
date: 2014-01-17 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activesupport
|
15
15
|
requirement: !ruby/object:Gem::Requirement
|
16
16
|
requirements:
|
17
|
-
- -
|
17
|
+
- - '>='
|
18
18
|
- !ruby/object:Gem::Version
|
19
19
|
version: '0'
|
20
20
|
type: :development
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
|
-
- -
|
24
|
+
- - '>='
|
25
25
|
- !ruby/object:Gem::Version
|
26
26
|
version: '0'
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: rake
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
30
30
|
requirements:
|
31
|
-
- -
|
31
|
+
- - '>='
|
32
32
|
- !ruby/object:Gem::Version
|
33
33
|
version: '0'
|
34
34
|
type: :development
|
35
35
|
prerelease: false
|
36
36
|
version_requirements: !ruby/object:Gem::Requirement
|
37
37
|
requirements:
|
38
|
-
- -
|
38
|
+
- - '>='
|
39
39
|
- !ruby/object:Gem::Version
|
40
40
|
version: '0'
|
41
41
|
description: Rails application preloader
|
@@ -104,17 +104,17 @@ require_paths:
|
|
104
104
|
- lib
|
105
105
|
required_ruby_version: !ruby/object:Gem::Requirement
|
106
106
|
requirements:
|
107
|
-
- -
|
107
|
+
- - '>='
|
108
108
|
- !ruby/object:Gem::Version
|
109
109
|
version: '0'
|
110
110
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
111
111
|
requirements:
|
112
|
-
- -
|
112
|
+
- - '>='
|
113
113
|
- !ruby/object:Gem::Version
|
114
|
-
version:
|
114
|
+
version: '0'
|
115
115
|
requirements: []
|
116
116
|
rubyforge_project:
|
117
|
-
rubygems_version: 2.
|
117
|
+
rubygems_version: 2.1.9
|
118
118
|
signing_key:
|
119
119
|
specification_version: 4
|
120
120
|
summary: Rails application preloader
|
@@ -128,3 +128,4 @@ test_files:
|
|
128
128
|
- test/unit/commands_test.rb
|
129
129
|
- test/unit/process_title_updater_test.rb
|
130
130
|
- test/unit/watcher_test.rb
|
131
|
+
has_rdoc:
|