Skip to content
This repository has been archived by the owner on Jun 30, 2023. It is now read-only.

Commit

Permalink
Initial commit and Puppet Forge module
Browse files Browse the repository at this point in the history
  • Loading branch information
Riccardo Calixte committed Aug 25, 2016
0 parents commit 5d8732a
Show file tree
Hide file tree
Showing 11 changed files with 884 additions and 0 deletions.
12 changes: 12 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
.*.sw?
/pkg
/spec/fixtures/manifests
/spec/fixtures/modules
/.rspec_system
/.vagrant
/.bundle
/vendor
/junit
/log
.yardoc
coverage
19 changes: 19 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
language: ruby
cache: bundler
bundler_args: --without system_tests
script: "bundle exec rake validate lint"
matrix:
fast_finish: true
include:
- rvm: 2.1.9
bundler_args: --without system_tests
env: PUPPET_GEM_VERSION="~> 4.0" STRICT_VARIABLES="yes"
- rvm: 2.1.5
bundler_args: --without system_tests
env: PUPPET_GEM_VERSION="~> 3.0" FUTURE_PARSER="yes"
- rvm: 2.1.5
bundler_args: --without system_tests
env: PUPPET_GEM_VERSION="~> 3.0"
- rvm: 2.2
bundler_args: --without system_tests
env: PUPPET_GEM_VERSION="~> 4.0" STRICT_VARIABLES="yes"
54 changes: 54 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
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. Test your change.

3. Make the test pass.

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

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
10 changes: 10 additions & 0 deletions Gemfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
source 'https://rubygems.org'

gem 'rake'
gem 'puppet', ENV['PUPPET_GEM_VERSION'] || '>= 3.8.0'
gem 'rspec'
gem 'rspec-puppet'
gem 'puppetlabs_spec_helper'
gem 'puppet-lint'
gem 'puppet-syntax'
gem 'metadata-json-lint'
59 changes: 59 additions & 0 deletions Gemfile.lock
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
GEM
remote: https://rubygems.org/
specs:
CFPropertyList (2.2.8)
diff-lcs (1.2.5)
facter (2.4.6)
CFPropertyList (~> 2.2.6)
hiera (3.2.1)
json (2.0.2)
json_pure (1.8.3)
metaclass (0.0.4)
metadata-json-lint (0.0.11)
json
spdx-licenses (~> 1.0)
mocha (1.1.0)
metaclass (~> 0.0.1)
puppet (4.6.1)
CFPropertyList (~> 2.2.6)
facter (> 2.0, < 4)
hiera (>= 2.0, < 4)
json_pure (~> 1.8)
puppet-lint (2.0.2)
puppet-syntax (2.1.0)
rake
puppetlabs_spec_helper (1.2.1)
mocha (~> 1.0)
puppet-lint (~> 2.0)
puppet-syntax (~> 2.0)
rspec-puppet (~> 2.0)
rake (11.2.2)
rspec (3.5.0)
rspec-core (~> 3.5.0)
rspec-expectations (~> 3.5.0)
rspec-mocks (~> 3.5.0)
rspec-core (3.5.2)
rspec-support (~> 3.5.0)
rspec-expectations (3.5.0)
diff-lcs (>= 1.2.0, < 2.0)
rspec-support (~> 3.5.0)
rspec-mocks (3.5.0)
diff-lcs (>= 1.2.0, < 2.0)
rspec-support (~> 3.5.0)
rspec-puppet (2.4.0)
rspec
rspec-support (3.5.0)
spdx-licenses (1.1.0)

PLATFORMS
ruby

DEPENDENCIES
metadata-json-lint
puppet (>= 3.8.0)
puppet-lint
puppet-syntax
puppetlabs_spec_helper
rake
rspec
rspec-puppet
Loading

0 comments on commit 5d8732a

Please sign in to comment.