procmon 0.0.1 → 0.0.2

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,3 +1,5 @@
1
+ require 'net/smtp'
2
+
1
3
  module Procmon
2
4
  module Notifiers
3
5
  class Email < Notifier
@@ -8,8 +10,17 @@ module Procmon
8
10
  target = NOTIFICATION_TARGET
9
11
  end
10
12
 
11
- puts "Need to email #{target} the following"
12
- puts notification
13
+ message = <<MESSAGE_END
14
+ From: Procmon <procmon>
15
+ To: #{target}
16
+ Subject: Procmon notification
17
+
18
+ #{notification}
19
+ MESSAGE_END
20
+
21
+ Net::SMTP.start('localhost') do |smtp|
22
+ smtp.send_message message, 'procmon', target
23
+ end
13
24
  end
14
25
  end
15
26
  end
@@ -1,3 +1,3 @@
1
1
  module Procmon
2
- VERSION = "0.0.1".freeze
2
+ VERSION = "0.0.2".freeze
3
3
  end
metadata CHANGED
@@ -1,7 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: procmon
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.1
4
+ hash: 27
5
+ prerelease:
6
+ segments:
7
+ - 0
8
+ - 0
9
+ - 2
10
+ version: 0.0.2
5
11
  platform: ruby
6
12
  authors:
7
13
  - Darren Dao
@@ -9,29 +15,40 @@ autorequire:
9
15
  bindir: bin
10
16
  cert_chain: []
11
17
 
12
- date: 2011-11-15 00:00:00 -08:00
13
- default_executable:
18
+ date: 2011-11-15 00:00:00 Z
14
19
  dependencies:
15
20
  - !ruby/object:Gem::Dependency
16
21
  name: activesupport
17
- type: :runtime
18
- version_requirement:
19
- version_requirements: !ruby/object:Gem::Requirement
22
+ prerelease: false
23
+ requirement: &id001 !ruby/object:Gem::Requirement
24
+ none: false
20
25
  requirements:
21
26
  - - ">="
22
27
  - !ruby/object:Gem::Version
28
+ hash: 7
29
+ segments:
30
+ - 3
31
+ - 0
32
+ - 0
23
33
  version: 3.0.0
24
- version:
34
+ type: :runtime
35
+ version_requirements: *id001
25
36
  - !ruby/object:Gem::Dependency
26
37
  name: i18n
27
- type: :runtime
28
- version_requirement:
29
- version_requirements: !ruby/object:Gem::Requirement
38
+ prerelease: false
39
+ requirement: &id002 !ruby/object:Gem::Requirement
40
+ none: false
30
41
  requirements:
31
42
  - - ">="
32
43
  - !ruby/object:Gem::Version
44
+ hash: 11
45
+ segments:
46
+ - 0
47
+ - 5
48
+ - 0
33
49
  version: 0.5.0
34
- version:
50
+ type: :runtime
51
+ version_requirements: *id002
35
52
  description: Procmon allows you to check on processes and then perform arbitary actions based on the result of the checks. For example, you can send notification when mem usage is too high, or you can restart a process if it's dead, etc. It is not meant to run as a daemon. It is designed to be invoked manually or via cron.
36
53
  email:
37
54
  - darrendao@gmail.com
@@ -60,7 +77,6 @@ files:
60
77
  - lib/procmon/version.rb
61
78
  - lib/test.rb
62
79
  - procmon.gemspec
63
- has_rdoc: true
64
80
  homepage: http://github.com/darrendao/procmon
65
81
  licenses: []
66
82
 
@@ -70,21 +86,27 @@ rdoc_options: []
70
86
  require_paths:
71
87
  - lib
72
88
  required_ruby_version: !ruby/object:Gem::Requirement
89
+ none: false
73
90
  requirements:
74
91
  - - ">="
75
92
  - !ruby/object:Gem::Version
93
+ hash: 3
94
+ segments:
95
+ - 0
76
96
  version: "0"
77
- version:
78
97
  required_rubygems_version: !ruby/object:Gem::Requirement
98
+ none: false
79
99
  requirements:
80
100
  - - ">="
81
101
  - !ruby/object:Gem::Version
102
+ hash: 3
103
+ segments:
104
+ - 0
82
105
  version: "0"
83
- version:
84
106
  requirements: []
85
107
 
86
108
  rubyforge_project:
87
- rubygems_version: 1.3.5
109
+ rubygems_version: 1.8.11
88
110
  signing_key:
89
111
  specification_version: 3
90
112
  summary: A process monitor written in Ruby. Concepts and design are based on Bluepill and God, but with emphasis on simplicity and extensibility.