Skip to content

Commit 25ebb44

Browse files
author
Matt Jones
committed
update repo
1 parent add6e1e commit 25ebb44

File tree

7 files changed

+87
-54
lines changed

7 files changed

+87
-54
lines changed

.github/PULL_REQUEST_TEMPLATE.md

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
## Pull Request Checklist
2+
3+
**Is this in reference to an existing issue?**
4+
5+
#### General
6+
7+
- [ ] Update Changelog following the conventions laid out on [Keep A Changelog](http://keepachangelog.com/)
8+
9+
- [ ] Update README with any necessary configuration snippets
10+
11+
- [ ] Binstubs are created if needed
12+
13+
- [ ] RuboCop passes
14+
15+
- [ ] Existing tests pass
16+
17+
#### New Plugins
18+
19+
- [ ] Tests
20+
21+
- [ ] Add the plugin to the README
22+
23+
- [ ] Does it have a complete header as outlined [here](http://sensu-plugins.io/docs/developer_guidelines.html#coding-style)
24+
25+
#### Purpose
26+
27+
#### Known Compatablity Issues
28+

.travis.yml

Lines changed: 23 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,33 @@
11
language: ruby
22
cache:
3-
- bundler
3+
- bundler
44
install:
5-
- bundle install
5+
- bundle install
66
rvm:
7-
- 1.9.3
8-
- 2.0
9-
- 2.1
10-
- 2.2
7+
- 1.9.3
8+
- 2.0
9+
- 2.1
10+
- 2.2
1111
notifications:
1212
email:
1313
recipients:
14-
- sensu-plugin@sensu-plugins.io
14+
- sensu-plugin@sensu-plugins.io
1515
on_success: change
1616
on_failure: always
17-
1817
script:
19-
- 'bundle exec rake default'
18+
- bundle exec rake default
19+
- gem build sensu-plugins-zookeeper.gemspec
20+
- gem install sensu-plugins-zookeeper-*.gem
21+
deploy:
22+
provider: rubygems
23+
api_key:
24+
secure: Mswd19ZpQU0RqJEy2GnyDWTNgd9QCFYuN1q8bqs2U7lHpXARhLI+WDdCCfiyfiMQHxxOyrRLsra12DcREyaOQocQk2rGnlIEfu6GxmRytjyB8MLvowUgWun2D5Rxe4nvXeB5DSReZQMr0K2hm24FmMaUtBSu9N4rnciEn2EgCNM=
25+
gem: sensu-plugins-zookeeper
26+
on:
27+
ags: true
28+
all_branches: true
29+
rvm: 1.9.3
30+
rvm: 2.0
31+
rvm: 2.1
32+
rvm: 2.2
33+
repo: sensu-plugins/sensu-plugins-zookeeper

CHANGELOG.md

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,15 +19,18 @@ This CHANGELOG follows the format listed at [Keep A Changelog](http://keepachang
1919
- updated sensu-plugin gem to 1.2.0
2020

2121
## [0.0.2] - 2015-06-03
22-
2322
### Fixed
2423
- added binstubs
2524

2625
### Changed
2726
- removed cruft from /lib
2827

2928
## 0.0.1 - 2015-04-30
30-
3129
### Added
3230
- initial release
3331

32+
[Unreleased]: https://github.com/sensu-plugins/sensu-plugins-zookeeper/compare/0.1.0...HEAD
33+
[0.1.0]: https://github.com/sensu-plugins/sensu-plugins-zookeeper/compare/0.0.4...0.1.0
34+
[0.0.4]: https://github.com/sensu-plugins/sensu-plugins-zookeeper/compare/0.0.3...0.0.4
35+
[0.0.3]: https://github.com/sensu-plugins/sensu-plugins-zookeeper/compare/0.0.2...0.0.3
36+
[0.0.2]: https://github.com/sensu-plugins/sensu-plugins-zookeeper/compare/0.0.1...0.0.2

README.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@
55
[![Code Climate](https://codeclimate.com/github/sensu-plugins/sensu-plugins-zookeeper/badges/gpa.svg)](https://codeclimate.com/github/sensu-plugins/sensu-plugins-zookeeper)
66
[![Test Coverage](https://codeclimate.com/github/sensu-plugins/sensu-plugins-zookeeper/badges/coverage.svg)](https://codeclimate.com/github/sensu-plugins/sensu-plugins-zookeeper)
77
[![Dependency Status](https://gemnasium.com/sensu-plugins/sensu-plugins-zookeeper.svg)](https://gemnasium.com/sensu-plugins/sensu-plugins-zookeeper)
8-
[ ![Codeship Status for sensu-plugins/sensu-plugins-zookeeper](https://codeship.com/projects/98cfbff0-e201-0132-51cf-3642858bbef8/status?branch=master)](https://codeship.com/projects/81353)
98

109
## Functionality
1110

Rakefile

Lines changed: 22 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,22 @@
11
require 'bundler/gem_tasks'
2-
require 'rspec/core/rake_task'
3-
require 'yard'
42
require 'github/markup'
5-
require 'rubocop/rake_task'
63
require 'redcarpet'
4+
require 'rspec/core/rake_task'
5+
require 'rubocop/rake_task'
6+
require 'yard'
77
require 'yard/rake/yardoc_task'
88

99
desc 'Don\'t run Rubocop for unsupported versions'
1010
begin
11-
if RUBY_VERSION >= '2.0.0'
12-
args = [:spec, :make_bin_executable, :yard, :rubocop]
13-
else
14-
args = [:spec, :make_bin_executable, :yard]
15-
end
11+
args = if RUBY_VERSION >= '2.0.0'
12+
[:spec, :make_bin_executable, :yard, :rubocop, :check_binstubs]
13+
else
14+
[:spec, :make_bin_executable, :yard]
15+
end
1616
end
1717

1818
YARD::Rake::YardocTask.new do |t|
19-
OTHER_PATHS = %w()
19+
OTHER_PATHS = %w().freeze
2020
t.files = ['lib/**/*.rb', 'bin/**/*.rb', OTHER_PATHS]
2121
t.options = %w(--markup-provider=redcarpet --markup=markdown --main=README.md --files CHANGELOG.md)
2222
end
@@ -29,7 +29,19 @@ end
2929

3030
desc 'Make all plugins executable'
3131
task :make_bin_executable do
32-
`chmod -R +x bin/***/*.rb`
32+
`chmod -R +x bin/*`
33+
end
34+
35+
desc 'Test for binstubs'
36+
task :check_binstubs do
37+
bin_list = Gem::Specification.load('sensu-plugins-zookeeper.gemspec').executables
38+
bin_list.each do |b|
39+
`which #{ b }`
40+
unless $CHILD_STATUS.success?
41+
puts "#{b} was not a binstub"
42+
exit
43+
end
44+
end
3345
end
3446

3547
task default: args

certs/sensu-plugins.pem

Lines changed: 0 additions & 21 deletions
This file was deleted.

sensu-plugins-zookeeper.gemspec

Lines changed: 9 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -9,15 +9,13 @@ else
99
require_relative 'lib/sensu-plugins-zookeeper'
1010
end
1111

12-
pvt_key = '~/.ssh/gem-private_key.pem'
13-
1412
Gem::Specification.new do |s|
1513
s.authors = ['Sensu Plugins and contributors']
16-
s.cert_chain = ['certs/sensu-plugins.pem']
14+
1715
s.date = Date.today.to_s
1816
s.description = 'Zookeeper plugins for checks and metrics'
1917
s.email = '<sensu-users@googlegroups.com>'
20-
s.executables = Dir.glob('bin/**/*').map { |file| File.basename(file) }
18+
s.executables = Dir.glob('bin/**/*.rb').map { |file| File.basename(file) }
2119
s.files = Dir.glob('{bin,lib}/**/*') + %w(LICENSE README.md CHANGELOG.md)
2220
s.homepage = 'https://github.com/sensu-plugins/sensu-plugins-zookeeper'
2321
s.license = 'MIT'
@@ -30,21 +28,21 @@ Gem::Specification.new do |s|
3028
s.post_install_message = 'You can use the embedded Ruby by setting EMBEDDED_RUBY=true in /etc/default/sensu'
3129
s.require_paths = ['lib']
3230
s.required_ruby_version = '>= 1.9.3'
33-
s.signing_key = File.expand_path(pvt_key) if $PROGRAM_NAME =~ /gem\z/
31+
3432
s.summary = 'Sensu plugins for zookeeper'
3533
s.test_files = s.files.grep(%r{^(test|spec|features)/})
3634
s.version = SensuPluginsZookeeper::Version::VER_STRING
3735

38-
s.add_runtime_dependency 'sensu-plugin', '1.2.0'
36+
s.add_runtime_dependency 'sensu-plugin', '~> 1.2'
3937
s.add_runtime_dependency 'zookeeper', '1.4.11'
4038

41-
s.add_development_dependency 'codeclimate-test-reporter', '~> 0.4'
42-
s.add_development_dependency 'rubocop', '0.32.1'
43-
s.add_development_dependency 'rspec', '~> 3.1'
4439
s.add_development_dependency 'bundler', '~> 1.7'
45-
s.add_development_dependency 'rake', '~> 10.0'
40+
s.add_development_dependency 'codeclimate-test-reporter', '~> 0.4'
4641
s.add_development_dependency 'github-markup', '~> 1.3'
42+
s.add_development_dependency 'pry', '~> 0.10'
43+
s.add_development_dependency 'rake', '~> 10.5'
4744
s.add_development_dependency 'redcarpet', '~> 3.2'
45+
s.add_development_dependency 'rubocop', '~> 0.37'
46+
s.add_development_dependency 'rspec', '~> 3.4'
4847
s.add_development_dependency 'yard', '~> 0.8'
49-
s.add_development_dependency 'pry', '~> 0.10'
5048
end

0 commit comments

Comments
 (0)