gvarela-bluepill 0.0.27 → 0.0.28

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.27
1
+ 0.0.28
@@ -1,5 +1,4 @@
1
1
  #!/usr/bin/env ruby
2
- require 'rubygems'
3
2
  require 'optparse'
4
3
  require 'bluepill'
5
4
 
@@ -1,18 +1,27 @@
1
-
1
+ require 'rubygems'
2
2
  require 'thread'
3
3
  require 'monitor'
4
4
  require 'syslog'
5
5
  require 'timeout'
6
6
  require 'logger'
7
7
 
8
+ require "state_machine"
9
+ require "state_machine/machine"
10
+ #suck it state_machine
11
+ Class.class_eval do
12
+ def state_machine(*args, &block)
13
+ StateMachine::Machine.find_or_create(self, *args, &block)
14
+ end
15
+ end
16
+
17
+ require "daemons"
18
+
8
19
  require 'active_support/inflector'
9
20
  require 'active_support/core_ext/hash'
10
21
  require 'active_support/core_ext/numeric'
11
22
  require 'active_support/core_ext/object/misc'
12
23
  require 'active_support/duration'
13
24
 
14
- require 'state_machine'
15
-
16
25
  require 'bluepill/application'
17
26
  require 'bluepill/controller'
18
27
  require 'bluepill/socket'
@@ -1,6 +1,4 @@
1
- require "state_machine"
2
- require "daemons"
3
-
1
+ require 'state_machine'
4
2
  module Bluepill
5
3
  class Process
6
4
  CONFIGURABLE_ATTRIBUTES = [
@@ -3,6 +3,7 @@ require 'bluepill'
3
3
  require 'logger'
4
4
 
5
5
  ROOT_DIR = "/tmp/bp"
6
+ user = ENV['USER']
6
7
 
7
8
  # Watch with
8
9
  # watch -n0.2 'ps axu | egrep "(CPU|forking|bluepill|sleep)" | grep -v grep | sort'
@@ -14,7 +15,7 @@ Bluepill.application(:sample_app) do |app|
14
15
  # I could not figure out a portable way to
15
16
  # specify the path to the sample forking server across the diff developer laptops.
16
17
  # Since this code is eval'ed we cannot reliably use __FILE__
17
- process.start_command = "/Users/rohith/work/bluepill/bin/sample_forking_server #{4242 + i}"
18
+ process.start_command = "/Users/#{user}/work/gems/bluepill/bin/sample_forking_server #{4242 + i}"
18
19
  process.stop_command = "kill -INT {{PID}}"
19
20
  process.daemonize = true
20
21
 
@@ -22,7 +23,7 @@ Bluepill.application(:sample_app) do |app|
22
23
  process.restart_grace_time = 7.seconds
23
24
  process.stop_grace_time = 7.seconds
24
25
 
25
- process.uid = "rohith"
26
+ process.uid = user
26
27
  process.gid = "staff"
27
28
 
28
29
  # process.checks :cpu_usage, :every => 10, :below => 0.5, :times => [5, 5]
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: gvarela-bluepill
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.27
4
+ version: 0.0.28
5
5
  platform: ruby
6
6
  authors:
7
7
  - Arya Asemanfar