ey_stonith 0.3.4 → 0.3.5

Sign up to get free protection for your applications and to get access to all the features.
Files changed (3) hide show
  1. data/bin/stonith-cron +1 -0
  2. data/lib/ey_stonith.rb +6 -1
  3. metadata +3 -3
data/bin/stonith-cron CHANGED
@@ -1,5 +1,6 @@
1
1
  #!/usr/bin/env ruby
2
2
  $LOAD_PATH.unshift(File.expand_path('../../lib/', __FILE__))
3
+ ENV['CRON'] = 'true'
3
4
  require 'ey_stonith'
4
5
 
5
6
  EY::Stonith::Commands::Cron.new(ARGV).call
data/lib/ey_stonith.rb CHANGED
@@ -26,7 +26,12 @@ module EY
26
26
  HEALTH_PATH = '/health' unless defined? HEALTH_PATH
27
27
  TAKEOVER_PATH = '/takeover' unless defined? TAKEOVER_PATH
28
28
 
29
- def self.log_to(io) @@logger = Logger.new io end
29
+ def self.log_to(io)
30
+ @@logger = Logger.new io
31
+ logger.progname = ENV['CRON'] ? "(cron)" : "(#{`whoami`.chomp})"
32
+ logger
33
+ end
34
+
30
35
  def self.logger() @@logger end
31
36
 
32
37
  ### For Rackapp ###
metadata CHANGED
@@ -5,8 +5,8 @@ version: !ruby/object:Gem::Version
5
5
  segments:
6
6
  - 0
7
7
  - 3
8
- - 4
9
- version: 0.3.4
8
+ - 5
9
+ version: 0.3.5
10
10
  platform: ruby
11
11
  authors:
12
12
  - Ezra Zygmuntowicz
@@ -16,7 +16,7 @@ autorequire:
16
16
  bindir: bin
17
17
  cert_chain: []
18
18
 
19
- date: 2010-05-24 00:00:00 -07:00
19
+ date: 2010-07-14 00:00:00 -07:00
20
20
  default_executable:
21
21
  dependencies:
22
22
  - !ruby/object:Gem::Dependency