Skip to content

Commit 3047435

Browse files
author
Jef Spaleta
authored
Merge pull request #40 from sensu-plugins/pre-release/3.0.0
prepping for 3.0.0 release
2 parents 8e14253 + 72bbf13 commit 3047435

File tree

9 files changed

+36
-25
lines changed

9 files changed

+36
-25
lines changed

.travis.yml

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,6 @@ cache:
44
install:
55
- bundle install
66
rvm:
7-
- 2.1
8-
- 2.2
97
- 2.3.0
108
- 2.4.1
119
notifications:
@@ -26,8 +24,5 @@ deploy:
2624
on:
2725
tags: true
2826
all_branches: true
29-
rvm: 2.1
30-
rvm: 2.2
31-
rvm: 2.3.0
3227
rvm: 2.4.1
3328
repo: sensu-plugins/sensu-plugins-raid-checks

CHANGELOG.md

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,16 @@ Which is based on [Keep A Changelog](http://keepachangelog.com/)
66

77
## [Unreleased]
88

9+
## [3.0.0] - 2020-04-14
10+
### Breaking Changes
11+
- `english` 0.6.3 has been yanked - https://rubygems.org/gems/english/versions/0.6.3.
12+
- Bump minimum required ruby to 2.3
13+
- Update bundler development dep to `2.1` to match travis environment
14+
- Update sensu-plugin dep to `~> 4.0`. you can read the changelog entries for [4.0](https://github.com/sensu-plugins/sensu-plugin/blob/master/CHANGELOG.md#400---2018-02-17)
15+
- Update rake dep
16+
- Update robocup dep
17+
- Update yard dep
18+
919
## [2.0.3] - 2019-02-17
1020
### Fixed
1121
- `check-megaraid-sas-status.rb`: Fixed logic error in which it was assumed that all virtual drives were in sequential order. Also fixed pattern matching when parsing individual drive status. (@SeanSith)
@@ -70,7 +80,8 @@ Which is based on [Keep A Changelog](http://keepachangelog.com/)
7080
### Added
7181
- initial release
7282

73-
[Unreleased]: https://github.com/sensu-plugins/sensu-plugins-raid-checks/compare/2.0.3...HEAD
83+
[Unreleased]: https://github.com/sensu-plugins/sensu-plugins-raid-checks/compare/3.0.0...HEAD
84+
[3.0.0]: https://github.com/sensu-plugins/sensu-plugins-raid-checks/compare/2.0.3...3.0.0
7485
[2.0.3]: https://github.com/sensu-plugins/sensu-plugins-raid-checks/compare/2.0.2...2.0.3
7586
[2.0.2]: https://github.com/sensu-plugins/sensu-plugins-raid-checks/compare/2.0.1...2.0.2
7687
[2.0.1]: https://github.com/sensu-plugins/sensu-plugins-raid-checks/compare/2.0.0...2.0.1

Rakefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ desc 'Test for binstubs'
2929
task :check_binstubs do
3030
bin_list = Gem::Specification.load('sensu-plugins-raid-checks.gemspec').executables
3131
bin_list.each do |b|
32-
`which #{ b }`
32+
`which #{b}`
3333
unless $CHILD_STATUS.success?
3434
puts "#{b} was not a binstub"
3535
exit

bin/check-3ware-status.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,7 @@ def parse_disks!(data, controller)
107107
unit = splitted[2]
108108
if unit != '-' && unit != 'NOT-PRESENT'
109109
# #YELLOW
110-
if status == 'OK' # rubocop:disable BlockNesting
110+
if status == 'OK' # rubocop:disable Metrics/BlockNesting
111111
@good_disks << controller + unit + name + ': ' + status
112112
else
113113
@bad_disks << controller + unit + name + ': ' + status

bin/check-megaraid-sas-status.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ def run
6868
# this reduces memory consumption as we don't care about the output in this conditional just whether or not it matches.
6969
# The `.match?()` function was introduced in 2.4
7070
unless Regexp.new(/State\s+:\s+Optimal/).match(stdout)
71-
error = sprintf '%svirtual drive %d: %s ', error, i, stdout[/State\s*:\s*.*/].split(':')[1] # rubocop:disable Style/FormatString
71+
error = sprintf '%svirtual drive %d: %s ', error, i, stdout[/State\s*:\s*.*/].split(':')[1] # rubocop:disable Style/FormatString, Style/FormatStringToken
7272
have_error = true
7373
end
7474
end

bin/check-mpt2sas-status.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ def run
6767
parts = line.match(volume_state)
6868
unless parts.nil?
6969
unless parts['VolState'] == 'Optimal'
70-
error = format('%s%s ', error, parts['VolState'])
70+
error = format('%s%s ', error, parts['VolState']) # rubocop:disable Style/FormatStringToken
7171
have_error = true
7272
end
7373
end

bin/check-raid.rb

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,9 +42,11 @@ class CheckRaid < Sensu::Plugin::Check::CLI
4242
#
4343
def check_software_raid
4444
return unless File.exist?('/proc/mdstat')
45+
4546
contents = File.read('/proc/mdstat')
4647
mg = contents.lines.grep(/active|blocks/)
4748
return if mg.empty?
49+
4850
sg = mg.to_s.lines.grep(/\]\(F\)|[\[U]_/)
4951
if sg.empty?
5052
ok 'Software RAID OK'
@@ -57,6 +59,7 @@ def check_software_raid
5759
#
5860
def check_hp
5961
return unless File.exist?('/usr/bin/cciss_vol_status')
62+
6063
contents = `/usr/bin/cciss_vol_status /dev/sg0`
6164
c = contents.lines.grep(/status\: OK\./)
6265
# #YELLOW
@@ -71,6 +74,7 @@ def check_hp
7174
#
7275
def check_adaptec
7376
return unless File.exist?('/usr/StorMan/arcconf')
77+
7478
contents = `/usr/StorMan/arcconf GETCONFIG 1 AL`
7579

7680
mg = contents.lines.grep(/Controller Status/)
@@ -107,6 +111,7 @@ def check_adaptec
107111
#
108112
def check_mega_raid
109113
return unless File.exist?('/usr/sbin/megacli')
114+
110115
contents = if config[:log]
111116
`/usr/sbin/megacli -AdpAllInfo -aALL`
112117
else

lib/sensu-plugins-raid-checks/version.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,9 @@
22

33
module SensuPluginsRaidChecks
44
module Version
5-
MAJOR = 2
5+
MAJOR = 3
66
MINOR = 0
7-
PATCH = 3
7+
PATCH = 0
88

99
VER_STRING = [MAJOR, MINOR, PATCH].compact.join('.')
1010
end

sensu-plugins-raid-checks.gemspec

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
# frozen_string_literal: true
22

3-
lib = File.expand_path('../lib', __FILE__)
3+
lib = File.expand_path('lib', __dir__)
44
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
55

66
require 'date'
77
require_relative 'lib/sensu-plugins-raid-checks'
88

9-
Gem::Specification.new do |s| # rubocop:disable Metrics/BlockLength
9+
Gem::Specification.new do |s|
1010
s.authors = ['Sensu-Plugins and contributors']
1111

1212
s.date = Date.today.to_s
@@ -18,31 +18,31 @@ Gem::Specification.new do |s| # rubocop:disable Metrics/BlockLength
1818
s.files = Dir.glob('{bin,lib}/**/*') + %w[LICENSE README.md CHANGELOG.md]
1919
s.homepage = 'https://github.com/sensu-plugins/sensu-plugins-raid-checks'
2020
s.license = 'MIT'
21-
s.metadata = { 'maintainer' => 'sensu-plugin',
21+
s.metadata = { 'maintainer' => 'sensu-plugin',
2222
'development_status' => 'active',
23-
'production_status' => 'unstable - testing recommended',
24-
'release_draft' => 'false',
23+
'production_status' => 'unstable - testing recommended',
24+
'release_draft' => 'false',
2525
'release_prerelease' => 'false' }
2626
s.name = 'sensu-plugins-raid-checks'
2727
s.platform = Gem::Platform::RUBY
2828
s.post_install_message = 'You can use the embedded Ruby by setting EMBEDDED_RUBY=true in /etc/default/sensu'
2929
s.require_paths = ['lib']
30-
s.required_ruby_version = '>= 2.1.0'
30+
s.required_ruby_version = '>= 2.3.0'
3131

3232
s.summary = 'Sensu plugins for working with raid evices'
3333
s.test_files = s.files.grep(%r{^(test|spec|features)/})
3434
s.version = SensuPluginsRaidChecks::Version::VER_STRING
3535

36-
s.add_runtime_dependency 'english', '0.6.3'
37-
s.add_runtime_dependency 'sensu-plugin', '~> 1.2'
36+
s.add_runtime_dependency 'english', '0.7.0'
37+
s.add_runtime_dependency 'sensu-plugin', '~> 4.0'
3838

39-
s.add_development_dependency 'bundler', '~> 1.7'
39+
s.add_development_dependency 'bundler', '~> 2.1'
4040
s.add_development_dependency 'codeclimate-test-reporter', '~> 1.0'
4141
s.add_development_dependency 'github-markup', '~> 3.0'
4242
s.add_development_dependency 'pry', '~> 0.10'
43-
s.add_development_dependency 'rake', '~> 12.3'
43+
s.add_development_dependency 'rake', '~> 13.0'
4444
s.add_development_dependency 'redcarpet', '~> 3.2'
45-
s.add_development_dependency 'rspec', '~> 3.1'
46-
s.add_development_dependency 'rubocop', '~> 0.51.0'
47-
s.add_development_dependency 'yard', '~> 0.8'
45+
s.add_development_dependency 'rspec', '~> 3.7'
46+
s.add_development_dependency 'rubocop', '~> 0.80.1'
47+
s.add_development_dependency 'yard', '~> 0.9.20'
4848
end

0 commit comments

Comments
 (0)