foreman-monit 1.0.2 → 1.0.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.ruby-version +1 -1
- data/foreman-monit.gemspec +1 -0
- data/lib/foreman-monit/version.rb +1 -1
- data/lib/foreman-monit.rb +3 -0
- data/spec/lib/foreman-monit/exporter_spec.rb +1 -1
- data/spec/spec_helper.rb +1 -0
- data/spec/support/custom_expectations/write_expectation.rb +57 -0
- metadata +31 -15
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 5a3c8976885e63c28806519d98ae6a91cfe66565
|
4
|
+
data.tar.gz: 7d70c27a3d1bec9fc71e23e61f1e8ba5faa68f7d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: af25b53ee40f0baa54b03437ed6db1d4453e4c00698f0723ddf2752590f6c5b2913675b6801f183cc9cff94954da3ca2cbf84145384e9a100bcb6bee030c37fc
|
7
|
+
data.tar.gz: 251d54a5ebccb22b671f5a9c36599058c5453840c2acf68d4127a22af7ef12124a4e6cb8a742d5be228c38869a6071467b25d6b79b94a75768001adfa0246c5d
|
data/.ruby-version
CHANGED
@@ -1 +1 @@
|
|
1
|
-
2.
|
1
|
+
2.1.1
|
data/foreman-monit.gemspec
CHANGED
@@ -16,6 +16,7 @@ Gem::Specification.new do |gem|
|
|
16
16
|
gem.add_dependency('foreman')
|
17
17
|
gem.add_dependency('thor')
|
18
18
|
gem.add_development_dependency('rspec')
|
19
|
+
gem.add_development_dependency('rake')
|
19
20
|
gem.executables = gem.files.grep(%r{^bin/}).map{ |f| File.basename(f) }
|
20
21
|
gem.test_files = gem.files.grep(%r{^(test|spec|features)/})
|
21
22
|
gem.require_paths = %w(lib)
|
data/lib/foreman-monit.rb
CHANGED
@@ -31,7 +31,7 @@ describe ForemanMonit::Exporter do
|
|
31
31
|
|
32
32
|
describe '#info' do
|
33
33
|
it 'shows the Procfiles entries' do
|
34
|
-
|
34
|
+
expect { exporter.info }.to write('Foreman').to(:output)
|
35
35
|
end
|
36
36
|
|
37
37
|
end
|
data/spec/spec_helper.rb
CHANGED
@@ -0,0 +1,57 @@
|
|
1
|
+
RSpec::Matchers.define :write do |message|
|
2
|
+
chain(:to) do |io|
|
3
|
+
@io = io
|
4
|
+
end
|
5
|
+
|
6
|
+
match do |block|
|
7
|
+
output =
|
8
|
+
case io
|
9
|
+
when :output then fake_stdout(&block)
|
10
|
+
when :error then fake_stderr(&block)
|
11
|
+
else raise("Allowed values for `to` are :output and :error, got `#{io.inspect}`")
|
12
|
+
end
|
13
|
+
output.include? message
|
14
|
+
end
|
15
|
+
|
16
|
+
description do
|
17
|
+
"write \"#{message}\" #{io_name}"
|
18
|
+
end
|
19
|
+
|
20
|
+
failure_message_for_should do
|
21
|
+
"expected to #{description}"
|
22
|
+
end
|
23
|
+
|
24
|
+
failure_message_for_should_not do
|
25
|
+
"expected to not #{description}"
|
26
|
+
end
|
27
|
+
|
28
|
+
# Fake STDERR and return a string written to it.
|
29
|
+
def fake_stderr
|
30
|
+
original_stderr = $stderr
|
31
|
+
$stderr = StringIO.new
|
32
|
+
yield
|
33
|
+
$stderr.string
|
34
|
+
ensure
|
35
|
+
$stderr = original_stderr
|
36
|
+
end
|
37
|
+
|
38
|
+
# Fake STDOUT and return a string written to it.
|
39
|
+
def fake_stdout
|
40
|
+
original_stdout = $stdout
|
41
|
+
$stdout = StringIO.new
|
42
|
+
yield
|
43
|
+
$stdout.string
|
44
|
+
ensure
|
45
|
+
$stdout = original_stdout
|
46
|
+
end
|
47
|
+
|
48
|
+
# default IO is standard output
|
49
|
+
def io
|
50
|
+
@io ||= :output
|
51
|
+
end
|
52
|
+
|
53
|
+
# IO name is used for description message
|
54
|
+
def io_name
|
55
|
+
{:output => "standard output", :error => "standard error"}[io]
|
56
|
+
end
|
57
|
+
end
|
metadata
CHANGED
@@ -1,55 +1,69 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: foreman-monit
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.
|
4
|
+
version: 1.0.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Sebastian Georgi
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2014-04-10 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: foreman
|
15
15
|
requirement: !ruby/object:Gem::Requirement
|
16
16
|
requirements:
|
17
|
-
- -
|
17
|
+
- - ">="
|
18
18
|
- !ruby/object:Gem::Version
|
19
19
|
version: '0'
|
20
20
|
type: :runtime
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
|
-
- -
|
24
|
+
- - ">="
|
25
25
|
- !ruby/object:Gem::Version
|
26
26
|
version: '0'
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: thor
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
30
30
|
requirements:
|
31
|
-
- -
|
31
|
+
- - ">="
|
32
32
|
- !ruby/object:Gem::Version
|
33
33
|
version: '0'
|
34
34
|
type: :runtime
|
35
35
|
prerelease: false
|
36
36
|
version_requirements: !ruby/object:Gem::Requirement
|
37
37
|
requirements:
|
38
|
-
- -
|
38
|
+
- - ">="
|
39
39
|
- !ruby/object:Gem::Version
|
40
40
|
version: '0'
|
41
41
|
- !ruby/object:Gem::Dependency
|
42
42
|
name: rspec
|
43
43
|
requirement: !ruby/object:Gem::Requirement
|
44
44
|
requirements:
|
45
|
-
- -
|
45
|
+
- - ">="
|
46
46
|
- !ruby/object:Gem::Version
|
47
47
|
version: '0'
|
48
48
|
type: :development
|
49
49
|
prerelease: false
|
50
50
|
version_requirements: !ruby/object:Gem::Requirement
|
51
51
|
requirements:
|
52
|
-
- -
|
52
|
+
- - ">="
|
53
|
+
- !ruby/object:Gem::Version
|
54
|
+
version: '0'
|
55
|
+
- !ruby/object:Gem::Dependency
|
56
|
+
name: rake
|
57
|
+
requirement: !ruby/object:Gem::Requirement
|
58
|
+
requirements:
|
59
|
+
- - ">="
|
60
|
+
- !ruby/object:Gem::Version
|
61
|
+
version: '0'
|
62
|
+
type: :development
|
63
|
+
prerelease: false
|
64
|
+
version_requirements: !ruby/object:Gem::Requirement
|
65
|
+
requirements:
|
66
|
+
- - ">="
|
53
67
|
- !ruby/object:Gem::Version
|
54
68
|
version: '0'
|
55
69
|
description: Outputs bash-wrapped launchers and control files for monit
|
@@ -60,9 +74,9 @@ executables:
|
|
60
74
|
extensions: []
|
61
75
|
extra_rdoc_files: []
|
62
76
|
files:
|
63
|
-
- .gitignore
|
64
|
-
- .rspec
|
65
|
-
- .ruby-version
|
77
|
+
- ".gitignore"
|
78
|
+
- ".rspec"
|
79
|
+
- ".ruby-version"
|
66
80
|
- Gemfile
|
67
81
|
- LICENSE.txt
|
68
82
|
- README.md
|
@@ -76,6 +90,7 @@ files:
|
|
76
90
|
- spec/Procfile
|
77
91
|
- spec/lib/foreman-monit/exporter_spec.rb
|
78
92
|
- spec/spec_helper.rb
|
93
|
+
- spec/support/custom_expectations/write_expectation.rb
|
79
94
|
- templates/monitrc.erb
|
80
95
|
homepage: ''
|
81
96
|
licenses: []
|
@@ -86,22 +101,23 @@ require_paths:
|
|
86
101
|
- lib
|
87
102
|
required_ruby_version: !ruby/object:Gem::Requirement
|
88
103
|
requirements:
|
89
|
-
- -
|
104
|
+
- - ">="
|
90
105
|
- !ruby/object:Gem::Version
|
91
106
|
version: '0'
|
92
107
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
93
108
|
requirements:
|
94
|
-
- -
|
109
|
+
- - ">="
|
95
110
|
- !ruby/object:Gem::Version
|
96
111
|
version: '0'
|
97
112
|
requirements: []
|
98
113
|
rubyforge_project:
|
99
|
-
rubygems_version: 2.
|
114
|
+
rubygems_version: 2.2.2
|
100
115
|
signing_key:
|
101
116
|
specification_version: 4
|
102
|
-
summary:
|
117
|
+
summary: "..."
|
103
118
|
test_files:
|
104
119
|
- spec/Procfile
|
105
120
|
- spec/lib/foreman-monit/exporter_spec.rb
|
106
121
|
- spec/spec_helper.rb
|
122
|
+
- spec/support/custom_expectations/write_expectation.rb
|
107
123
|
has_rdoc:
|