Skip to content

Commit

Permalink
Merge pull request #214 from voxpupuli/modulesync
Browse files Browse the repository at this point in the history
modulesync 0.6.0 & renaming
  • Loading branch information
nibalizer committed May 8, 2016
2 parents 881be27 + 03137fd commit 65ac8c2
Show file tree
Hide file tree
Showing 20 changed files with 315 additions and 173 deletions.
24 changes: 12 additions & 12 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
.*.sw?
pkg
spec/fixtures
.vagrant
log
.DS_Store
.idea
pkg/
Gemfile.lock
.project
/.bundle
/vendor
/.vendor
/coverage
Gemfile.local
vendor/
.vendor/
spec/fixtures/
.vagrant/
.bundle/
coverage/
log/
.idea/
*.iml
.*.sw
21 changes: 14 additions & 7 deletions .rubocop.yml
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
AllCops:
TargetRubyVersion: 1.9
Include:
- ./**/*.rb
Exclude:
# Ignore HTML related things
- '**/*.erb'
# Ignore vendored gems
- 'vendor/**/*'
# Ignore code from test fixtures
- 'spec/fixtures/**/*'
- vendor/**/*
- .vendor/**/*
- pkg/**/*
- spec/fixtures/**/*

Lint/ConditionPosition:
Enabled: true
Expand Down Expand Up @@ -55,10 +56,13 @@ Style/AndOr:
Style/RedundantSelf:
Enabled: true

# DISABLED - not useful
# Method length is not necessarily an indicator of code quality
Metrics/MethodLength:
Enabled: false

Metrics/ModuleLength:
Enabled: false

Style/WhileUntilModifier:
Enabled: true

Expand Down Expand Up @@ -480,3 +484,6 @@ Metrics/PerceivedComplexity:

Lint/UselessAssignment:
Enabled: true

Style/ClosingParenthesisIndentation:
Enabled: false
3 changes: 3 additions & 0 deletions .sync.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
---
.travis.yml:
secure: "ijm7hKPYWr1eg7151g5oK6MzZL4ojrgWjKlxgoBHXAdXdY88opMgvixfSJK5IMUbtanPfWRkqqABx+MYO78nfQBWDlghUzZ8sQXFeO2Ie0PgWl4nFV0kKWz+ejVaZC4dKSZlWha5pO1ek+sx7KnjIBZY82OXs/GXbjwhHx6d56YugXLuCyvfFxC7mXC9wF58bPwcYRCBSZt9CRl0OMBAFybxjdwsFMloRRhdz7f3hhlqF8Nrs1sxG1HhgiMcnrZqovNfb3Tw9K1RPYATazXxQrjcI7YHvJx0AvtHFUsn+/A0GtpKUuuPbaVdkYgE1Tye0AsAcey6RW4xhJywZglKrzDk7vfyUiU5CObeLh4/dhub3k111rDPL8v6v9t40fteduJoFLziHotQwdl37UALL7PwWZY5HuJvaBqHY2LsGs/ptGMB9ZCzxA85jfDw8lrZQ7P97SAoC34Ihs8D6vkKT9HUKHIXh19O5AAa70jReru0ej179IBjvs8m9nDwDNdY3sIsdhUU8WQ3BftDF6M8OzvgyLKDvjSs1Izag+Asl2Ze7RAQfQ2RvbfkDm9KEFnDQtXtzF4Cu1Ed6io2j1zI71JFQpIf6zb1qeNrhqulbJ15owGkQmHBgD8K+bDd1CCU4kA26axypV00XDsjfwdtFHgtUO3AlUVUim0QTMk9ATc="
50 changes: 32 additions & 18 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,33 +1,47 @@
language: ruby
---
sudo: false
language: ruby
cache: bundler
notifications:
email: false
branches:
only:
- master
bundler_args: --without development system_tests
before_install: rm Gemfile.lock || true
script: 'bundle exec rake $CHECK'
bundler_args: --without system_tests development
before_install:
- bundle -v
- rm Gemfile.lock || true
- gem update --system
- gem update bundler
- gem --version
- bundle -v
script:
- 'bundle exec rake $CHECK'
matrix:
fast_finish: true
include:
- rvm: 1.9.3
- rvm: jruby-19mode
env: PUPPET_VERSION="~> 3.0" STRICT_VARIABLES="yes" CHECK=test
- rvm: 2.1.8
- rvm: jruby-19mode
env: PUPPET_VERSION="~> 4.0" STRICT_VARIABLES="yes" CHECK=test
- rvm: 2.1
env: PUPPET_VERSION="~> 3.0" STRICT_VARIABLES="yes" CHECK=test
- rvm: 1.9.3
env: PUPPET_VERSION="~> 3.0" STRICT_VARIABLES="yes" CHECK=test FUTURE_PARSER=yes
- rvm: 2.1.8
env: PUPPET_VERSION="~> 3.0" STRICT_VARIABLES="yes" CHECK=test FUTURE_PARSER=yes
- rvm: 2.1.8
- rvm: 2.1
env: PUPPET_VERSION="~> 4.0" STRICT_VARIABLES="yes" CHECK=test
- rvm: 2.2.4
- rvm: 2.2
env: PUPPET_VERSION="~> 4.0" STRICT_VARIABLES="yes" CHECK=test
- rvm: 2.2.4
- rvm: 2.3.0
env: PUPPET_VERSION="~> 4.0" STRICT_VARIABLES="yes" CHECK=rubocop
- rvm: 2.3.0
env: PUPPET_VERSION="~> 4.0" STRICT_VARIABLES="yes" CHECK=test
allow_failures:
- rvm: 2.3.0
env: PUPPET_VERSION="~> 4.0" STRICT_VARIABLES="yes" CHECK=test
notifications:
email: false
deploy:
provider: puppetforge
user: puppet
password:
secure: "ijm7hKPYWr1eg7151g5oK6MzZL4ojrgWjKlxgoBHXAdXdY88opMgvixfSJK5IMUbtanPfWRkqqABx+MYO78nfQBWDlghUzZ8sQXFeO2Ie0PgWl4nFV0kKWz+ejVaZC4dKSZlWha5pO1ek+sx7KnjIBZY82OXs/GXbjwhHx6d56YugXLuCyvfFxC7mXC9wF58bPwcYRCBSZt9CRl0OMBAFybxjdwsFMloRRhdz7f3hhlqF8Nrs1sxG1HhgiMcnrZqovNfb3Tw9K1RPYATazXxQrjcI7YHvJx0AvtHFUsn+/A0GtpKUuuPbaVdkYgE1Tye0AsAcey6RW4xhJywZglKrzDk7vfyUiU5CObeLh4/dhub3k111rDPL8v6v9t40fteduJoFLziHotQwdl37UALL7PwWZY5HuJvaBqHY2LsGs/ptGMB9ZCzxA85jfDw8lrZQ7P97SAoC34Ihs8D6vkKT9HUKHIXh19O5AAa70jReru0ej179IBjvs8m9nDwDNdY3sIsdhUU8WQ3BftDF6M8OzvgyLKDvjSs1Izag+Asl2Ze7RAQfQ2RvbfkDm9KEFnDQtXtzF4Cu1Ed6io2j1zI71JFQpIf6zb1qeNrhqulbJ15owGkQmHBgD8K+bDd1CCU4kA26axypV00XDsjfwdtFHgtUO3AlUVUim0QTMk9ATc="
on:
tags: true
# all_branches is required to use tags
all_branches: true
# Only publish if our main Ruby target builds
rvm: 2.2
117 changes: 87 additions & 30 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -1,39 +1,96 @@
# Contributing
This module has grown over time based on a range of contributions from
people using it. If you follow these contributing guidelines your patch
will likely make it into a release a little quicker.

Thank you for making time to (consider) creating an Pull Request for this
Puppet Module. I Know this puppet module has bugs or missing features and
that is something you can help me with. When an Pull Request is accepted
your (github) name will be placed in the Contributors of Fame list. 8-)

## Getting started
## Contributing

* Make sure you have a [GitHub account](https://github.com/signup/free)
* Submit a ticket for your issue, assuming one does not already exist.
* Clearly describe the issue including steps to reproduce when it is a bug.
* Make sure you fill in the earliest version that you know has the issue.
* Fork the repository on GitHub
Please note that this project is released with a Contributor Code of Conduct. By participating in this project you agree to abide by its terms. [Contributor Code of Conduct](https://voxpupuli.org/coc/).

## Making Changes
1. Fork the repo.

* Create a topic branch from where you want to base your work.
* This is usually the master branch.
* Only target release branches if you are certain your fix must be on that
branch.
* To quickly create a topic branch based on master;
`git checkout -b fix/master/my_contribution master`.
Please avoid working directly on the `master` branch.
* Make commits of logical units.
* Make sure you have added the necessary tests for your changes.
* Run _all_ the tests to assure nothing else was accidentally broken.
1. Create a separate branch for your change.

## Documentation
1. Run the tests. We only take pull requests with passing tests, and
documentation.

For changes of a trivial nature to comments and documentation, it is not
necessary to create a new issue.
1. Add a test for your change. Only refactoring and documentation
changes require no new tests. If you are adding functionality
or fixing a bug, please add a test.

## Submitting Changes
1. Squash your commits down into logical components. Make sure to rebase
against the current master.

1. Push the branch to your fork and submit a pull request.

Please be prepared to repeat some of these steps as our contributors review
your code.

## Dependencies

The testing and development tools have a bunch of dependencies,
all managed by [bundler](http://bundler.io/) according to the
[Puppet support matrix](http://docs.puppetlabs.com/guides/platforms.html#ruby-versions).

By default the tests use a baseline version of Puppet.

If you have Ruby 2.x or want a specific version of Puppet,
you must set an environment variable such as:

export PUPPET_VERSION="~> 4.2.0"

Install the dependencies like so...

bundle install

## Syntax and style

The test suite will run [Puppet Lint](http://puppet-lint.com/) and
[Puppet Syntax](https://github.com/gds-operations/puppet-syntax) to
check various syntax and style things. You can run these locally with:

bundle exec rake lint
bundle exec rake validate

## Running the unit tests

The unit test suite covers most of the code, as mentioned above please
add tests if you're adding new functionality. If you've not used
[rspec-puppet](http://rspec-puppet.com/) before then feel free to ask
about how best to test your new feature.

To run your all the unit tests

bundle exec rake spec SPEC_OPTS='--format documentation'

To run a specific spec test set the `SPEC` variable:

bundle exec rake spec SPEC=spec/foo_spec.rb

To run the linter, the syntax checker and the unit tests:

bundle exec rake test


## Integration tests

The unit tests just check the code runs, not that it does exactly what
we want on a real machine. For that we're using
[beaker](https://github.com/puppetlabs/beaker).

This fires up a new virtual machine (using vagrant) and runs a series of
simple tests against it after applying the module. You can run this
with:

bundle exec rake acceptance

This will run the tests on an Ubuntu 12.04 virtual machine. You can also
run the integration tests against Centos 6.5 with.

BEAKER_set=centos-64-x64 bundle exec rake acceptances

If you don't want to have to recreate the virtual machine every time you
can use `BEAKER_DESTROY=no` and `BEAKER_PROVISION=no`. On the first run you will
at least need `BEAKER_PROVISION` set to yes (the default). The Vagrantfile
for the created virtual machines will be in `.vagrant/beaker_vagrant_fies`.

* Push your changes to a topic branch in your fork of the repository.
* Submit a pull request to the repository in the puppetlabs organization.
*
* I'll try to review the Pull Request as soon as I'm able to do.
81 changes: 54 additions & 27 deletions Gemfile
Original file line number Diff line number Diff line change
@@ -1,36 +1,63 @@
# encoding: utf-8
source 'https://rubygems.org'
source ENV['GEM_SOURCE'] || "https://rubygems.org"

def location_for(place, fake_version = nil)
if place =~ /^(git[:@][^#]*)#(.*)/
[fake_version, { :git => $1, :branch => $2, :require => false }].compact
elsif place =~ /^file:\/\/(.*)/
['>= 0', { :path => File.expand_path($1), :require => false }]
else
[place, { :require => false }]
end
end

group :test do
gem 'rake'
gem 'puppet', ENV['PUPPET_GEM_VERSION'] || '~> 4.0'
gem 'rspec'
gem 'rspec-puppet'
gem 'puppetlabs_spec_helper'
gem 'metadata-json-lint'
gem 'rspec-puppet-facts'
gem 'rubocop', '0.39.0'
gem 'simplecov'
gem 'simplecov-console'
gem 'puppet-syntax', git: 'https://github.com/gds-operations/puppet-syntax.git'

gem 'puppet-lint-absolute_classname-check'
gem 'puppet-lint-leading_zero-check'
gem 'puppet-lint-trailing_comma-check'
gem 'puppet-lint-version_comparison-check'
gem 'puppet-lint-classes_and_types_beginning_with_digits-check'
gem 'puppet-lint-unquoted_string-check'
gem 'puppetlabs_spec_helper', :require => false
gem 'rspec-puppet', :require => false, :git => 'https://github.com/rodjek/rspec-puppet.git'
gem 'rspec-puppet-facts', :require => false
gem 'rspec-puppet-utils', :require => false
gem 'puppet-lint', :require => false, :git => 'https://github.com/rodjek/puppet-lint.git'
gem 'puppet-lint-absolute_classname-check', :require => false
gem 'puppet-lint-leading_zero-check', :require => false
gem 'puppet-lint-trailing_comma-check', :require => false
gem 'puppet-lint-version_comparison-check', :require => false
gem 'puppet-lint-classes_and_types_beginning_with_digits-check', :require => false
gem 'puppet-lint-unquoted_string-check', :require => false
gem 'puppet-lint-variable_contains_upcase', :require => false
gem 'metadata-json-lint', :require => false
gem 'puppet-blacksmith', :require => false, :git => 'https://github.com/voxpupuli/puppet-blacksmith.git'
gem 'voxpupuli-release', :require => false, :git => 'https://github.com/voxpupuli/voxpupuli-release-gem.git'
gem 'puppet-strings', :require => false, :git => 'https://github.com/puppetlabs/puppetlabs-strings.git'
gem 'rubocop', '~> 0.39', :require => false
end

group :development do
gem 'travis'
gem 'travis-lint'
gem 'puppet-blacksmith'
gem 'guard-rake'
gem 'travis', :require => false
gem 'travis-lint', :require => false
gem 'guard-rake', :require => false
end

group :system_tests do
gem 'beaker'
gem 'beaker-rspec'
gem 'beaker-puppet_install_helper'
gem 'beaker', :require => false
if beaker_version = ENV['BEAKER_VERSION']
gem 'beaker', *location_for(beaker_version)
end
if beaker_rspec_version = ENV['BEAKER_RSPEC_VERSION']
gem 'beaker-rspec', *location_for(beaker_rspec_version)
else
gem 'beaker-rspec', :require => false
end
gem 'beaker-puppet_install_helper', :require => false
end



if facterversion = ENV['FACTER_GEM_VERSION']
gem 'facter', facterversion.to_s, :require => false, :groups => [:test]
else
gem 'facter', :require => false, :groups => [:test]
end

ENV['PUPPET_VERSION'].nil? ? puppetversion = '~> 4.0' : puppetversion = ENV['PUPPET_VERSION'].to_s
gem 'puppet', puppetversion, :require => false, :groups => [:test]

# vim:ft=ruby
12 changes: 6 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@

Continuous Integration status:

[![Build Status](https://travis-ci.org/dj-wasabi/puppet-zabbix.svg?branch=master)](https://travis-ci.org/dj-wasabi/puppet-zabbix)
[![Puppet Forge](http://img.shields.io/puppetforge/v/wdijkerman/zabbix.svg)](https://forge.puppetlabs.com/wdijkerman/zabbix)
[![Puppet Forge Downloads](http://img.shields.io/puppetforge/dt/wdijkerman/zabbix.svg)](https://forge.puppetlabs.com/wdijkerman/zabbix)
[![Build Status](https://travis-ci.org/voxpupuli/puppet-zabbix.svg?branch=master)](https://travis-ci.org/voxpupuli/puppet-zabbix)
[![Puppet Forge](http://img.shields.io/puppetforge/v/puppet/zabbix.svg)](https://forge.puppetlabs.com/puppet/zabbix)
[![Puppet Forge Downloads](http://img.shields.io/puppetforge/dt/puppet/zabbix.svg)](https://forge.puppetlabs.com/puppet/zabbix)

####Table of Contents

Expand Down Expand Up @@ -46,7 +46,7 @@ This module contains the classes for installing and configuring the following za
- zabbix-javagateway
- zabbix-sender

This readme will contain all basic information to get you started. Some more information can be found on the github wiki, location: https://github.com/dj-wasabi/puppet-zabbix/wiki
This readme will contain all basic information to get you started. Some more information can be found on the github wiki, location: https://github.com/voxpupuli/puppet-zabbix/wiki


##Module Description
Expand Down Expand Up @@ -166,7 +166,7 @@ node 'zabbix.example.com'
```

Everything will be installed on the same server. There is also an possibility to seperate the components, please check the following wiki:
https://github.com/dj-wasabi/puppet-zabbix/wiki/Multi-node-Zabbix-Server-setup
https://github.com/voxpupuli/puppet-zabbix/wiki/Multi-node-Zabbix-Server-setup

###Usage zabbix-agent

Expand Down Expand Up @@ -220,7 +220,7 @@ class { 'zabbix::proxy':
You'll have to specify the location to the file in the `database_name` parameter. Zabbix should have write access to the file/directory.

Everything will be installed on the same server. There is also an possibility to seperate the components, please check the following wiki:
https://github.com/dj-wasabi/puppet-zabbix/wiki/Multi-node-Zabbix-Proxy-setup
https://github.com/voxpupuli/puppet-zabbix/wiki/Multi-node-Zabbix-Proxy-setup

###Usage zabbix-javagateway

Expand Down
Loading

0 comments on commit 65ac8c2

Please sign in to comment.