sensu-spawn 1.0.0 → 1.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.travis.yml +1 -1
- data/CHANGELOG.md +6 -0
- data/Gemfile +3 -0
- data/lib/sensu/spawn.rb +7 -2
- data/sensu-spawn.gemspec +1 -1
- data/spec/assets/output_1MB +13618 -0
- data/spec/spawn_spec.rb +13 -0
- metadata +6 -3
data/spec/spawn_spec.rb
CHANGED
@@ -14,6 +14,19 @@ describe "Sensu::Spawn" do
|
|
14
14
|
end
|
15
15
|
end
|
16
16
|
|
17
|
+
it "can spawn a process with output greater than 64KB" do |output, status|
|
18
|
+
output_asset = "spec/assets/output_1MB"
|
19
|
+
expected_output = IO.read(output_asset)
|
20
|
+
async_wrapper do
|
21
|
+
Sensu::Spawn.process("cat #{output_asset}") do |output, status|
|
22
|
+
expect(output).to eq(expected_output)
|
23
|
+
expect(status).to eq(0)
|
24
|
+
async_done
|
25
|
+
end
|
26
|
+
end
|
27
|
+
end
|
28
|
+
|
29
|
+
|
17
30
|
it "can spawn a process with a non-zero exit status" do
|
18
31
|
async_wrapper do
|
19
32
|
Sensu::Spawn.process("echo foo && exit 1") do |output, status|
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: sensu-spawn
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 1.1.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Sean Porter
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-
|
11
|
+
date: 2014-09-15 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: sensu-em
|
@@ -117,12 +117,14 @@ extra_rdoc_files: []
|
|
117
117
|
files:
|
118
118
|
- ".gitignore"
|
119
119
|
- ".travis.yml"
|
120
|
+
- CHANGELOG.md
|
120
121
|
- Gemfile
|
121
122
|
- LICENSE.txt
|
122
123
|
- README.md
|
123
124
|
- Rakefile
|
124
125
|
- lib/sensu/spawn.rb
|
125
126
|
- sensu-spawn.gemspec
|
127
|
+
- spec/assets/output_1MB
|
126
128
|
- spec/helpers.rb
|
127
129
|
- spec/spawn_spec.rb
|
128
130
|
homepage: https://github.com/sensu/sensu-spawn
|
@@ -145,10 +147,11 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
145
147
|
version: '0'
|
146
148
|
requirements: []
|
147
149
|
rubyforge_project:
|
148
|
-
rubygems_version: 2.2.
|
150
|
+
rubygems_version: 2.2.2
|
149
151
|
signing_key:
|
150
152
|
specification_version: 4
|
151
153
|
summary: The Sensu spawn process library
|
152
154
|
test_files:
|
155
|
+
- spec/assets/output_1MB
|
153
156
|
- spec/helpers.rb
|
154
157
|
- spec/spawn_spec.rb
|