diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md index 8821e85..1468772 100644 --- a/.github/PULL_REQUEST_TEMPLATE.md +++ b/.github/PULL_REQUEST_TEMPLATE.md @@ -4,7 +4,7 @@ #### General -- [ ] Update Changelog following the conventions laid out on [Keep A Changelog](http://keepachangelog.com/) +- [ ] Update Changelog following the conventions laid out [here](https://github.com/sensu-plugins/community/blob/master/HOW_WE_CHANGELOG.md) - [ ] Update README with any necessary configuration snippets diff --git a/CHANGELOG.md b/CHANGELOG.md index ec75915..9b6ce57 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,9 +1,19 @@ -#Change Log +# Change Log This project adheres to [Semantic Versioning](http://semver.org/). -This CHANGELOG follows the format listed at [Keep A Changelog](http://keepachangelog.com/) +This CHANGELOG follows the format listed [here](https://github.com/sensu-plugins/community/blob/master/HOW_WE_CHANGELOG.md) ## [Unreleased] + +### Security +- updated rubocop dependency to `~> 0.51.0` per: https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2017-8418. (@majormoses) + +### Fixed +- misc typos (@majormoses) + +### Changed +- uipdated Changelog guidelines location (@majormoses) + ### Added - ruby 2.4 testing (@majormoses) diff --git a/Rakefile b/Rakefile index ad50875..65b8084 100644 --- a/Rakefile +++ b/Rakefile @@ -6,12 +6,12 @@ require 'rubocop/rake_task' require 'yard' require 'yard/rake/yardoc_task' -args = [:spec, :make_bin_executable, :yard, :rubocop, :check_binstubs] +args = %i[spec make_bin_executable yard rubocop check_binstubs] YARD::Rake::YardocTask.new do |t| - OTHER_PATHS = %w().freeze + OTHER_PATHS = %w[].freeze t.files = ['lib/**/*.rb', 'bin/**/*.rb', OTHER_PATHS] - t.options = %w(--markup-provider=redcarpet --markup=markdown --main=README.md --files CHANGELOG.md) + t.options = %w[--markup-provider=redcarpet --markup=markdown --main=README.md --files CHANGELOG.md] end RuboCop::RakeTask.new diff --git a/bin/check-nginx-status.rb b/bin/check-nginx-status.rb index 34eb19d..7f76b25 100755 --- a/bin/check-nginx-status.rb +++ b/bin/check-nginx-status.rb @@ -108,7 +108,7 @@ def statutor end return response end - rescue => e + rescue StandardError => e unknown "Could not fetch Nginx status | #{e.message}" end end diff --git a/sensu-plugins-nginx.gemspec b/sensu-plugins-nginx.gemspec index 0791816..e854ab0 100644 --- a/sensu-plugins-nginx.gemspec +++ b/sensu-plugins-nginx.gemspec @@ -4,14 +4,14 @@ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib) require 'date' require_relative 'lib/sensu-plugins-nginx' -Gem::Specification.new do |s| +Gem::Specification.new do |s| # rubocop:disable Metrics/BlockLength s.authors = ['Sensu-Plugins and contributors'] s.date = Date.today.to_s s.description = 'This plugin provides native nginx instrumentation for metrics collection, including: metrics via `stub_status`.' s.email = '' s.executables = Dir.glob('bin/**/*.rb').map { |file| File.basename(file) } - s.files = Dir.glob('{bin,lib}/**/*') + %w(LICENSE README.md CHANGELOG.md) + s.files = Dir.glob('{bin,lib}/**/*') + %w[LICENSE README.md CHANGELOG.md] s.homepage = 'https://github.com/sensu-plugins/sensu-plugins-nginx' s.license = 'MIT' s.metadata = { 'maintainer' => '@mattyjones', @@ -37,6 +37,6 @@ Gem::Specification.new do |s| s.add_development_dependency 'rake', '~> 10.0' s.add_development_dependency 'redcarpet', '~> 3.2' s.add_development_dependency 'rspec', '~> 3.1' - s.add_development_dependency 'rubocop', '~> 0.40.0' + s.add_development_dependency 'rubocop', '~> 0.51.0' s.add_development_dependency 'yard', '~> 0.8' end