ace-eye 0.6.3 → 0.6.4

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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: aca23394b949b528179b9aa284f4fe56065a087b
4
- data.tar.gz: 89c12655a1603445e0c3ec3fd3e10ecdd133792f
3
+ metadata.gz: c4d8c99104efffae767e2edb44b6f1413a036037
4
+ data.tar.gz: 00d8ac5e9563620d175283e7473d9d2b982bfb16
5
5
  SHA512:
6
- metadata.gz: 30f7eff0a3a41caf1ccb6a2e744ea5bd276c66ac903094ab6475b377f049b8041b2df27ed78c626d5c58861fe8e2485938115eb3deb99ea554bb005b877d81f0
7
- data.tar.gz: 131027ef4347302079789b99692f3f36e4a403f5c5f57611b4be38a3ad5c04832216038e72fd99125f8299b581eb2421a5331259029ecec6e073820ab8a2fed7
6
+ metadata.gz: 1fae32093dceebf1c7e4f75fdf5b2dc42e5920336989d02c059e42b08544842cda1d1f6d11a32c19ec7990f10fd83f60025a9d4b175f66af73b452b571d9bc8f
7
+ data.tar.gz: e7c09a473d1762765f3a2b11d0afce81af029a62a54c5f18e29b90572eb01c8a600a27cdc4ec605a216a755dc5d5c9f1ae5326d4b723df8afe697c2eeb6aa407
data/CHANGES.md CHANGED
@@ -1,3 +1,9 @@
1
+ 0.6.1
2
+ ------
3
+ * Add log rotation gem (https://github.com/kostya/eye-rotate)
4
+ * Add option to clear environment variables #64
5
+ * Get group names from /etc/group via Etc#getgrnam #63
6
+
1
7
  0.6
2
8
  ------
3
9
  * add processes dependencies (#43)
data/lib/eye.rb CHANGED
@@ -1,5 +1,5 @@
1
1
  module Eye
2
- VERSION = "0.6.3"
2
+ VERSION = "0.6.4"
3
3
  ABOUT = "Eye v#{VERSION} (c) 2012-2014 @kostya"
4
4
  PROCLINE = "eye monitoring v#{VERSION}"
5
5
 
@@ -25,8 +25,10 @@ module Eye::Dsl::Main
25
25
  def load(glob = '')
26
26
  return if glob.blank?
27
27
 
28
+ loaded = false
28
29
  Eye::Dsl::Opts.with_parsed_file(glob) do |mask|
29
30
  Dir[mask].each do |path|
31
+ loaded = true
30
32
  Eye::Dsl.debug "=> load #{path}"
31
33
  Eye.parsed_filename = path
32
34
  res = Kernel.load(path)
@@ -34,6 +36,11 @@ module Eye::Dsl::Main
34
36
  Eye::Dsl.debug "<= load #{path}"
35
37
  end
36
38
  end
39
+
40
+ unless loaded
41
+ puts "Warning! Eye.load not found: '#{glob}'"
42
+ warn "not found: '#{glob}'"
43
+ end
37
44
  end
38
45
 
39
46
  def config(&block)
@@ -36,7 +36,7 @@ class Eye::Notify
36
36
  type = nh[:type]
37
37
  config = (settings[type] || {}).merge(nh[:opts] || {}).merge(:contact => nh[:contact])
38
38
  klass = get_class(type)
39
- notify = klass.new(config, message_h)
39
+ notify = klass.new_link(config, message_h)
40
40
  notify.async_notify if notify
41
41
  end
42
42
 
@@ -1,5 +1,7 @@
1
1
  module Eye::Process::Notify
2
2
 
3
+ trap_exit :notify_died
4
+
3
5
  # notify to user:
4
6
  # 1) process crashed by itself, and we restart it [:info]
5
7
  # 2) checker bounded to restart process [:warn]
@@ -23,10 +25,14 @@ module Eye::Process::Notify
23
25
  end
24
26
  end
25
27
 
28
+ def notify_died(actor, reason)
29
+ error "NOTIFY DIED: #{actor.inspect} has died because of a #{reason.class}"
30
+ end
31
+
26
32
  private
27
33
 
28
34
  def ilevel(level)
29
35
  LEVELS[level].to_i
30
36
  end
31
37
 
32
- end
38
+ end
@@ -28,6 +28,16 @@ module Eye::Process::Validate
28
28
  raise Error, "working_dir '#{config[:working_dir]}' is invalid" unless File.directory?(config[:working_dir])
29
29
  end
30
30
  end
31
+
32
+ if config[:stop_signals]
33
+ s = config[:stop_signals].clone
34
+ while s.present?
35
+ sig = s.shift
36
+ timeout = s.shift
37
+ raise Error, "signal should be String, Symbol, Fixnum, not #{sig.inspect}" if sig && ![String, Symbol, Fixnum].include?(sig.class)
38
+ raise Error, "signal sleep should be Numeric, not #{timeout.inspect}" if timeout && ![Fixnum, Float].include?(timeout.class)
39
+ end
40
+ end
31
41
  end
32
42
 
33
43
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ace-eye
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.6.3
4
+ version: 0.6.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Konstantin Makarchev
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-06-06 00:00:00.000000000 Z
11
+ date: 2014-06-19 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: celluloid