diff --git a/.rubocop.yml b/.rubocop.yml index d4a3ed8..7ca2b9b 100644 --- a/.rubocop.yml +++ b/.rubocop.yml @@ -8,6 +8,9 @@ LineLength: AbcSize: Max: 50 +AbcSize: + Max: 50 + FileName: Enabled: false diff --git a/.travis.yml b/.travis.yml index 6bba2d2..67f8cef 100644 --- a/.travis.yml +++ b/.travis.yml @@ -7,6 +7,7 @@ rvm: - 1.9.3 - 2.0 - 2.1 + - 2.2 notifications: email: recipients: diff --git a/CHANGELOG.md b/CHANGELOG.md index a14bc5c..489852b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,4 +1,12 @@ -Change Log +#Change Log This project adheres to [Semantic Versioning](http://semver.org/). -#### 0.0.1.alpha.1 +This CHANGELOG follows the format listed at [Keep A Changelog](http://keepachangelog.com/) + +## Unreleased][unreleased] + +## 0.0.1 - 2015-04-30 + +### Added +- initial release + diff --git a/LICENSE b/LICENSE index 6a08171..f661cbd 100644 --- a/LICENSE +++ b/LICENSE @@ -1,4 +1,4 @@ -Copyright (c) 2015 devops@yieldbot.com +Copyright (c) 2015 Sensu-Plugins MIT License diff --git a/README.md b/README.md index 7eb6091..b94526b 100644 --- a/README.md +++ b/README.md @@ -5,6 +5,8 @@ [![Code Climate](https://codeclimate.com/github/sensu-plugins/sensu-plugins-docker/badges/gpa.svg)](https://codeclimate.com/github/sensu-plugins/sensu-plugins-docker) [![Test Coverage](https://codeclimate.com/github/sensu-plugins/sensu-plugins-docker/badges/coverage.svg)](https://codeclimate.com/github/sensu-plugins/sensu-plugins-docker) [![Dependency Status](https://gemnasium.com/sensu-plugins/sensu-plugins-docker.svg)](https://gemnasium.com/sensu-plugins/sensu-plugins-docker) +[ ![Codeship Status for sensu-plugins/sensu-plugins-dns](https://codeship.com/projects/2f39b7d0-d5af-0132-5eda-2a31c2fb7a04/status?branch=master)](https://codeship.com/projects/78143) + ## Functionality ## Files @@ -16,39 +18,6 @@ ## Installation -Add the public key (if you haven’t already) as a trusted certificate - -``` -gem cert --add <(curl -Ls https://raw.githubusercontent.com/sensu-plugins/sensu-plugins.github.io/master/certs/sensu-plugins.pem) -gem install sensu-plugins-docker -P MediumSecurity -``` - -You can also download the key from /certs/ within each repository. - -#### Rubygems - -`gem install sensu-plugins-docker` - -#### Bundler - -Add *sensu-plugins-docker* to your Gemfile and run `bundle install` or `bundle update` - -#### Chef - -Using the Sensu **sensu_gem** LWRP -``` -sensu_gem 'sensu-plugins-docker' do - options('--prerelease') - version '0.0.1.alpha.1' -end -``` - -Using the Chef **gem_package** resource -``` -gem_package 'sensu-plugins-docker' do - options('--prerelease') - version '0.0.1.alpha.1' -end -``` +[Installation and Setup](https://github.com/sensu-plugins/documentation/blob/master/user_docs/installation_instructions.md) ## Notes diff --git a/Rakefile b/Rakefile index 5e82598..e16f18e 100644 --- a/Rakefile +++ b/Rakefile @@ -1,16 +1,9 @@ - require 'bundler/gem_tasks' - require 'rspec/core/rake_task' - require 'yard' - require 'github/markup' - require 'rubocop/rake_task' - require 'redcarpet' - require 'yard/rake/yardoc_task' desc 'Don\'t run Rubocop for unsupported versions' diff --git a/lib/sensu-plugins-docker.rb b/lib/sensu-plugins-docker.rb index 6390820..22c9e20 100644 --- a/lib/sensu-plugins-docker.rb +++ b/lib/sensu-plugins-docker.rb @@ -1,7 +1,14 @@ +require 'sensu-plugins-docker/version' + +# Load the defaults + # -# Set gem version +# Default class # module SensuPluginsDocker - # Gem version - VERSION = '0.0.1.alpha.1' + class << self + end + + class << self + end end diff --git a/lib/sensu-plugins-docker/version.rb b/lib/sensu-plugins-docker/version.rb new file mode 100644 index 0000000..3bc2151 --- /dev/null +++ b/lib/sensu-plugins-docker/version.rb @@ -0,0 +1,28 @@ +require 'json' + +# encoding: utf-8 +module SensuPluginsDocker + # This defines the version of the gem + module Version + MAJOR = 0 + MINOR = 0 + PATCH = 2 + + VER_STRING = [MAJOR, MINOR, PATCH].compact.join('.') + + NAME = 'sensu-plugins-docker' + BANNER = "#{NAME} v%s" + + module_function + + def version + format(BANNER, VER_STRING) + end + + def json_version + { + 'version' => VER_STRING + }.to_json + end + end +end diff --git a/sensu-plugins-docker.gemspec b/sensu-plugins-docker.gemspec index c4ff5b0..5db21d9 100644 --- a/sensu-plugins-docker.gemspec +++ b/sensu-plugins-docker.gemspec @@ -12,7 +12,7 @@ end pvt_key = '~/.ssh/gem-private_key.pem' Gem::Specification.new do |s| - s.authors = ['Yieldbot, Inc. and contributors'] + s.authors = ['Sensu Plugins and contributors'] s.cert_chain = ['certs/sensu-plugins.pem'] s.date = Date.today.to_s s.description = 'Sensu plugins for docker' @@ -27,6 +27,7 @@ Gem::Specification.new do |s| } s.name = 'sensu-plugins-docker' 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 = '>= 1.9.3' s.signing_key = File.expand_path(pvt_key) if $PROGRAM_NAME =~ /gem\z/ @@ -38,8 +39,8 @@ Gem::Specification.new do |s| s.add_runtime_dependency 'sensu-plugin', '1.1.0' s.add_development_dependency 'codeclimate-test-reporter', '~> 0.4' - s.add_development_dependency 'rubocop', '0.30' - s.add_development_dependency 'rspec', '~> 3.1' +<.add_development_dependency 'rubocop', '~> 0.30' +> s.add_development_dependency 'rspec', '~> 3.1' s.add_development_dependency 'bundler', '~> 1.7' s.add_development_dependency 'rake', '~> 10.0' s.add_development_dependency 'github-markup', '~> 1.3'