Skip to content

Commit a2a9280

Browse files
committed
[CVE-2017-8418] - updating rubocop dependency.
Misc Chanages: - appeased the cops - update changelog guidelines location Breaking Changes: - removed ruby < 2.1 support and testing to satisfy rubocop depenency. Signed-off-by: Ben Abrams <[email protected]>
1 parent 2b6e668 commit a2a9280

6 files changed

+25
-17
lines changed

.github/PULL_REQUEST_TEMPLATE.md

+2-3
Original file line numberDiff line numberDiff line change
@@ -4,15 +4,15 @@
44

55
#### General
66

7-
- [ ] Update Changelog following the conventions laid out on [Keep A Changelog](http://keepachangelog.com/)
7+
- [ ] Update Changelog following the conventions laid out [here](https://github.com/sensu-plugins/community/blob/master/HOW_WE_CHANGELOG.md)
88

99
- [ ] Update README with any necessary configuration snippets
1010

1111
- [ ] Binstubs are created if needed
1212

1313
- [ ] RuboCop passes
1414

15-
- [ ] Existing tests pass
15+
- [ ] Existing tests pass
1616

1717
#### New Plugins
1818

@@ -25,4 +25,3 @@
2525
#### Purpose
2626

2727
#### Known Compatibility Issues
28-

.travis.yml

-2
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@ cache:
44
install:
55
- bundle install
66
rvm:
7-
- 2.0
87
- 2.1
98
- 2.2
109
- 2.3.0
@@ -27,7 +26,6 @@ deploy:
2726
on:
2827
tags: true
2928
all_branches: true
30-
rvm: 2.0
3129
rvm: 2.1
3230
rvm: 2.2
3331
rvm: 2.3.0

CHANGELOG.md

+12-1
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,21 @@
11
# Change Log
22
This project adheres to [Semantic Versioning](http://semver.org/).
33

4-
This CHANGELOG follows the format listed at [Keep A Changelog](http://keepachangelog.com/)
4+
This CHANGELOG follows the format listed [here](https://github.com/sensu-plugins/community/blob/master/HOW_WE_CHANGELOG.md)
55

66
## [Unreleased]
77

8+
### Security
9+
- updated rubocop dependency to `~> 0.51.0` per: https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2017-8418. (@majormoses)
10+
11+
### Breaking Change
12+
- removed < ruby 2.1 support newer version of `rubocop` which was pulled as part of security updates (@majormoses)
13+
14+
### Changed
15+
- updated changelog guidelines location (@majormoses)
16+
- appeased the cops (@majormoses)
17+
18+
819
## [1.0.0] 2017-07-14
920
### Added
1021
- Support for Ruby 2.3

Rakefile

+3-3
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,9 @@ require 'yard'
77
require 'yard/rake/yardoc_task'
88

99
YARD::Rake::YardocTask.new do |t|
10-
OTHER_PATHS = %w().freeze
10+
OTHER_PATHS = %w[].freeze
1111
t.files = ['lib/**/*.rb', 'bin/**/*.rb', OTHER_PATHS]
12-
t.options = %w(--markup-provider=redcarpet --markup=markdown --main=README.md --files CHANGELOG.md)
12+
t.options = %w[--markup-provider=redcarpet --markup=markdown --main=README.md --files CHANGELOG.md]
1313
end
1414

1515
RuboCop::RakeTask.new
@@ -35,4 +35,4 @@ task :check_binstubs do
3535
end
3636
end
3737

38-
task default: [:spec, :make_bin_executable, :yard, :rubocop, :check_binstubs]
38+
task default: %i[spec make_bin_executable yard rubocop check_binstubs]

bin/handler-campfire.rb

+3-3
Original file line numberDiff line numberDiff line change
@@ -32,10 +32,10 @@ def campfire
3232
end
3333

3434
def room
35-
if settings['campfire']['room_id'].nil? # rubocop:disable Style/GuardClause
36-
return campfire.find_room_by_name(settings['campfire']['room'])
35+
if settings['campfire']['room_id'].nil?
36+
campfire.find_room_by_name(settings['campfire']['room'])
3737
else
38-
return campfire.find_room_by_id(settings['campfire']['room_id'])
38+
campfire.find_room_by_id(settings['campfire']['room_id'])
3939
end
4040
end
4141

sensu-plugins-campfire.gemspec

+5-5
Original file line numberDiff line numberDiff line change
@@ -7,14 +7,14 @@ require_relative 'lib/sensu-plugins-campfire'
77

88
# pvt_key = '~/.ssh/gem-private_key.pem'
99

10-
Gem::Specification.new do |s|
10+
Gem::Specification.new do |s| # rubocop:disable Metrics/BlockLength
1111
s.authors = ['Sensu-Plugins and contributors']
1212
# s.cert_chain = ['certs/sensu-plugins.pem']
1313
s.date = Date.today.to_s
1414
s.description = 'Sensu plugins for campfire'
1515
s.email = '<[email protected]>'
1616
s.executables = Dir.glob('bin/**/*.rb').map { |file| File.basename(file) }
17-
s.files = Dir.glob('{bin,lib}/**/*') + %w(LICENSE README.md CHANGELOG.md)
17+
s.files = Dir.glob('{bin,lib}/**/*') + %w[LICENSE README.md CHANGELOG.md]
1818
s.homepage = 'https://github.com/sensu-plugins/sensu-plugins-campfire'
1919
s.license = 'MIT'
2020
s.metadata = { 'maintainer' => 'sensu-plugin',
@@ -26,22 +26,22 @@ Gem::Specification.new do |s|
2626
s.platform = Gem::Platform::RUBY
2727
s.post_install_message = 'You can use the embedded Ruby by setting EMBEDDED_RUBY=true in /etc/default/sensu'
2828
s.require_paths = ['lib']
29-
s.required_ruby_version = '>= 2.0.0'
29+
s.required_ruby_version = '>= 2.1.0'
3030
# s.signing_key = File.expand_path(pvt_key) if $PROGRAM_NAME =~ /gem\z/
3131
s.summary = 'Sensu plugins for campfire'
3232
s.test_files = s.files.grep(%r{^(test|spec|features)/})
3333
s.version = SensuPluginsCampfire::Version::VER_STRING
3434

35-
s.add_runtime_dependency 'tinder', '1.10.1'
3635
s.add_runtime_dependency 'sensu-plugin', '~> 1.2'
36+
s.add_runtime_dependency 'tinder', '1.10.1'
3737

3838
s.add_development_dependency 'bundler', '~> 1.7'
3939
s.add_development_dependency 'codeclimate-test-reporter', '~> 0.4'
4040
s.add_development_dependency 'github-markup', '~> 1.3'
4141
s.add_development_dependency 'pry', '~> 0.10'
4242
s.add_development_dependency 'rake', '~> 10.5'
4343
s.add_development_dependency 'redcarpet', '~> 3.2'
44-
s.add_development_dependency 'rubocop', '~> 0.40.0'
4544
s.add_development_dependency 'rspec', '~> 3.4'
45+
s.add_development_dependency 'rubocop', '~> 0.51.0'
4646
s.add_development_dependency 'yard', '~> 0.8'
4747
end

0 commit comments

Comments
 (0)