-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
0b2d68b
commit f7b74ca
Showing
11 changed files
with
209 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
#Change Log | ||
This project adheres to [Semantic Versioning](http://semver.org/). | ||
|
||
This CHANGELOG follows the format listed at [Keep A Changelog](http://keepachangelog.com/) | ||
|
||
## Unreleased | ||
## [0.0.1] - 2017-05-06 | ||
## Added | ||
- Basic Skel to be used to make new plugin repo setup easier. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
[Development Documentation](http://sensu-plugins.io/docs/developer_guidelines.html) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
source 'https://rubygems.org' | ||
|
||
gemspec |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
The MIT License (MIT) | ||
|
||
Copyright (c) 2016 Sensu Community Plugins | ||
|
||
Permission is hereby granted, free of charge, to any person obtaining a copy | ||
of this software and associated documentation files (the "Software"), to deal | ||
in the Software without restriction, including without limitation the rights | ||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | ||
copies of the Software, and to permit persons to whom the Software is | ||
furnished to do so, subject to the following conditions: | ||
|
||
The above copyright notice and this permission notice shall be included in all | ||
copies or substantial portions of the Software. | ||
|
||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | ||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | ||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, | ||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE | ||
SOFTWARE. | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,19 @@ | ||
# sensu-plugins-skel | ||
A skeleton repository to be used for creating new plugin repos. | ||
## Sensu-Plugins-skel | ||
|
||
[![Build Status](https://travis-ci.org/sensu-plugins/sensu-plugins-skel.svg?branch=master)](https://travis-ci.org/sensu-plugins/sensu-plugins-skel) | ||
[![Gem Version](https://badge.fury.io/rb/sensu-plugins-skel.svg)](http://badge.fury.io/rb/sensu-plugins-skel) | ||
[![Code Climate](https://codeclimate.com/github/sensu-plugins/sensu-plugins-skel/badges/gpa.svg)](https://codeclimate.com/github/sensu-plugins/sensu-plugins-skel) | ||
[![Test Coverage](https://codeclimate.com/github/sensu-plugins/sensu-plugins-skel/badges/coverage.svg)](https://codeclimate.com/github/sensu-plugins/sensu-plugins-skel) | ||
[![Dependency Status](https://gemnasium.com/sensu-plugins/sensu-plugins-skel.svg)](https://gemnasium.com/sensu-plugins/sensu-plugins-skel) | ||
|
||
## Functionality | ||
|
||
## Files | ||
|
||
## Usage | ||
|
||
## Installation | ||
|
||
[Installation and Setup](http://sensu-plugins.io/docs/installation_instructions.html) | ||
|
||
## Notes |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
require 'bundler/gem_tasks' | ||
require 'github/markup' | ||
require 'redcarpet' | ||
require 'rspec/core/rake_task' | ||
require 'rubocop/rake_task' | ||
require 'yard' | ||
require 'yard/rake/yardoc_task' | ||
|
||
args = [:spec, :make_bin_executable, :yard, :rubocop, :check_binstubs] | ||
|
||
YARD::Rake::YardocTask.new do |t| | ||
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) | ||
end | ||
|
||
RuboCop::RakeTask.new | ||
|
||
RSpec::Core::RakeTask.new(:spec) do |r| | ||
r.pattern = FileList['**/**/*_spec.rb'] | ||
end | ||
|
||
desc 'Make all plugins executable' | ||
task :make_bin_executable do | ||
`chmod -R +x bin/*` | ||
end | ||
|
||
desc 'Test for binstubs' | ||
task :check_binstubs do | ||
bin_list = Gem::Specification.load('sensu-plugins-load-checks.gemspec').executables | ||
bin_list.each do |b| | ||
`which #{ b }` | ||
unless $CHILD_STATUS.success? | ||
puts "#{b} was not a binstub" | ||
exit | ||
end | ||
end | ||
end | ||
|
||
task default: args |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
-----BEGIN CERTIFICATE----- | ||
MIIDgDCCAmigAwIBAgIBATANBgkqhkiG9w0BAQUFADBDMRIwEAYDVQQDDAltYXR0 | ||
am9uZXMxGDAWBgoJkiaJk/IsZAEZFgh5aWVsZGJvdDETMBEGCgmSJomT8ixkARkW | ||
A2NvbTA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ym0PkB4lk | ||
HP0m8WSjZmFr109pE/sVsM5jtOCvogyujQOjNVGN4gz1wwPr | ||
-----END CERTIFICATE----- |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
require 'sensu-plugins-skel/version' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
module SensuPluginsSkel | ||
module Version | ||
MAJOR = 0 | ||
MINOR = 0 | ||
PATCH = 1 | ||
|
||
VER_STRING = [MAJOR, MINOR, PATCH].compact.join('.') | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
lib = File.expand_path('../lib', __FILE__) | ||
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib) | ||
|
||
require 'date' | ||
|
||
if RUBY_VERSION < '2.0.0' | ||
require 'sensu-plugins-skel' | ||
else | ||
require_relative 'lib/sensu-plugins-skel' | ||
end | ||
|
||
pvt_key = '~/.ssh/gem-private_key.pem' | ||
|
||
Gem::Specification.new do |s| | ||
s.authors = ['Sensu-Plugins and contributors'] | ||
s.cert_chain = ['certs/sensu-plugins.pem'] | ||
s.date = Date.today.to_s | ||
s.description = 'Sensu skel plugins' | ||
s.email = '<sensu-users@googlegroups.com>' | ||
s.executables = Dir.glob('bin/**/*.rb').map { |file| File.basename(file) } | ||
s.files = Dir.glob('{bin,lib}/**/*') + %w(LICENSE README.md CHANGELOG.md) | ||
s.homepage = 'https://github.com/sensu-plugins/sensu-plugins-skel' | ||
s.license = 'MIT' | ||
s.metadata = { 'maintainer' => 'sensu-plugin', | ||
'development_status' => 'active', | ||
'production_status' => 'unstable - testing recommended', | ||
'release_draft' => 'false', | ||
'release_prerelease' => 'false' | ||
} | ||
s.name = 'sensu-plugins-skel' | ||
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.signing_key = File.expand_path(pvt_key) if $PROGRAM_NAME =~ /gem\z/ | ||
s.summary = 'Sensu plugins for mailer' | ||
s.test_files = s.files.grep(%r{^(test|spec|features)/}) | ||
s.version = SensuPluginsskel::Version::VER_STRING | ||
|
||
s.add_runtime_dependency 'sensu-plugin', '~> 1.2.0' | ||
|
||
s.add_development_dependency 'bundler', '~> 1.7' | ||
s.add_development_dependency 'codeclimate-test-reporter', '~> 0.4' | ||
s.add_development_dependency 'github-markup', '~> 1.3' | ||
s.add_development_dependency 'pry', '~> 0.10' | ||
s.add_development_dependency 'rake', '~> 10.0' | ||
s.add_development_dependency 'redcarpet', '~> 3.2' | ||
s.add_development_dependency 'rubocop', '0.32.1' | ||
s.add_development_dependency 'rspec', '~> 3.1' | ||
s.add_development_dependency 'yard', '~> 0.8' | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
language: ruby | ||
cache: | ||
- bundler | ||
install: | ||
- bundle install | ||
rvm: | ||
- 2.0 | ||
- 2.1 | ||
- 2.2 | ||
- 2.3.0 | ||
notifications: | ||
email: | ||
recipients: | ||
- sensu-plugin@sensu-plugins.io | ||
on_success: change | ||
on_failure: always | ||
script: | ||
- bundle exec rake default | ||
- gem build sensu-plugins-skel.gemspec | ||
- gem install sensu-plugins-skel-*.gem | ||
deploy: | ||
provider: rubygems | ||
api_key: | ||
secure: J19rBhFsEYozDnd5nAqLVGldCJRsyT5//9ZqbbtLIxgnoNllEPA0Qq3X358zkjZ8b1L+JrnRjv+/WyXNrUkXMP0/YLgy5T1rG90HhGp2dqXacF20Tj/6so4y8S4WKv7Y3Kf4vdxQFlPPBOaYzhvDkeIQuPUBxjMHvpmvsrK3RPg= | ||
gem: sensu-plugins-load-checks | ||
on: | ||
tags: true | ||
all_branches: true | ||
rvm: 2.0 | ||
rvm: 2.1 | ||
rvm: 2.2 | ||
rvm: 2.3.0 | ||
repo: sensu-plugins/sensu-plugins-skel |