rake_server 0.0.7 → 0.0.8

Sign up to get free protection for your applications and to get access to all the features.
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.0.7
1
+ 0.0.8
@@ -29,18 +29,25 @@ module RakeServer
29
29
  read.close
30
30
  fork do
31
31
  Process.setsid
32
- run(eager_tasks, options) do
33
- write.write(Process.pid.to_s)
34
- write.close
35
- STDIN.reopen('/dev/null')
36
- STDOUT.reopen('/dev/null')
37
- STDERR.reopen(STDOUT)
32
+ begin
33
+ run(eager_tasks, options) do
34
+ write.write(Process.pid.to_s)
35
+ write.close
36
+ STDIN.reopen('/dev/null')
37
+ STDOUT.reopen('/dev/null')
38
+ STDERR.reopen(STDOUT)
39
+ end
40
+ rescue => e
41
+ write.write(e.message)
38
42
  end
39
43
  end
40
44
  write.close
41
45
  end
42
46
  write.close
43
- pid = read.read.to_i
47
+ status = read.read
48
+ if status =~ /^\d+/ then pid = status.to_i
49
+ else raise(status)
50
+ end
44
51
  File.open(pid_file, 'w') { |f| f << pid }
45
52
  read.close
46
53
  Process.waitpid(tmp_pid)
data/rake_server.gemspec CHANGED
@@ -5,11 +5,11 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = %q{rake_server}
8
- s.version = "0.0.7"
8
+ s.version = "0.0.8"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["Mat Brown", "Cedric Howe"]
12
- s.date = %q{2010-04-19}
12
+ s.date = %q{2010-04-23}
13
13
  s.description = %q{RakeServer is a library which allows Rake tasks to be run using client requests
14
14
  to a long-running rake server, which can eagerly load required code into memory
15
15
  for fast task invocation.
data/test/Rakefile CHANGED
@@ -22,6 +22,10 @@ task :hello do
22
22
  puts "Hello, world!"
23
23
  end
24
24
 
25
+ task :faile do
26
+ raise("Faile")
27
+ end
28
+
25
29
  task :setup_server do
26
30
  RakeServer::Server.before_fork do
27
31
  `notify-send "#{Process.pid}"`
metadata CHANGED
@@ -5,8 +5,8 @@ version: !ruby/object:Gem::Version
5
5
  segments:
6
6
  - 0
7
7
  - 0
8
- - 7
9
- version: 0.0.7
8
+ - 8
9
+ version: 0.0.8
10
10
  platform: ruby
11
11
  authors:
12
12
  - Mat Brown
@@ -15,7 +15,7 @@ autorequire:
15
15
  bindir: bin
16
16
  cert_chain: []
17
17
 
18
- date: 2010-04-19 00:00:00 -04:00
18
+ date: 2010-04-23 00:00:00 -04:00
19
19
  default_executable:
20
20
  dependencies: []
21
21