sensu-plugins-rspec 0.0.3 → 1.0.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +16 -9
- data/README.md +1 -2
- data/bin/check-rspec.rb +1 -1
- data/bin/check-test-suite.rb +15 -15
- data/lib/sensu-plugins-rspec/version.rb +2 -2
- metadata +14 -36
- checksums.yaml.gz.sig +0 -0
- data.tar.gz.sig +0 -2
- metadata.gz.sig +0 -0
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: e5126508dd775d18c488305c5a17520c3ff0942e
|
4
|
+
data.tar.gz: 9a876fed9f455b950c757278dae56cde2dfefb5e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 8eba00d31c7633c511a08308478731fefbc7e43cdd6e8b522b9d521f8643fd5a570f43992e80e1e66dcb2cee13827053d679cd123776e5363f603d4ac69d9b45
|
7
|
+
data.tar.gz: 410453d91ff87ca793f27e3b1942d5a966a92b845c809a078acf290080fa814047a0932640352247017bd723b514bfc65f44c1b3fa5fa5461b40a5174cd97178
|
data/CHANGELOG.md
CHANGED
@@ -3,14 +3,20 @@ This project adheres to [Semantic Versioning](http://semver.org/).
|
|
3
3
|
|
4
4
|
This CHANGELOG follows the format listed at [Keep A Changelog](http://keepachangelog.com/)
|
5
5
|
|
6
|
-
## Unreleased]
|
6
|
+
## [Unreleased]
|
7
|
+
|
8
|
+
## [1.0.0] - 2017-07-12
|
9
|
+
### Added
|
10
|
+
- Ruby 2.3.0 & 2.4.1 testing
|
11
|
+
|
12
|
+
### Breaking Changes
|
13
|
+
- Dropped Ruby 1.9.3 support
|
7
14
|
|
8
15
|
## [0.0.3] - 2015-07-14
|
9
16
|
### Changed
|
10
17
|
- updated sensu-plugin gem to 1.2.0
|
11
18
|
|
12
19
|
## [0.0.2] - 2015-06-03
|
13
|
-
|
14
20
|
### Fixed
|
15
21
|
- added binstubs
|
16
22
|
|
@@ -18,24 +24,25 @@ This CHANGELOG follows the format listed at [Keep A Changelog](http://keepachang
|
|
18
24
|
- removed cruft from /lib
|
19
25
|
|
20
26
|
## 0.0.1 - 2015-04-29
|
21
|
-
|
22
27
|
### Added
|
23
28
|
- initial release
|
24
29
|
|
25
|
-
|
26
|
-
|
30
|
+
## 0.0.1.alpha.3
|
27
31
|
* pin all runtime dependencies
|
28
32
|
* fix rubocop issues
|
29
33
|
* add new version modules
|
30
34
|
* add new bump and version rake tasks
|
31
35
|
|
32
|
-
|
33
|
-
|
36
|
+
## 0.0.1.alpha.2
|
34
37
|
* clean codebase
|
35
38
|
* add irc notification to Travis build
|
36
39
|
|
37
|
-
|
38
|
-
|
40
|
+
## 0.0.1.alpha.1
|
39
41
|
* identical functionality as community-plugins
|
40
42
|
* fix rubocop errors
|
41
43
|
* add unpinned dependencies to gemspec
|
44
|
+
|
45
|
+
[Unreleased]: https://github.com/sensu-plugins/sensu-plugins-rspec/compare/1.0.0...HEAD
|
46
|
+
[1.0.0]: https://github.com/sensu-plugins/sensu-plugins-rspec/compare/0.0.3...1.0.0
|
47
|
+
[0.0.3]: https://github.com/sensu-plugins/sensu-plugins-rspec/compare/0.0.2...0.0.3
|
48
|
+
[0.0.2]: https://github.com/sensu-plugins/sensu-plugins-rspec/compare/0.0.1...0.0.2
|
data/README.md
CHANGED
@@ -5,7 +5,6 @@
|
|
5
5
|
[![Code Climate](https://codeclimate.com/github/sensu-plugins/sensu-plugins-rspec/badges/gpa.svg)](https://codeclimate.com/github/sensu-plugins/sensu-plugins-rspec)
|
6
6
|
[![Test Coverage](https://codeclimate.com/github/sensu-plugins/sensu-plugins-rspec/badges/coverage.svg)](https://codeclimate.com/github/sensu-plugins/sensu-plugins-rspec)
|
7
7
|
[![Dependency Status](https://gemnasium.com/sensu-plugins/sensu-plugins-rspec.svg)](https://gemnasium.com/sensu-plugins/sensu-plugins-rspec)
|
8
|
-
[![Codeship Status for sensu-plugins/sensu-plugins-rspec](https://codeship.com/projects/9999a9c0-d266-0132-51a0-2e715b0dd4a0/status?branch=master)](https://codeship.com/projects/77533)
|
9
8
|
|
10
9
|
## Functionality
|
11
10
|
|
@@ -33,6 +32,6 @@ Run tests with required options and multiple environment variables
|
|
33
32
|
|
34
33
|
## Installation
|
35
34
|
|
36
|
-
[Installation and Setup](
|
35
|
+
[Installation and Setup](http://sensu-plugins.io/docs/installation_instructions.html)
|
37
36
|
|
38
37
|
## Notes
|
data/bin/check-rspec.rb
CHANGED
@@ -92,7 +92,7 @@ class CheckRspec < Sensu::Plugin::Check::CLI
|
|
92
92
|
sensu_client_socket d.to_json
|
93
93
|
end
|
94
94
|
|
95
|
-
def run
|
95
|
+
def run
|
96
96
|
cd = "cd #{config[:tests_dir]};"
|
97
97
|
run = "#{config[:environment_variables]} #{config[:ruby_bin]} -S #{config[:rspec_bin]} #{config[:spec_dir]} -f json"
|
98
98
|
|
data/bin/check-test-suite.rb
CHANGED
@@ -80,11 +80,11 @@ class CheckTestSuite < Sensu::Plugin::Check::CLI
|
|
80
80
|
default: 'vendor/bundle'
|
81
81
|
|
82
82
|
def initialize_file_cache(branch, commit)
|
83
|
-
commit_file_directory = "/var/log/sensu/check-test-suite-#{
|
83
|
+
commit_file_directory = "/var/log/sensu/check-test-suite-#{branch}"
|
84
84
|
|
85
85
|
FileUtils.mkdir_p commit_file_directory
|
86
86
|
|
87
|
-
write_file_cache_message "#{
|
87
|
+
write_file_cache_message "#{commit_file_directory}/#{commit}", 'verified'
|
88
88
|
end
|
89
89
|
|
90
90
|
def write_file_cache_message(location, message)
|
@@ -111,13 +111,13 @@ class CheckTestSuite < Sensu::Plugin::Check::CLI
|
|
111
111
|
|
112
112
|
initialize_file_cache tests[path]['branch'], tests[path]['commit']
|
113
113
|
|
114
|
-
commit_file = "/var/log/sensu/check-test-suite-#{
|
114
|
+
commit_file = "/var/log/sensu/check-test-suite-#{tests[path]['branch']}/#{tests[path]['commit']}"
|
115
115
|
|
116
116
|
next if File.exist?(commit_file) && File.read(commit_file).include?('successful')
|
117
117
|
|
118
118
|
if config[:gem_home] == 'vendor/bundle'
|
119
119
|
target_ruby = ''
|
120
|
-
target_rubies = Dir.entries("#{
|
120
|
+
target_rubies = Dir.entries("#{path}/#{config[:gem_home]}/ruby").select { |item| item =~ /(\d+\.\d+\.\d+)/ }
|
121
121
|
|
122
122
|
target_rubies.each do |ruby|
|
123
123
|
target_rubies.each do |other_ruby|
|
@@ -129,14 +129,14 @@ class CheckTestSuite < Sensu::Plugin::Check::CLI
|
|
129
129
|
end
|
130
130
|
end
|
131
131
|
|
132
|
-
final_gem_home = `/bin/readlink #{ path }`.chomp.strip + "/#{
|
132
|
+
final_gem_home = `/bin/readlink #{ path }`.chomp.strip + "/#{config[:gem_home]}/ruby/#{target_ruby}"
|
133
133
|
end
|
134
134
|
|
135
135
|
ENV['GEM_HOME'] = final_gem_home
|
136
136
|
test_suite_args = [
|
137
|
-
"cd #{
|
138
|
-
"#{
|
139
|
-
"#{
|
137
|
+
"cd #{path};",
|
138
|
+
"#{config[:environment_variables]} #{config[:ruby_bin]} -S #{config[:test_suite]}",
|
139
|
+
"#{config[:suite_arguments]} --failure-exit-code 2"
|
140
140
|
]
|
141
141
|
|
142
142
|
tests[path]['test_suite_out'] = `#{ test_suite_args.join(' ') }`
|
@@ -158,9 +158,9 @@ class CheckTestSuite < Sensu::Plugin::Check::CLI
|
|
158
158
|
next if File.read(commit_file).scan(/failure/).count < 2
|
159
159
|
|
160
160
|
critical_out = [
|
161
|
-
"CRITICAL! Rspec returned failed tests for #{
|
162
|
-
"#{
|
163
|
-
"Error'd in #{
|
161
|
+
"CRITICAL! Rspec returned failed tests for #{tests[path]['branch']}!",
|
162
|
+
"#{tests[path]['metadata']}#{test_suite_lines[test_suite_out_fail_line..(test_suite_lines.count)].join("\n")}",
|
163
|
+
"Error'd in #{tests[path]['runtime']} seconds."
|
164
164
|
]
|
165
165
|
|
166
166
|
critical critical_out.join("\n\n")
|
@@ -170,10 +170,10 @@ class CheckTestSuite < Sensu::Plugin::Check::CLI
|
|
170
170
|
write_file_cache_message commit_file, 'successful'
|
171
171
|
|
172
172
|
if config[:paths].split(',').length == 1
|
173
|
-
ok "OK! Rspec returned no failed tests for #{
|
173
|
+
ok "OK! Rspec returned no failed tests for #{tests[path]['branch']}.\n\n#{tests[path]['metadata']}\n\nCompleted in #{tests[path]['runtime']}"
|
174
174
|
end
|
175
175
|
else
|
176
|
-
unknown "Strange exit status detected for rspec on #{
|
176
|
+
unknown "Strange exit status detected for rspec on #{tests[path]['branch']}.\n\n#{tests[path]['test_suite_out']}"
|
177
177
|
end
|
178
178
|
end
|
179
179
|
|
@@ -181,8 +181,8 @@ class CheckTestSuite < Sensu::Plugin::Check::CLI
|
|
181
181
|
|
182
182
|
successful_tests.each_pair { |_key, hash| successful_branches << hash['branch'] }
|
183
183
|
|
184
|
-
ok "OK! Rspec returned no failed tests for #{
|
184
|
+
ok "OK! Rspec returned no failed tests for #{successful_branches.join(', ')}.\nCompleted in #{full_start - Time.now} seconds."
|
185
185
|
rescue StandardError => e
|
186
|
-
critical "Error message: #{
|
186
|
+
critical "Error message: #{e}\n#{e.backtrace.join("\n")}"
|
187
187
|
end
|
188
188
|
end
|
metadata
CHANGED
@@ -1,51 +1,29 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: sensu-plugins-rspec
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0
|
4
|
+
version: 1.0.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Sensu-Plugins and contributors
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
|
-
cert_chain:
|
11
|
-
-
|
12
|
-
-----BEGIN CERTIFICATE-----
|
13
|
-
MIIDgDCCAmigAwIBAgIBATANBgkqhkiG9w0BAQUFADBDMRIwEAYDVQQDDAltYXR0
|
14
|
-
am9uZXMxGDAWBgoJ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SQzLJ
|
29
|
-
JKP4hVvbc1d+oS925B1lcBiqn2aYvElbyNAVmQPywNNqkWmvtlqj9ZVJfV5HQLdu
|
30
|
-
8sHuVruarogxxKPBzlL2is4EUb6oN/RdpGx2l4254+nyR+abg//Ed27Ym0PkB4lk
|
31
|
-
HP0m8WSjZmFr109pE/sVsM5jtOCvogyujQOjNVGN4gz1wwPr
|
32
|
-
-----END CERTIFICATE-----
|
33
|
-
date: 2015-07-14 00:00:00.000000000 Z
|
10
|
+
cert_chain: []
|
11
|
+
date: 2017-07-13 00:00:00.000000000 Z
|
34
12
|
dependencies:
|
35
13
|
- !ruby/object:Gem::Dependency
|
36
14
|
name: sensu-plugin
|
37
15
|
requirement: !ruby/object:Gem::Requirement
|
38
16
|
requirements:
|
39
|
-
- -
|
17
|
+
- - "~>"
|
40
18
|
- !ruby/object:Gem::Version
|
41
|
-
version: 1.2
|
19
|
+
version: '1.2'
|
42
20
|
type: :runtime
|
43
21
|
prerelease: false
|
44
22
|
version_requirements: !ruby/object:Gem::Requirement
|
45
23
|
requirements:
|
46
|
-
- -
|
24
|
+
- - "~>"
|
47
25
|
- !ruby/object:Gem::Version
|
48
|
-
version: 1.2
|
26
|
+
version: '1.2'
|
49
27
|
- !ruby/object:Gem::Dependency
|
50
28
|
name: rspec
|
51
29
|
requirement: !ruby/object:Gem::Requirement
|
@@ -84,16 +62,16 @@ dependencies:
|
|
84
62
|
name: rubocop
|
85
63
|
requirement: !ruby/object:Gem::Requirement
|
86
64
|
requirements:
|
87
|
-
- -
|
65
|
+
- - "~>"
|
88
66
|
- !ruby/object:Gem::Version
|
89
|
-
version:
|
67
|
+
version: 0.40.0
|
90
68
|
type: :development
|
91
69
|
prerelease: false
|
92
70
|
version_requirements: !ruby/object:Gem::Requirement
|
93
71
|
requirements:
|
94
|
-
- -
|
72
|
+
- - "~>"
|
95
73
|
- !ruby/object:Gem::Version
|
96
|
-
version:
|
74
|
+
version: 0.40.0
|
97
75
|
- !ruby/object:Gem::Dependency
|
98
76
|
name: bundler
|
99
77
|
requirement: !ruby/object:Gem::Requirement
|
@@ -181,8 +159,8 @@ dependencies:
|
|
181
159
|
description: Sensu plugins for working with RSpec
|
182
160
|
email: "<sensu-users@googlegroups.com>"
|
183
161
|
executables:
|
184
|
-
- check-test-suite.rb
|
185
162
|
- check-rspec.rb
|
163
|
+
- check-test-suite.rb
|
186
164
|
extensions: []
|
187
165
|
extra_rdoc_files: []
|
188
166
|
files:
|
@@ -211,7 +189,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
211
189
|
requirements:
|
212
190
|
- - ">="
|
213
191
|
- !ruby/object:Gem::Version
|
214
|
-
version:
|
192
|
+
version: 2.0.0
|
215
193
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
216
194
|
requirements:
|
217
195
|
- - ">="
|
@@ -219,7 +197,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
219
197
|
version: '0'
|
220
198
|
requirements: []
|
221
199
|
rubyforge_project:
|
222
|
-
rubygems_version: 2.4.
|
200
|
+
rubygems_version: 2.4.5
|
223
201
|
signing_key:
|
224
202
|
specification_version: 4
|
225
203
|
summary: Sensu plugins for working with RSpec
|
checksums.yaml.gz.sig
DELETED
Binary file
|
data.tar.gz.sig
DELETED
metadata.gz.sig
DELETED
Binary file
|