Skip to content

Commit 785fb48

Browse files
author
Matt Jones
committed
update repo
1 parent 0a3392a commit 785fb48

File tree

5 files changed

+54
-51
lines changed

5 files changed

+54
-51
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+

CHANGELOG.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ This project adheres to [Semantic Versioning](http://semver.org/).
33

44
This CHANGELOG follows the format listed at [Keep A Changelog](http://keepachangelog.com/)
55

6-
## Unreleased
6+
## [Unreleased]
77

88
## [0.0.3] - 2015-07-14
99
### Changed

Rakefile

Lines changed: 19 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,24 @@
11
require 'bundler/gem_tasks'
2-
require 'rspec/core/rake_task'
3-
require 'rubocop/rake_task'
42
require 'github/markup'
53
require 'redcarpet'
4+
require 'rspec/core/rake_task'
5+
require 'rubocop/rake_task'
66
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]
21-
t.options = %w(--markup-provider=redcarpet --markup=markdown --main=README.md --files CHANGELOG.md,CONTRIBUTING.md)
21+
t.options = %w(--markup-provider=redcarpet --markup=markdown --main=README.md --files CHANGELOG.md)
2222
end
2323

2424
RuboCop::RakeTask.new
@@ -32,20 +32,16 @@ task :make_bin_executable do
3232
`chmod -R +x bin/*`
3333
end
3434

35-
desc 'Retrieve the current version'
36-
task :version do
37-
puts SensuPluginsUchiwa::Version.json_version
38-
end
39-
40-
desc 'Bump the PATCH version'
41-
task :bump do
42-
version_file = 'lib/sensu-plugins-uchiwa/version.rb'
43-
44-
# Read the file, bump the PATCH version
45-
contents = File.read(version_file).gsub(/(PATCH = )(\d+)/) { |_| Regexp.last_match[1] + (Regexp.last_match[2].to_i + 1).to_s }
46-
47-
# Write the new contents of the file
48-
File.open(version_file, 'w') { |file| file.puts contents }
35+
desc 'Test for binstubs'
36+
task :check_binstubs do
37+
bin_list = Gem::Specification.load('sensu-plugins-ansible.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
4945
end
5046

5147
task default: args

certs/sensu-plugins.pem

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

sensu-plugins-uchiwa.gemspec

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

12-
pvt_key = '~/.ssh/gem-private_key.pem'
12+
#pvt_key = '~/.ssh/gem-private_key.pem'
1313

1414
Gem::Specification.new do |s|
1515
s.authors = ['Sensu-Plugins and contributors']
16-
s.cert_chain = ['certs/sensu-plugins.pem']
16+
#s.cert_chain = ['certs/sensu-plugins.pem']
1717
s.date = Date.today.to_s
1818
s.description = 'Sensu plugins for uchiwa'
1919
s.email = '<sensu-users@googlegroups.com>'
20-
s.executables = Dir.glob('bin/**/*').map { |file| File.basename(file) }
20+
s.executables = Dir.glob('bin/**/*.rb').map { |file| File.basename(file) }
2121
s.files = Dir.glob('{bin,lib}/**/*') + %w(LICENSE README.md CHANGELOG.md)
2222
s.homepage = 'https://github.com/sensu-plugins/sensu-plugins-uchiwa'
2323
s.license = 'MIT'
@@ -32,15 +32,15 @@ Gem::Specification.new do |s|
3232
s.post_install_message = 'You can use the embedded Ruby by setting EMBEDDED_RUBY=true in /etc/default/sensu'
3333
s.require_paths = ['lib']
3434
s.required_ruby_version = '>= 1.9.3'
35-
s.signing_key = File.expand_path(pvt_key) if $PROGRAM_NAME =~ /gem\z/
35+
#s.signing_key = File.expand_path(pvt_key) if $PROGRAM_NAME =~ /gem\z/
3636
s.summary = 'Sensu plugins for uchiwa'
3737
s.test_files = s.files.grep(%r{^(test|spec|features)/})
3838
s.version = SensuPluginsUchiwa::Version::VER_STRING
3939

40-
s.add_runtime_dependency 'sensu-plugin', '1.2.0'
40+
s.add_runtime_dependency 'sensu-plugin', '~> 1.2'
4141

4242
s.add_development_dependency 'codeclimate-test-reporter', '~> 0.4'
43-
s.add_development_dependency 'rubocop', '0.32.1'
43+
s.add_development_dependency 'rubocop', '~> 0.37'
4444
s.add_development_dependency 'rspec', '~> 3.1'
4545
s.add_development_dependency 'bundler', '~> 1.7'
4646
s.add_development_dependency 'rake', '~> 10.0'

0 commit comments

Comments
 (0)