Skip to content

Commit

Permalink
deploy
Browse files Browse the repository at this point in the history
  • Loading branch information
Matt Jones committed May 1, 2015
1 parent 11e11bf commit 7ed5809
Show file tree
Hide file tree
Showing 11 changed files with 99 additions and 75 deletions.
19 changes: 11 additions & 8 deletions .rubocop.yml
Original file line number Diff line number Diff line change
@@ -1,24 +1,27 @@

MethodLength:
Max: 200
Max: 200

LineLength:
Max: 160
Max: 160

AbcSize:
Max: 50

FileName:
Enabled: false
Enabled: false

PerceivedComplexity:
Enabled: false
Enabled: false

CyclomaticComplexity:
Enabled: false
Enabled: false

ClassLength:
Enabled: false
Enabled: false

IfUnlessModifier:
Enabled: false
Enabled: false

RegexpLiteral:
Enabled: false
Enabled: false
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ notifications:
on_failure: always
email:
recipients:
- [email protected]
- [email protected]
- [email protected]
on_success: change
on_failure: always
Expand Down
55 changes: 33 additions & 22 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,36 +1,47 @@
#### 0.1.0-alpha.1
#Change Log
This project adheres to [Semantic Versioning](http://semver.org/).

* baseline release identical to **sensu-community-plugins** repo
* changed *check-procs* to *check-process* to better reflect its use
* basic yard coverage
* pinned dependencies
* built against 1.9.3, 2.0, 2.1
* cryptographically signed
This CHANGELOG follows the format listed at [Keep A Changelog](http://keepachangelog.com/)

#### 0.0.1-alpha.2
## Unreleased][unreleased]

* bump Vagrant to Chef 6.6
* update LICENSE and gemspec authors
* update README
* add required Ruby version *>= 1.9.3*
* add test/spec_help.rb
## 0.0.1 - 2015-05-01

#### 0.0.1-alpha.3
### Added
- initial release

* add proc-status-metrics
* change proc-status-metrics to process-status-metrics
#### 0.0.1.alpha.6

* add chef provisioner to Vagrantfile
* fix rubocop errors
* add metadata to gemspec

#### 0.0.1.alpha.5

* add new check for process uptime metrics

#### 0.0.1.alpha.4

* convert scrips to sys-proctable gem for platform independence

#### 0.0.1.alpha.5
#### 0.0.1-alpha.3

* add new check for process uptime metrics
* add proc-status-metrics
* change proc-status-metrics to process-status-metrics

#### 0.0.1.alpha.6
#### 0.0.1-alpha.2

* add chef provisioner to Vagrantfile
* fix rubocop errors
* add metadata to gemspec
* bump Vagrant to Chef 6.6
* update LICENSE and gemspec authors
* update README
* add required Ruby version *>= 1.9.3*
* add test/spec_help.rb

#### 0.1.0-alpha.1

* baseline release identical to **sensu-community-plugins** repo
* changed *check-procs* to *check-process* to better reflect its use
* basic yard coverage
* pinned dependencies
* built against 1.9.3, 2.0, 2.1
* cryptographically signed
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
Copyright (c) 2015 [email protected]
Copyright (c) 2015 Sensu-Plugins

MIT License

Expand Down
27 changes: 3 additions & 24 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
[![Code Climate](https://codeclimate.com/github/sensu-plugins/sensu-plugins-process-checks/badges/gpa.svg)](https://codeclimate.com/github/sensu-plugins/sensu-plugins-process-checks)
[![Test Coverage](https://codeclimate.com/github/sensu-plugins/sensu-plugins-process-checks/badges/coverage.svg)](https://codeclimate.com/github/sensu-plugins/sensu-plugins-process-checks)
[![Dependency Status](https://gemnasium.com/sensu-plugins/sensu-plugins-process-checks.svg)](https://gemnasium.com/sensu-plugins/sensu-plugins-process-checks)
[ ![Codeship Status for sensu-plugins/sensu-plugins-process-checks](https://codeship.com/projects/feb27000-d25e-0132-6aab-4ad10baf29cc/status?branch=master)](https://codeship.com/projects/77521)

## Functionality

Expand All @@ -23,30 +24,8 @@

## Usage

#### Rubygems
### Installation

`gem install sensu-plugins-process-checks`

#### Bundler

Add *sensu-plugins-disk-checks* to your Gemfile and run `bundle install` or `bundle update`

#### Chef

Using the Sensu **sensu_gem** LWRP
```
sensu_gem 'sensu-plugins-process-checks' do
options('--prerelease')
version '0.0.1.alpha.4'
end
```

Using the Chef **gem_package** resource
```
gem_package 'sensu-plugins-process-checks' do
options('--prerelease')
version '0.0.1.alpha.4'
end
```
[Installation and Setup](https://github.com/sensu-plugins/documentation/blob/master/user_docs/installation_instructions.md)

## Notes
2 changes: 1 addition & 1 deletion Rakefile
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ YARD::Rake::YardocTask.new do |t|
t.options = %w(--markup-provider=redcarpet --markup=markdown --main=README.md --files CHANGELOG.md)
end

Rubocop::RakeTask.new
RuboCop::RakeTask.new

RSpec::Core::RakeTask.new(:spec) do |r|
r.pattern = FileList['**/**/*_spec.rb']
Expand Down
13 changes: 3 additions & 10 deletions Vagrantfile
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,8 @@ VAGRANTFILE_API_VERSION = '2'
config_file = JSON.parse(File.read('../GIR/config/vagrant_config.json'))
vagrant_config = config_file['config']

# The vagrant boxes are provisioned by Chef.
# If this is nothing something you want to deal with then comment out the
# provisioner and chef and berkshelf lines. The boxes as they stand are
# fairly barebones but should contain enough for basic development and
# initial testing.
Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
# Standard configuration details
# Standard configurtaion details
config.vm.box_download_checksum = true
config.vm.box_download_checksum_type = 'md5'
config.vm.hostname = 'sensu-plugins-dev'
Expand Down Expand Up @@ -91,31 +86,29 @@ Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
bsd9.ssh.shell = '/bin/sh'
bsd9.vm.box = vagrant_config['bsd9']['box']

# Use rsync in place of shared folders
# Use rsync as a shared folder
bsd9.vm.synced_folder '.', '/vagrant', type: 'rsync'
bsd9.vm.provision 'chef_zero' do |chef|
chef.synced_folder_type = 'rsync'
chef.roles_path = vagrant_config['bsd9']['role_path']
vagrant_config['bsd9']['role'].each do |r|
chef.add_role(r)
end
# chef.add_recipe 'apache2'
end
end

config.vm.define 'freebsd10' do |bsd10|
bsd10.vm.guest = :freebsd
bsd10.vm.box = vagrant_config['bsd10']['box']

# Use rsync in place of shared folders
# Use rsync as a shared folder
bsd10.vm.synced_folder '.', '/vagrant', type: 'rsync'
bsd10.vm.provision 'chef_zero' do |chef|
chef.synced_folder_type = 'rsync'
chef.roles_path = vagrant_config['bsd10']['role_path']
vagrant_config['bsd10']['role'].each do |r|
chef.add_role(r)
end
# chef.add_recipe 'apache2'
end
end
end
2 changes: 1 addition & 1 deletion bin/metrics-process-status.rb
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ def acquire_stats_for_pid(pid) # rubocop:disable all
out = { "#{cmdline}" => {} }

metric_names.each do |m|
line = proc_status_lines.select { |x| /^#{m}/.match(x) }.first
line = proc_status_lines.select { |x| /^#{m}/.match(x) }.first # rubocop:disable all
val = line ? line.split("\t")[1].to_i : nil
out[cmdline.to_s][m] = val
end
Expand Down
13 changes: 10 additions & 3 deletions lib/sensu-plugins-process-checks.rb
Original file line number Diff line number Diff line change
@@ -1,7 +1,14 @@
require 'sensu-plugins-process-checks/version'

# Load the defaults

#
# Set gem version
# Default class
#
module SensuPluginsProcessChecks
# Gem version
VERSION = '0.0.1.alpha.5'
class << self
end

class << self
end
end
28 changes: 28 additions & 0 deletions lib/sensu-plugins-process-checks/version.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
require 'json'

# encoding: utf-8
module SensuPluginsProcessChecks
# This defines the version of the gem
module Version
MAJOR = 0
MINOR = 0
PATCH = 1

VER_STRING = [MAJOR, MINOR, PATCH].compact.join('.')

NAME = 'sensu-plugins-process-checks'
BANNER = "#{NAME} v%s"

module_function

def version
format(BANNER, VER_STRING)
end

def json_version
{
'version' => VER_STRING
}.to_json
end
end
end
11 changes: 7 additions & 4 deletions sensu-plugins-process-checks.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,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 checking running processes'
Expand All @@ -22,24 +22,27 @@ Gem::Specification.new do |s|
s.license = 'MIT'
s.metadata = { 'maintainer' => '@rmc3',
'development_status' => 'active',
'production_status' => 'unstable - testing recommended'
'production_status' => 'unstable - testing recommended',
'release_draft' => 'false',
'release_prerelease' => 'false'
}
s.name = 'sensu-plugins-sensu-plugins-process-checks'
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/
s.summary = 'Sensu plugins for checking running processes'
s.test_files = s.files.grep(%r{^(test|spec|features)/})
s.version = SensuPluginsProcessChecks::VERSION
s.version = SensuPluginsProcessChecks::Version::VER_STRING

s.add_runtime_dependency 'english', '0.6.3'
s.add_runtime_dependency 'sensu-plugin', '1.1.0'
s.add_runtime_dependency 'json', '1.8.2'
s.add_runtime_dependency 'sys-proctable', '0.9.6'

s.add_development_dependency 'codeclimate-test-reporter', '~> 0.4'
s.add_development_dependency 'rubocop', '0.17.0'
s.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'
Expand Down

0 comments on commit 7ed5809

Please sign in to comment.