From 0528f5ec7908b18fc5e915dde8e0c7549c20a23d Mon Sep 17 00:00:00 2001 From: Ben Abrams Date: Mon, 26 Feb 2018 18:58:14 -0800 Subject: [PATCH] [CVE-2017-8418] - updating rubocop dependency. Breaking Changes: - removed ruby `< 2.1` support (@majormoses) Misc: - updated changelog guidelines location - appeased the cops Signed-off-by: Ben Abrams --- .github/PULL_REQUEST_TEMPLATE.md | 2 +- .travis.yml | 2 -- CHANGELOG.md | 11 ++++++++++- Rakefile | 6 +++--- bin/handler-xmpp.rb | 2 ++ sensu-plugins-xmpp.gemspec | 9 +++++---- 6 files changed, 21 insertions(+), 11 deletions(-) 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/.travis.yml b/.travis.yml index e544e22..a88bfef 100644 --- a/.travis.yml +++ b/.travis.yml @@ -4,7 +4,6 @@ cache: install: - bundle install rvm: -- 2.0 - 2.1 - 2.2 - 2.3.0 @@ -27,7 +26,6 @@ deploy: on: tags: true all_branches: true - rvm: 2.0 rvm: 2.1 rvm: 2.2 rvm: 2.3.0 diff --git a/CHANGELOG.md b/CHANGELOG.md index 1cffe72..82d1bcb 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,10 +1,19 @@ # 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) + +### Breaking Changes +- removed ruby `< 2.1` support (@majormoses) + +### Changed +- updated Changelog guidelines location (@majormoses) + ## [1.0.1] - 2017-08-04 ### Fixed - check-xmpp-login.rb do not rescue from SystemExit (@ushis) diff --git a/Rakefile b/Rakefile index 814cecc..71a77f2 100644 --- a/Rakefile +++ b/Rakefile @@ -7,9 +7,9 @@ require 'yard' require 'yard/rake/yardoc_task' 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 @@ -35,4 +35,4 @@ task :check_binstubs do end end -task default: [:spec, :make_bin_executable, :yard, :rubocop, :check_binstubs] +task default: %i[spec make_bin_executable yard rubocop check_binstubs] diff --git a/bin/handler-xmpp.rb b/bin/handler-xmpp.rb index af921bf..173595a 100755 --- a/bin/handler-xmpp.rb +++ b/bin/handler-xmpp.rb @@ -4,6 +4,8 @@ require 'sensu-handler' require 'xmpp4r/client' require 'xmpp4r/muc' + +# TODO: investigate if a require is correct and if not how to fix this. include Jabber class XmppHandler < Sensu::Handler diff --git a/sensu-plugins-xmpp.gemspec b/sensu-plugins-xmpp.gemspec index cca895a..e38c50c 100644 --- a/sensu-plugins-xmpp.gemspec +++ b/sensu-plugins-xmpp.gemspec @@ -4,13 +4,13 @@ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib) require 'date' require_relative 'lib/sensu-plugins-xmpp' -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 = 'Sensu plugins for working with xmpp' 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-xmpp' s.license = 'MIT' s.metadata = { 'maintainer' => 'sensu-plugin', @@ -22,12 +22,13 @@ Gem::Specification.new do |s| s.platform = Gem::Platform::RUBY s.post_install_message = 'You can use the embedded Ruby by setting EMBEDDED_RUBY=true in /etc/default/sensu' s.require_paths = ['lib'] - s.required_ruby_version = '>= 2.0.0' + s.required_ruby_version = '>= 2.1.0' s.summary = 'Sensu plugins for working with xmpp' s.test_files = s.files.grep(%r{^(test|spec|features)/}) s.version = SensuPluginsXmpp::Version::VER_STRING s.add_runtime_dependency 'sensu-plugin', '~> 1.2' + s.add_runtime_dependency 'xmpp4r', '0.5.6' s.add_development_dependency 'bundler', '~> 1.7' @@ -36,7 +37,7 @@ Gem::Specification.new do |s| s.add_development_dependency 'pry', '~> 0.10' s.add_development_dependency 'rake', '~> 10.5' s.add_development_dependency 'redcarpet', '~> 3.2' - s.add_development_dependency 'rubocop', '~> 0.40.0' s.add_development_dependency 'rspec', '~> 3.4' + s.add_development_dependency 'rubocop', '~> 0.51.0' s.add_development_dependency 'yard', '~> 0.8' end