-
Notifications
You must be signed in to change notification settings - Fork 8
Development
Here are some guideline for new people coming to the project about the toolchain, development methods and ideas.
Testing your stuff when you code puppet is incredible useful. Once you commit
something to the repo and push against this upstream repository a travis build
will be fired. However, you can install everything locally to run it on your
local machine. Everything will be installed in your home directory. All you need
is a recent ruby version (starting from 1.8.2) and the rubygems
gem installed.
export GEM_HOME=~/.gem
export PATH=$GEM_HOME/bin:$PATH
gem install --no-ri --no-rdoc puppet
gem install --no-ri --no-rdoc puppet-lint
gem install --no-ri --no-rdoc puppetlabs_spec_helper
gem install --no-ri --no-rdoc autotest
Voila, now you have the full toolchain.
(If you are on RHEL/Fedora and the installation of autotest
fails - check the
RHEL section in this page)
The hardcore development should be done in branches. Before you send a pull request from one of your development branches makes sure to speak to a committer for this repository in order to avoid confusion. We do encourage contributions!
We are using the Travis-CI environment. If you are working on some functionality
you can enable Travis-CI in your repository. The notices about build failures or
success will be sent the IRC channel puppet
on irc.perl.org
.
You can also use the gem autotest
to run a testrunner locally. It will track
file changes and rerun the required test.
We are using TDD using Puppets rspec helpers. This should keep the code clean and sane and avoid unnecessary problems when we are moving functions and classes.
If you want to test your code - just change in your local checkout and run the following commands:
cd <module root>
rake spec_prep
rake spec
An update of your rubygems might be required. Please run the following command to update your local rubygems.
sudo gem update --system
custom_require.rb:36:in require: cannot load such file -- rdoc/rdoc
RedHat and Fedora split their ruby packages in interesting sub packages. Make sure to have the following packages installed:
- ruby rubygems rubygem-rdoc-doc