Skip to content

Commit

Permalink
update repo
Browse files Browse the repository at this point in the history
  • Loading branch information
Matt Jones committed May 21, 2015
1 parent 7d16d1f commit a86248c
Show file tree
Hide file tree
Showing 8 changed files with 194 additions and 85 deletions.
1 change: 1 addition & 0 deletions .travis.yml
Expand Up @@ -7,6 +7,7 @@ rvm:
- 1.9.3
- 2.0
- 2.1
- 2.2
notifications:
email:
recipients:
Expand Down
13 changes: 12 additions & 1 deletion CHANGELOG.md
@@ -1 +1,12 @@
#### 0.0.1.alpha.1
#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][unreleased]

## 0.0.1 - 2015-04-30

### Added
- initial release

2 changes: 1 addition & 1 deletion LICENSE
@@ -1,4 +1,4 @@
Copyright (c) 2015 devops@yieldbot.com
Copyright (c) 2015 Sensu-Plugins

MIT License

Expand Down
41 changes: 2 additions & 39 deletions README.md
Expand Up @@ -5,6 +5,7 @@
[![Code Climate](https://codeclimate.com/github/sensu-plugins/sensu-plugins-uchiwa/badges/gpa.svg)](https://codeclimate.com/github/sensu-plugins/sensu-plugins-uchiwa)
[![Test Coverage](https://codeclimate.com/github/sensu-plugins/sensu-plugins-uchiwa/badges/coverage.svg)](https://codeclimate.com/github/sensu-plugins/sensu-plugins-uchiwa)
[![Dependency Status](https://gemnasium.com/sensu-plugins/sensu-plugins-uchiwa.svg)](https://gemnasium.com/sensu-plugins/sensu-plugins-uchiwa)
[ ![Codeship Status for sensu-plugins/sensu-plugins-uchiwa](https://codeship.com/projects/a796ae00-e218-0132-d769-3642858bbef8/status?branch=master)](https://codeship.com/projects/81399)

## Functionality

Expand All @@ -15,45 +16,7 @@

## 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-uchiwa -P MediumSecurity
```

You can also download the key from /certs/ within each repository.

#### Rubygems

`gem install sensu-plugins-uchiwa`

#### 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-uchiwa' do
options('--prerelease')
version '0.0.1.alpha.4'
end
```

Using the Chef **gem_package** resource
```
gem_package 'sensu-plugins-uchiwa' 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

[1]:[https://travis-ci.org/sensu-plugins/sensu-plugins-uchiwa]
[2]:[http://badge.fury.io/rb/sensu-plugins-uchiwa]
[3]:[https://codeclimate.com/github/sensu-plugins/sensu-plugins-uchiwa]
[4]:[https://codeclimate.com/github/sensu-plugins/sensu-plugins-uchiwa]
[5]:[https://gemnasium.com/sensu-plugins/sensu-plugins-uchiwa]
126 changes: 107 additions & 19 deletions Vagrantfile
@@ -1,31 +1,119 @@
# -*- mode: ruby -*-
# vi: set ft=ruby :

require 'json'

VAGRANTFILE_API_VERSION = '2'

<<<<<<< HEAD
Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
config.vm.box = 'chef/centos-6.6'
=======
# Read in the configuration file for the vagrant environment
config_file = JSON.parse(File.read('../GIR/config/vagrant_config.json'))
vagrant_config = config_file['config']

Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
# Standard configurtaion details
>>>>>>> update repo
config.vm.box_download_checksum = true
config.vm.box_download_checksum_type = 'md5'
config.vm.hostname = 'sensu-plugins-dev'

script = <<EOF
sudo yum update -y
sudo yum groupinstall -y development
sudo yum install -y vim nano
#sudo yum install -y ImagicMagic ImageMagick-devel mysql-devel # needed for bundle install
gpg2 --keyserver hkp://keys.gnupg.net --recv-keys D39DC0E3
curl -L get.rvm.io | bash -s stable
source /home/vagrant/.rvm/scripts/rvm
rvm reload
#rvm install 1.9.3
rvm install 2.1.4
#rvm install 2.0.0
#rvm use 1.9.3@sensu_plugins --create
#rvm use 2.0.0@sensu_plugins --create
rvm use 2.1.4@sensu_plugins --create
rvm use 2.1.4@sensu_plugins --default
EOF

config.vm.provision 'shell', inline: script, privileged: false
# None of the boxes have the chef-client installed,
# this will install the latest version for provisioning
config.omnibus.chef_version = :latest

# Local Berkself configuration
# This is used only if you add recipes to the boxes below.
# All dependencies and such for the roles is done with a Berksfile
# in GIR
config.berkshelf.enabled = true

# Box definitions
# The roles and boxes can be found in the above configuration file
# in GIR. If you want to change them you can do so below but any
# lasting changes should be made against GIR unless they are repo specific
config.vm.define 'cent5' do |cent5|
cent5.vm.box = vagrant_config['cent5']['box']
cent5.vm.provision 'chef_zero' do |chef|
chef.roles_path = vagrant_config['cent5']['role_path']
vagrant_config['cent5']['role'].each do |r|
chef.add_role(r)
end
# chef.add_recipe 'apache2'
end
end

config.vm.define 'cent6' do |cent6|
cent6.vm.box = vagrant_config['cent6']['box']
cent6.vm.provision 'chef_zero' do |chef|
chef.roles_path = vagrant_config['cent6']['role_path']
vagrant_config['cent6']['role'].each do |r|
chef.add_role(r)
end
# chef.add_recipe 'apache2'
end
end

config.vm.define 'cent7' do |cent7|
cent7.vm.box = vagrant_config['cent7']['box']
cent7.vm.provision 'chef_zero' do |chef|
chef.roles_path = vagrant_config['cent7']['role_path']
vagrant_config['cent7']['role'].each do |r|
chef.add_role(r)
end
# chef.add_recipe 'apache2'
end
end

config.vm.define 'ubuntu14' do |ubuntu14|
ubuntu14.vm.box = vagrant_config['ubuntu14']['box']
ubuntu14.vm.provision 'chef_zero' do |chef|
chef.roles_path = vagrant_config['ubuntu14']['role_path']
vagrant_config['ubuntu14']['role'].each do |r|
chef.add_role(r)
end
end
end

# The bsd boxes have to be configured differently and require some
# tough love. Shared folders are not available and using NFS will
# likely error due to filename length. You can patch it and use
# NFS if you really want but that is not supported or reccomended
# at this time
#
# This means that when making changes to GIR you will need to do a reload
# or possibly a halt/up on the machine to pull in the latest roles and recipes
config.vm.define 'freebsd92' do |bsd9|
bsd9.vm.guest = :freebsd
# The below line is needed for < freebsd9x only
bsd9.ssh.shell = '/bin/sh'
bsd9.vm.box = vagrant_config['bsd9']['box']

# 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
end
end

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

# 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
end
end
end
16 changes: 12 additions & 4 deletions lib/sensu-plugins-uchiwa.rb
@@ -1,7 +1,15 @@

require 'sensu-plugins-wordpress/version'

# Load the defaults

#
# Set gem version
# Default class
#
module SensuPluginsUchiwa
# Gem version
VERSION = '0.0.1.alpha.1'
module SensuPluginsWordpress
class << self
end

class << self
end
end
28 changes: 28 additions & 0 deletions lib/sensu-plugins-uchiwa/version.rb
@@ -0,0 +1,28 @@
require 'json'

# encoding: utf-8
module SensuPluginsUchiwa
# 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-uchiwa'
BANNER = "#{NAME} v%s"

module_function

def version
format(BANNER, VER_STRING)
end

def json_version
{
'version' => VER_STRING
}.to_json
end
end
end
52 changes: 31 additions & 21 deletions sensu-plugins-uchiwa.gemspec
Expand Up @@ -12,31 +12,41 @@ end
pvt_key = '~/.ssh/gem-private_key.pem'

Gem::Specification.new do |s|
s.name = 'sensu-plugins-uchiwa'
s.version = SensuPluginsUchiwa::VERSION
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 uchiwa'
s.email = '<sensu-users@googlegroups.com>'
s.executables = s.files.grep(%r{^bin/}) { |f| File.basename(f) }
s.files = Dir.glob('{bin,lib}/**/*') + %w(LICENSE README.md CHANGELOG.md)
s.homepage = 'https://github.com/sensu-plugins/sensu-plugins-uchiwa'
s.summary = ''
s.description = ''
s.license = 'MIT'
s.date = Date.today.to_s
s.files = Dir.glob('{bin,lib}/**/*') + %w(LICENSE README.md CHANGELOG.md)
s.executables = s.files.grep(%r{^bin/}) { |f| File.basename(f) }
s.test_files = s.files.grep(%r{^(test|spec|features)/})
s.require_paths = ['lib']
s.cert_chain = ['certs/sensu-plugins.pem']
s.signing_key = File.expand_path(pvt_key) if $PROGRAM_NAME =~ /gem\z/
s.metadata = { 'maintainer' => '',
'development_status' => 'unmaintained',
'production_status' => 'unstable - testing reccomended',
'release_draft' => 'false',
'release_prerelease' => 'false'
}
s.name = 'sensu-plugins-uchiwa'
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 uchiwa'
s.test_files = s.files.grep(%r{^(test|spec|features)/})
s.version = SensuPluginsUchiwa::Version::VER_STRING

s.add_runtime_dependency 'sensu-plugin', '1.1.0'
s.add_runtime_dependency 'json', '1.8.2'

s.add_development_dependency 'codeclimate-test-reporter'
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'
s.add_development_dependency 'github-markup'
s.add_development_dependency 'redcarpet'
s.add_development_dependency 'yard'
s.add_development_dependency 'pry'
s.add_development_dependency 'codeclimate-test-reporter', '~> 0.4'
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'
s.add_development_dependency 'github-markup', '~> 1.3'
s.add_development_dependency 'redcarpet', '~> 3.2'
s.add_development_dependency 'yard', '~> 0.8'
s.add_development_dependency 'pry', '~> 0.10'
end

0 comments on commit a86248c

Please sign in to comment.