Skip to content

Commit

Permalink
Merge branch 'release/v1.0.0'
Browse files Browse the repository at this point in the history
  • Loading branch information
Suszyński Krzysztof committed Sep 25, 2015
2 parents 06e692c + 4b8a34b commit 16a5cd1
Show file tree
Hide file tree
Showing 154 changed files with 8,310 additions and 554 deletions.
14 changes: 14 additions & 0 deletions .fixtures.yml
@@ -0,0 +1,14 @@
fixtures:
repositories:
stdlib:
repo: "https://github.com/puppetlabs/puppetlabs-stdlib.git"
ref: "3.2.0"
concat:
repo: "https://github.com/puppetlabs/puppetlabs-concat.git"
ref: "1.0.0"
java:
repo: "https://github.com/puppetlabs/puppetlabs-java.git"
ref: "1.3.0"
symlinks:
jboss: "#{source_dir}"

13 changes: 13 additions & 0 deletions .gitignore
@@ -0,0 +1,13 @@
pkg/
Gemfile.lock
.vendor
spec/fixtures/
.vagrant/
.bundle/
coverage/
doc/
.tmp/
Puppetfile.lock
.librarian/
log
Vagrantfile
13 changes: 10 additions & 3 deletions .project
@@ -1,12 +1,18 @@
<?xml version="1.0" encoding="UTF-8"?>
<projectDescription>
<name>Puppet Module coi-jboss</name>
<name>jboss</name>
<comment></comment>
<projects>
<project>Forge Module puppetlabs-java</project>
</projects>
<buildSpec>
<buildCommand>
<name>org.cloudsmith.geppetto.pp.dsl.ui.modulefileBuilder</name>
<name>com.aptana.ide.core.unifiedBuilder</name>
<arguments>
</arguments>
</buildCommand>
<buildCommand>
<name>com.puppetlabs.geppetto.pp.dsl.ui.modulefileBuilder</name>
<arguments>
</arguments>
</buildCommand>
Expand All @@ -17,7 +23,8 @@
</buildCommand>
</buildSpec>
<natures>
<nature>org.cloudsmith.geppetto.pp.dsl.ui.puppetNature</nature>
<nature>com.puppetlabs.geppetto.pp.dsl.ui.puppetNature</nature>
<nature>org.eclipse.xtext.ui.shared.xtextNature</nature>
<nature>com.aptana.ruby.core.rubynature</nature>
</natures>
</projectDescription>
2 changes: 2 additions & 0 deletions .rspec
@@ -0,0 +1,2 @@
--format documentation
--color
30 changes: 30 additions & 0 deletions .travis.yml
@@ -0,0 +1,30 @@
---
language: ruby
# TODO: GH Issue #4 - Try to execute standard Ruby builds on Travis CI on container infrastructure
sudo: required
install:
- sudo add-apt-repository -y ppa:raphink/augeas
- sudo apt-get update
- sudo apt-get install -y libaugeas-dev libxml2-dev
- bundle install --without development --jobs=3 --retry=3 --path=${BUNDLE_PATH:-vendor/bundle}
script: bundle exec rake test
before_install: rm -f Gemfile.lock
matrix:
fast_finish: true
include:
- rvm: '1.8'
env: PUPPET_VERSION="~> 2.7.0" FACTER_VERSION="~> 1.6.0"
- rvm: '1.8'
env: PUPPET_VERSION="~> 2.7.0" FACTER_VERSION="~> 1.7.0"
- rvm: '1.9'
env: PUPPET_VERSION="~> 3.0"
- rvm: '2.0'
env: PUPPET_VERSION="~> 3.0"
- rvm: '2.1'
env: PUPPET_VERSION="~> 3.0"
- rvm: '2.1'
env: PUPPET_VERSION="~> 3.0" STRICT_VARIABLES=yes
# FIXME: GH Issue #2 - Activate acceptance tests for centos-6, debian-7 and ubuntu-14.04 on Travis CI's Docker
# FIXME: GH Issue #3 - Activate acceptance tests on Travis CI for Puppet Enterprise, at least 2.8.8 and 3.8.2
notifications:
email: false
90 changes: 90 additions & 0 deletions CONTRIBUTING.md
@@ -0,0 +1,90 @@
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.


## Contributing

1. Fork the repo.

2. Create your feature branch (`git checkout -b feature/my-new-feature`)

3. Run the tests. We only take pull requests with passing tests, and
it's great to know that you have a clean slate

4. 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.

5. Make the test pass.

6. Push to your fork and submit a pull request.


## 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="~> 3.2.0"

Install the dependencies like so... (you can also ass `--path /fs/path/for/deps` to fetch dependencies to other directory)

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 syntax

## 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. Running the test suite is done
with:

bundle exec rake spec

Note also you can run the syntax, style and unit tests in one go with:

bundle exec rake test

## Automatically run the Integration tests

During development of your puppet module you might want to run your unit tests a couple of times. You can use the following command to automate running the unit tests on every change made in the manifests folder.

bundle exec guard

## 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 14.04 virtual machine. You can also
run the integration tests against Centos 6.5 with.

RS_SET=centos-65-x64-docker bundle exec rake acceptance

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_files`.
54 changes: 54 additions & 0 deletions Gemfile
@@ -0,0 +1,54 @@
source ENV['GEM_SOURCE'] || 'https://rubygems.org'

group :test do
gem 'rake', :require => false
gem 'rspec-puppet', :require => false
gem 'puppetlabs_spec_helper', :require => false
gem 'puppet-lint', :require => false
gem 'metadata-json-lint', :require => false
gem 'json', :require => false

if RUBY_VERSION >= '1.9.0'
gem 'beaker', :require => false
gem 'beaker-rspec', :require => false
gem 'docker-api', :require => false
gem 'coveralls', :require => false
gem 'codeclimate-test-reporter', :require => false
gem 'simplecov', :require => false
end
if facterver = ENV['FACTER_VERSION']
gem 'facter', facterver, :require => false
else
gem 'facter', :require => false
end
puppetver = if RUBY_VERSION < '1.9.0' then '~> 2.7.0' else ENV['PUPPET_VERSION'] end
if puppetver
gem 'puppet', puppetver, :require => false
if Gem::Requirement.new(puppetver) =~ Gem::Version.new('2.7.0')
gem 'hiera-puppet', :require => false
end
else
gem 'puppet', '~> 3.0', :require => false
end
gem 'ruby-augeas', :require => false
gem 'augeas', :require => false
end

group :development do
gem 'inch', :require => false
gem 'vagrant-wrapper', :require => false
if RUBY_VERSION >= '1.9.0'
gem 'travis', :require => false
gem 'puppet-blacksmith', :require => false
gem 'guard-rake', :require => false
if RUBY_VERSION >= '2.0.0'
gem 'pry-byebug', :require => false
else
gem 'pry-debugger', :require => false
end
end
end

eval(IO.read(File.join(File.dirname(__FILE__), 'Gemfile.ruby18')), binding) if RUBY_VERSION < '1.9.0'

# vim:ft=ruby
11 changes: 11 additions & 0 deletions Gemfile.ruby18
@@ -0,0 +1,11 @@
#!/usr/bin/env ruby
# This is extra Gemfile for dependencies in old Ruby 1.8.x

group :test do
gem 'rspec-its', :require => false
gem 'rspec', '~> 3.1.0', :require => false
end

group :development do
gem 'pry', '~> 0.9.12.0', :require => false
end
8 changes: 8 additions & 0 deletions Guardfile
@@ -0,0 +1,8 @@
guard 'rake', :task => :spec_ruby do
watch(%r{spec/(unit|functions|hosts|integration|types)/.+_spec\.rb})
watch(%r{lib/.+\.rb})
end
guard 'rake', :task => :spec_puppet_prepared do
watch(%r{spec/(classes|defines)/.+_spec\.rb})
watch(%r{manifests/.+\.pp})
end

0 comments on commit 16a5cd1

Please sign in to comment.