evented_bluepill 0.0.50 → 0.0.51
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/CHANGELOG.md +4 -0
- data/lib/evented_bluepill/controller.rb +5 -3
- data/lib/evented_bluepill/options.rb +3 -3
- data/lib/evented_bluepill/version.rb +1 -1
- metadata +17 -17
data/CHANGELOG.md
CHANGED
@@ -3,6 +3,8 @@ require 'fileutils'
|
|
3
3
|
require 'rbconfig'
|
4
4
|
|
5
5
|
require 'evented_bluepill/options'
|
6
|
+
require 'evented_bluepill/system'
|
7
|
+
require 'evented_bluepill/socket'
|
6
8
|
|
7
9
|
module EventedBluepill
|
8
10
|
class Controller
|
@@ -98,7 +100,7 @@ module EventedBluepill
|
|
98
100
|
def cleanup_bluepill_directory
|
99
101
|
EventedBluepill::Options.running_applications.each do |app|
|
100
102
|
pid = pid_for(app)
|
101
|
-
if !pid || !System.pid_alive?(pid)
|
103
|
+
if !pid || !EventedBluepill::System.pid_alive?(pid)
|
102
104
|
pid_file = File.join(EventedBluepill::Options.pids_dir, "#{app}.pid")
|
103
105
|
sock_file = File.join(EventedBluepill::Options.sockets_dir, "#{app}.sock")
|
104
106
|
File.unlink(pid_file) if File.exists?(pid_file)
|
@@ -108,7 +110,7 @@ module EventedBluepill
|
|
108
110
|
end
|
109
111
|
|
110
112
|
def pid_for(app)
|
111
|
-
pid_file = File.join(
|
113
|
+
pid_file = File.join(EventedBluepill::Options.pids_dir, "#{app}.pid")
|
112
114
|
File.exists?(pid_file) && File.read(pid_file).to_i
|
113
115
|
end
|
114
116
|
|
@@ -120,7 +122,7 @@ module EventedBluepill
|
|
120
122
|
|
121
123
|
def verify_version!(application)
|
122
124
|
begin
|
123
|
-
version = Socket.client_command(base_dir, application, "version")
|
125
|
+
version = EventedBluepill::Socket.client_command(base_dir, application, "version")
|
124
126
|
if version != EventedBluepill::VERSION::STRING
|
125
127
|
abort("The running version of your daemon seems to be out of date.\nDaemon Version: #{version}, CLI Version: #{EventedBluepill::VERSION::STRING}")
|
126
128
|
end
|
@@ -94,14 +94,14 @@ module EventedBluepill
|
|
94
94
|
def parse_application!
|
95
95
|
if running_applications.include?(File.basename($0)) && File.symlink?($0)
|
96
96
|
# evented_bluepill was called as a symlink with the name of the target application
|
97
|
-
options[:application] = File.basename($0)
|
97
|
+
@options[:application] = File.basename($0)
|
98
98
|
elsif running_applications.include?(ARGV.first)
|
99
99
|
# the first arg is the application name
|
100
|
-
options[:application] = ARGV.shift
|
100
|
+
@options[:application] = ARGV.shift
|
101
101
|
elsif APPLICATION_COMMANDS.include?(ARGV.first)
|
102
102
|
if running_applications.length == 1
|
103
103
|
# there is only one, let's just use that
|
104
|
-
options[:application] = running_applications.first
|
104
|
+
@options[:application] = running_applications.first
|
105
105
|
elsif running_applications.length > 1
|
106
106
|
# There is more than one, tell them the list and exit
|
107
107
|
$stderr.puts "You must specify an application name to run that command. Here's the list of running applications:"
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: evented_bluepill
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.51
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -17,7 +17,7 @@ default_executable:
|
|
17
17
|
dependencies:
|
18
18
|
- !ruby/object:Gem::Dependency
|
19
19
|
name: daemons
|
20
|
-
requirement: &
|
20
|
+
requirement: &2162025840 !ruby/object:Gem::Requirement
|
21
21
|
none: false
|
22
22
|
requirements:
|
23
23
|
- - ~>
|
@@ -25,10 +25,10 @@ dependencies:
|
|
25
25
|
version: 1.1.0
|
26
26
|
type: :runtime
|
27
27
|
prerelease: false
|
28
|
-
version_requirements: *
|
28
|
+
version_requirements: *2162025840
|
29
29
|
- !ruby/object:Gem::Dependency
|
30
30
|
name: blankslate
|
31
|
-
requirement: &
|
31
|
+
requirement: &2162025340 !ruby/object:Gem::Requirement
|
32
32
|
none: false
|
33
33
|
requirements:
|
34
34
|
- - ~>
|
@@ -36,10 +36,10 @@ dependencies:
|
|
36
36
|
version: 2.1.2.3
|
37
37
|
type: :runtime
|
38
38
|
prerelease: false
|
39
|
-
version_requirements: *
|
39
|
+
version_requirements: *2162025340
|
40
40
|
- !ruby/object:Gem::Dependency
|
41
41
|
name: state_machine
|
42
|
-
requirement: &
|
42
|
+
requirement: &2162024880 !ruby/object:Gem::Requirement
|
43
43
|
none: false
|
44
44
|
requirements:
|
45
45
|
- - ~>
|
@@ -47,10 +47,10 @@ dependencies:
|
|
47
47
|
version: 0.9.4
|
48
48
|
type: :runtime
|
49
49
|
prerelease: false
|
50
|
-
version_requirements: *
|
50
|
+
version_requirements: *2162024880
|
51
51
|
- !ruby/object:Gem::Dependency
|
52
52
|
name: activesupport
|
53
|
-
requirement: &
|
53
|
+
requirement: &2162024420 !ruby/object:Gem::Requirement
|
54
54
|
none: false
|
55
55
|
requirements:
|
56
56
|
- - ~>
|
@@ -58,10 +58,10 @@ dependencies:
|
|
58
58
|
version: 3.0.0
|
59
59
|
type: :runtime
|
60
60
|
prerelease: false
|
61
|
-
version_requirements: *
|
61
|
+
version_requirements: *2162024420
|
62
62
|
- !ruby/object:Gem::Dependency
|
63
63
|
name: i18n
|
64
|
-
requirement: &
|
64
|
+
requirement: &2162023960 !ruby/object:Gem::Requirement
|
65
65
|
none: false
|
66
66
|
requirements:
|
67
67
|
- - ~>
|
@@ -69,10 +69,10 @@ dependencies:
|
|
69
69
|
version: 0.5.0
|
70
70
|
type: :runtime
|
71
71
|
prerelease: false
|
72
|
-
version_requirements: *
|
72
|
+
version_requirements: *2162023960
|
73
73
|
- !ruby/object:Gem::Dependency
|
74
74
|
name: cool.io
|
75
|
-
requirement: &
|
75
|
+
requirement: &2162023500 !ruby/object:Gem::Requirement
|
76
76
|
none: false
|
77
77
|
requirements:
|
78
78
|
- - ~>
|
@@ -80,10 +80,10 @@ dependencies:
|
|
80
80
|
version: 1.0.0
|
81
81
|
type: :runtime
|
82
82
|
prerelease: false
|
83
|
-
version_requirements: *
|
83
|
+
version_requirements: *2162023500
|
84
84
|
- !ruby/object:Gem::Dependency
|
85
85
|
name: minitest
|
86
|
-
requirement: &
|
86
|
+
requirement: &2162023040 !ruby/object:Gem::Requirement
|
87
87
|
none: false
|
88
88
|
requirements:
|
89
89
|
- - ~>
|
@@ -91,10 +91,10 @@ dependencies:
|
|
91
91
|
version: 2.0.2
|
92
92
|
type: :development
|
93
93
|
prerelease: false
|
94
|
-
version_requirements: *
|
94
|
+
version_requirements: *2162023040
|
95
95
|
- !ruby/object:Gem::Dependency
|
96
96
|
name: mocha
|
97
|
-
requirement: &
|
97
|
+
requirement: &2162022580 !ruby/object:Gem::Requirement
|
98
98
|
none: false
|
99
99
|
requirements:
|
100
100
|
- - ~>
|
@@ -102,7 +102,7 @@ dependencies:
|
|
102
102
|
version: 0.9.12
|
103
103
|
type: :development
|
104
104
|
prerelease: false
|
105
|
-
version_requirements: *
|
105
|
+
version_requirements: *2162022580
|
106
106
|
description: EventedBluepill keeps your daemons up while taking up as little resources
|
107
107
|
as possible. After all you probably want the resources of your server to be used
|
108
108
|
by whatever daemons you are running rather than the thing that's supposed to make
|