fyi 1.0.9 → 1.0.10
Sign up to get free protection for your applications and to get access to all the features.
- data/README.md +4 -4
- data/config_example.yml +3 -3
- data/fyi.gemspec +2 -2
- data/lib/fyi/config.rb +3 -1
- data/lib/fyi/core_ext.rb +2 -1
- data/lib/fyi/notifiers/email.rb +6 -6
- data/lib/fyi/version.rb +1 -1
- metadata +20 -8
data/README.md
CHANGED
@@ -6,7 +6,7 @@ Find out what cron is doing.
|
|
6
6
|
## Synopsis
|
7
7
|
|
8
8
|
fyi some_command
|
9
|
-
|
9
|
+
|
10
10
|
|
11
11
|
## Examples
|
12
12
|
|
@@ -22,7 +22,7 @@ happened. This is useful when `some_command` is executed
|
|
22
22
|
asynchronously, e.g. via cron, and you want to know how it
|
23
23
|
went without cluttering up your crontab with pipe redirections.
|
24
24
|
|
25
|
-
When `fyi` executes `some_command` it captures standard out,
|
25
|
+
When `fyi` executes `some_command` it captures standard out,
|
26
26
|
standard error, and whether `some_command` succeeded or failed.
|
27
27
|
These are then reported by any notifiers you have configured.
|
28
28
|
Success is defined by a 0 exit code and failure by a non-zero
|
@@ -56,7 +56,7 @@ A notifier must:
|
|
56
56
|
|
57
57
|
## Installation
|
58
58
|
|
59
|
-
|
59
|
+
gem install fyi
|
60
60
|
|
61
61
|
|
62
62
|
## Configuration
|
@@ -69,7 +69,7 @@ The key-value pairs in each notifier section are passed in
|
|
69
69
|
a hash to the notifier class at instantiation.
|
70
70
|
|
71
71
|
|
72
|
-
## Problems
|
72
|
+
## Problems
|
73
73
|
|
74
74
|
Please use GitHub's [issue tracker](http://github.com/airblade/fyi/issues).
|
75
75
|
|
data/config_example.yml
CHANGED
@@ -12,9 +12,9 @@ email:
|
|
12
12
|
from: fyi@yourdomain.com
|
13
13
|
to: you@yourdomain.com
|
14
14
|
smtp:
|
15
|
-
|
15
|
+
address: smtp.yourserver.com
|
16
16
|
port: 25
|
17
|
-
|
17
|
+
user_name: username
|
18
18
|
password: password
|
19
|
-
|
19
|
+
authentication: :login
|
20
20
|
domain: yourdomain.com
|
data/fyi.gemspec
CHANGED
@@ -17,6 +17,6 @@ Gem::Specification.new do |s|
|
|
17
17
|
s.files += Dir.glob("lib/**/*")
|
18
18
|
s.executables = %w( fyi )
|
19
19
|
s.extra_rdoc_files = %w( README.md )
|
20
|
-
s.add_dependency 'pony', ['>=
|
21
|
-
s.add_dependency 'systemu', ['>= 0']
|
20
|
+
s.add_dependency 'pony', ['>= 1.3']
|
21
|
+
s.add_dependency 'systemu', ['>= 2.4.0']
|
22
22
|
end
|
data/lib/fyi/config.rb
CHANGED
data/lib/fyi/core_ext.rb
CHANGED
@@ -1,4 +1,5 @@
|
|
1
|
-
#
|
1
|
+
# Thanks ActiveSupport:
|
2
|
+
# https://github.com/rails/rails/blob/v3.0.9/activesupport/lib/active_support/inflector/methods.rb#L89
|
2
3
|
#
|
3
4
|
# Ruby 1.9 introduces an inherit argument for Module#const_get and
|
4
5
|
# #const_defined? and changes their default behavior.
|
data/lib/fyi/notifiers/email.rb
CHANGED
@@ -48,12 +48,12 @@ class Fyi
|
|
48
48
|
end
|
49
49
|
|
50
50
|
def send_email command, result, duration, output, error, host
|
51
|
-
Pony.mail :to
|
52
|
-
:from
|
53
|
-
:subject
|
54
|
-
:body
|
55
|
-
:via
|
56
|
-
:
|
51
|
+
Pony.mail :to => @to,
|
52
|
+
:from => @from,
|
53
|
+
:subject => subject(command, result),
|
54
|
+
:body => body(command, duration, output, error, host),
|
55
|
+
:via => :smtp,
|
56
|
+
:via_options => @smtp
|
57
57
|
end
|
58
58
|
|
59
59
|
def subject command, result
|
data/lib/fyi/version.rb
CHANGED
metadata
CHANGED
@@ -1,12 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: fyi
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
|
4
|
+
hash: 3
|
5
|
+
prerelease:
|
5
6
|
segments:
|
6
7
|
- 1
|
7
8
|
- 0
|
8
|
-
-
|
9
|
-
version: 1.0.
|
9
|
+
- 10
|
10
|
+
version: 1.0.10
|
10
11
|
platform: ruby
|
11
12
|
authors:
|
12
13
|
- Andy Stewart
|
@@ -14,31 +15,38 @@ autorequire:
|
|
14
15
|
bindir: bin
|
15
16
|
cert_chain: []
|
16
17
|
|
17
|
-
date:
|
18
|
+
date: 2011-10-21 00:00:00 +02:00
|
18
19
|
default_executable:
|
19
20
|
dependencies:
|
20
21
|
- !ruby/object:Gem::Dependency
|
21
22
|
name: pony
|
22
23
|
prerelease: false
|
23
24
|
requirement: &id001 !ruby/object:Gem::Requirement
|
25
|
+
none: false
|
24
26
|
requirements:
|
25
27
|
- - ">="
|
26
28
|
- !ruby/object:Gem::Version
|
29
|
+
hash: 9
|
27
30
|
segments:
|
28
|
-
-
|
29
|
-
|
31
|
+
- 1
|
32
|
+
- 3
|
33
|
+
version: "1.3"
|
30
34
|
type: :runtime
|
31
35
|
version_requirements: *id001
|
32
36
|
- !ruby/object:Gem::Dependency
|
33
37
|
name: systemu
|
34
38
|
prerelease: false
|
35
39
|
requirement: &id002 !ruby/object:Gem::Requirement
|
40
|
+
none: false
|
36
41
|
requirements:
|
37
42
|
- - ">="
|
38
43
|
- !ruby/object:Gem::Version
|
44
|
+
hash: 31
|
39
45
|
segments:
|
46
|
+
- 2
|
47
|
+
- 4
|
40
48
|
- 0
|
41
|
-
version:
|
49
|
+
version: 2.4.0
|
42
50
|
type: :runtime
|
43
51
|
version_requirements: *id002
|
44
52
|
description: Find out what cron is doing.
|
@@ -71,23 +79,27 @@ rdoc_options: []
|
|
71
79
|
require_paths:
|
72
80
|
- lib
|
73
81
|
required_ruby_version: !ruby/object:Gem::Requirement
|
82
|
+
none: false
|
74
83
|
requirements:
|
75
84
|
- - ">="
|
76
85
|
- !ruby/object:Gem::Version
|
86
|
+
hash: 3
|
77
87
|
segments:
|
78
88
|
- 0
|
79
89
|
version: "0"
|
80
90
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
91
|
+
none: false
|
81
92
|
requirements:
|
82
93
|
- - ">="
|
83
94
|
- !ruby/object:Gem::Version
|
95
|
+
hash: 3
|
84
96
|
segments:
|
85
97
|
- 0
|
86
98
|
version: "0"
|
87
99
|
requirements: []
|
88
100
|
|
89
101
|
rubyforge_project:
|
90
|
-
rubygems_version: 1.
|
102
|
+
rubygems_version: 1.6.2
|
91
103
|
signing_key:
|
92
104
|
specification_version: 3
|
93
105
|
summary: Find out what cron is doing.
|