spring 1.1.0.beta3 → 1.1.0.beta4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +13 -5
- data/bin/spring +1 -0
- data/lib/spring/application/boot.rb +1 -0
- data/lib/spring/application_manager.rb +8 -1
- data/lib/spring/boot.rb +0 -4
- data/lib/spring/server.rb +2 -2
- data/lib/spring/version.rb +1 -1
- data/test/acceptance/helper.rb +4 -12
- metadata +8 -9
checksums.yaml
CHANGED
@@ -1,7 +1,15 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
|
2
|
+
!binary "U0hBMQ==":
|
3
|
+
metadata.gz: !binary |-
|
4
|
+
YTc2OTBiOGJlOWQ1ODNlMDVhY2NkNWMwNjhiMzA4ZGQxNjQ1MzA3ZA==
|
5
|
+
data.tar.gz: !binary |-
|
6
|
+
ZTk3ZGJlNGVhODM1YmIxNTkwOTgzYmI4YzQ5ZGEzOWVhN2M0ZTAwYg==
|
5
7
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
|
8
|
+
metadata.gz: !binary |-
|
9
|
+
Mzk0MDdkMTAwNTc1MjNkY2UwZjZiNTIxNDJhMmJmMjkwNGU3NWU2NTQxN2Ez
|
10
|
+
ZTM5ZmUzNjdiMzk3ZjFmYTc0MTQyYjFhYzUxYmVmYjkyMTBlZjllZjAwNTA3
|
11
|
+
NGZiOWY1MGZhNGEyOTQ0MTkzMTdmZDA5ODY2YWJiMDUxNjk3NGE=
|
12
|
+
data.tar.gz: !binary |-
|
13
|
+
MjJmYmYxMmNkNWZiNzgwMGJhMThkOTcxNWU1OTkwNDdmMWIyMjQwNWE3Mzhl
|
14
|
+
Njk1MWE2NjMxMTg3Njk0ZTJmNDZmODE4NDg3YzliY2IxYzFlMzA1MTJhYzU1
|
15
|
+
NTAxODJlOWFlZGQ5MTYzMTc5N2U5MTJiYWQ3MjQ3ZmY2OTFhZjI=
|
data/bin/spring
CHANGED
@@ -21,6 +21,7 @@ if defined?(Gem)
|
|
21
21
|
|
22
22
|
if unstubbed.any?
|
23
23
|
warn "Warning: Running `gem pristine --all` to regenerate your installed gemspecs " \
|
24
|
+
"(and deleting then reinstalling your bundle if you use bundle --path) " \
|
24
25
|
"will improve the startup performance of Spring."
|
25
26
|
end
|
26
27
|
end
|
@@ -6,6 +6,7 @@ module Spring
|
|
6
6
|
@app_env = app_env
|
7
7
|
@spring_env = Env.new
|
8
8
|
@mutex = Mutex.new
|
9
|
+
@state = :running
|
9
10
|
end
|
10
11
|
|
11
12
|
def log(message)
|
@@ -26,6 +27,7 @@ module Spring
|
|
26
27
|
end
|
27
28
|
|
28
29
|
def restart
|
30
|
+
return if @state == :stopping
|
29
31
|
start_child(true)
|
30
32
|
end
|
31
33
|
|
@@ -74,7 +76,12 @@ module Spring
|
|
74
76
|
end
|
75
77
|
|
76
78
|
def stop
|
77
|
-
|
79
|
+
@state = :stopping
|
80
|
+
|
81
|
+
if pid
|
82
|
+
Process.kill('TERM', pid)
|
83
|
+
Process.wait(pid)
|
84
|
+
end
|
78
85
|
end
|
79
86
|
|
80
87
|
private
|
data/lib/spring/boot.rb
CHANGED
@@ -1,10 +1,6 @@
|
|
1
1
|
require "socket"
|
2
2
|
require "thread"
|
3
3
|
|
4
|
-
# readline must be required before we setpgid, otherwise the require may hang,
|
5
|
-
# if readline has been built against libedit. See issue #70.
|
6
|
-
require "readline"
|
7
|
-
|
8
4
|
require "spring/configuration"
|
9
5
|
require "spring/env"
|
10
6
|
require "spring/process_title_updater"
|
data/lib/spring/server.rb
CHANGED
@@ -92,13 +92,13 @@ module Spring
|
|
92
92
|
end
|
93
93
|
|
94
94
|
def shutdown
|
95
|
-
@applications.values.each(&:stop)
|
96
|
-
|
97
95
|
[env.socket_path, env.pidfile_path].each do |path|
|
98
96
|
if path.exist?
|
99
97
|
path.unlink rescue nil
|
100
98
|
end
|
101
99
|
end
|
100
|
+
|
101
|
+
@applications.values.map { |a| Thread.new { a.stop } }.map(&:join)
|
102
102
|
end
|
103
103
|
|
104
104
|
def write_pidfile
|
data/lib/spring/version.rb
CHANGED
data/test/acceptance/helper.rb
CHANGED
@@ -57,16 +57,8 @@ module Spring
|
|
57
57
|
@stderr ||= IO.pipe
|
58
58
|
end
|
59
59
|
|
60
|
-
def log_file_path
|
61
|
-
path("tmp/spring.log")
|
62
|
-
end
|
63
|
-
|
64
60
|
def log_file
|
65
|
-
@log_file ||=
|
66
|
-
tmp = path("tmp")
|
67
|
-
tmp.mkdir unless tmp.exist?
|
68
|
-
tmp.join("spring.log").open("w+")
|
69
|
-
end
|
61
|
+
@log_file ||= path("tmp/spring.log").open("w+")
|
70
62
|
end
|
71
63
|
|
72
64
|
def env
|
@@ -265,7 +257,7 @@ module Spring
|
|
265
257
|
if ENV["SPRING_DEBUG"]
|
266
258
|
puts "$ #{command}\n"
|
267
259
|
else
|
268
|
-
command = "#{command} > /dev/null"
|
260
|
+
command = "(#{command}) > /dev/null"
|
269
261
|
end
|
270
262
|
|
271
263
|
Kernel.system(command) or raise "command failed: #{command}"
|
@@ -329,8 +321,8 @@ module Spring
|
|
329
321
|
end
|
330
322
|
|
331
323
|
def copy_to(path)
|
332
|
-
|
333
|
-
|
324
|
+
system("rm -rf #{path}")
|
325
|
+
system("cp -r #{application.root} #{path}")
|
334
326
|
end
|
335
327
|
end
|
336
328
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
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.beta4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Jon Leighton
|
@@ -14,28 +14,28 @@ dependencies:
|
|
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
114
|
version: 1.3.1
|
115
115
|
requirements: []
|
116
116
|
rubyforge_project:
|
117
|
-
rubygems_version: 2.1
|
117
|
+
rubygems_version: 2.2.1
|
118
118
|
signing_key:
|
119
119
|
specification_version: 4
|
120
120
|
summary: Rails application preloader
|
@@ -128,4 +128,3 @@ 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:
|