Skip to content

Commit

Permalink
Release 0.2.2 (#20)
Browse files Browse the repository at this point in the history
  • Loading branch information
dallinb committed Dec 31, 2016
1 parent 7ad3677 commit 1ce58b4
Show file tree
Hide file tree
Showing 9 changed files with 197 additions and 7 deletions.
9 changes: 9 additions & 0 deletions CHANGELOG.md
@@ -1,5 +1,14 @@
# locp-odoo

##2016-12-31 - Release 0.2.2 ([diff](https://github.com/locp/puppet-odoo/compare/0.2.1...0.2.2))

### Bug Fixes
* Really fixed the licence/license file (hopefully).
* Typos in the documentation.

### Improvements
* Improvements to the documentation.

##2016-12-30 - Release 0.2.1 ([diff](https://github.com/locp/puppet-odoo/compare/0.2.0...0.2.1))

Renamed the licence file.
Expand Down
124 changes: 124 additions & 0 deletions CONTRIBUTING.md
@@ -0,0 +1,124 @@
# Contributing to the Module or Raising Issues

## Table of Contents

1. [Raising an Issue](#raising-an-issue)
1. [Contribtions](#contributions)
* [Unit Tests](#unit-tests)
* [Acceptance Tests](#acceptance-tests)
1. [Further Reading](#further-reading)

## Raising an Issue

When raising an issue, please provide the following information:

* The version of the locp-odoo module that you are using.
* The version of Odoo that you are installing.
* The operating system and release (output from `facter os` would be
appropriate).
* A sample of your manifest/profile that is calling the `odoo` module(s).
Feel free to obfuscate sections of the code that contain details that
are confidential (e.g. passwords and other secrets).

## Contributions

Contributions will be gratefully accepted. Please go to the project page, fork
the project, make your changes locally and then raise a pull request. Details
on how to do this are available at
https://guides.github.com/activities/contributing-to-open-source.

However, we do ask that at the very least, all items marked as **MUST** or
**WON'T** in the list below are applicable:

* Any new features (e.g. new resources or new attributes to existing resoures)
**MUST** be fully documented .
* Unit tests **MUST** be completing successfully. See
[Unit Tests](#unit-tests) for more details. If your initial unit tests fail
after a pull request and you need to fix them, simply change the code on
your branch and push them to *origin* again as this will re-run the
tests. It is not required to submit a new pull request.
* Any new functionality or enhancements **SHOULD** be covered by unit/spec
tests. If you are not comfortable with this, submit the PR anyway and
we will fill in these gaps. You will most probably be asked to rebase
your PR branch and then push again to register these changes.
* If applicable, changes **COULD** be covered in beaker/acceptance tests.
* Change **WON'T** break any functionality on any of the supported operating
systems.

### Unit Tests

First, you'll need to install the testing dependencies using
[bundler](http://bundler.io).

```shell
bundle install
```

To run all of the unit tests execute the following:

```shell
bundle exec rake test
```

This should output something like the following:

```
Running RuboCop...
Inspecting 10 files
..........
10 files inspected, no offenses detected
---> syntax:manifests
---> syntax:templates
---> syntax:hiera:yaml
/usr/bin/ruby2.3 -I/home/ben/.rvm/gems/ruby-2.3.1/gems/rspec-core-3.5.4/lib:/home/ben/.rvm/gems/ruby-2.3.1/gems/rspec-support-3.5.0/lib /home/ben/.rvm/gems/ruby-2.3.1/gems/rspec-core-3.5.4/exe/rspec --pattern spec/\{aliases,classes,defines,unit,functions,hosts,integration,types\}/\*\*/\*_spec.rb --color
[Coveralls] Set up the SimpleCov formatter.
[Coveralls] Using SimpleCov's default settings.
......
Total resources: 10
Touched resources: 10
Resource coverage: 100.00%
Finished in 2.38 seconds (files took 0.74688 seconds to load)
6 examples, 0 failures
[Coveralls] Outside the CI environment, not sending data.
```

Note that if you prefer, you can run the lint, syntax, and spec tests separately with individual commands:

```shell
bundle exec rake metadata_lint
bundle exec rake rubocop
bundle exec rake lint
bundle exec rake validate
bundle exec rake spec
```

If in doubt, or you are stuck, please ask for help in the PR or via our
[Gitter Room](https://gitter.im/locp/odoo).

The unit tests will also fail if the test coverage falls below 100%.

### Acceptance Tests

These tests are more CPU intensive and are run via Docker. You will
need to install further gems for this to work with the following
command:

```shell
bundle install --with acceptance
```

Then run the tests:

```shell
bundle exec rake beaker:centos7
bundle exec rake beaker:ubuntu1404
```

## Further Reading

* *RSpec tests for your Puppet manifests* <http://rspec-puppet.com/>
* *Beaker Info* <https://github.com/puppetlabs/beaker/tree/master/docs>
File renamed without changes.
16 changes: 11 additions & 5 deletions README.md
Expand Up @@ -21,11 +21,6 @@
Install Odoo Communinty edition in a manner similar to that described in
*[Installing Odoo](https://www.odoo.com/documentation/9.0/setup/install.html)*.

This module has now been renamed to locp-odoo. Please see the following:

* https://forge.puppet.com/locp/odoo
* https://github.com/locp/puppet-odoo

## Setup

### What odoo affects
Expand All @@ -40,9 +35,20 @@ This module has now been renamed to locp-odoo. Please see the following:
### Beginning with odoo

```puppet
include ::odoo::repo10
include ::odoo
```

or for Odoo 9:

```puppet
include ::odoo::repo9
include ::odoo
```

Do not have both `::odoo::repo9` and `::odoo::repo10` in your catalogue for
the same node as they will both be attempting to update the repository file.

## Usage

The following example will install a basic PostgreSQL database on the
Expand Down
9 changes: 9 additions & 0 deletions Rakefile
Expand Up @@ -90,3 +90,12 @@ namespace :deploy do
end
end
end

desc 'Run metadata_lint, rubocop, lint, validate and spec.'
task test: [
:metadata_lint,
:rubocop,
:lint,
:validate,
:spec
]
34 changes: 33 additions & 1 deletion manifests/init.pp
@@ -1,5 +1,37 @@
# Class: odoo
# Install and configure Odoo Community.
#
# @example Declaring the class with Odoo 10
# class { '::odoo':
# install_wkhtmltopdf => true,
# settings => {
# 'options' => {
# 'admin_passwd' => 'XXX_TOP_SECRET_XXX',
# 'db_host' => 'False',
# 'db_port' => 'False',
# 'db_user' => 'odoo',
# 'db_password' => 'False',
# 'addons_path' => '/usr/lib/python2.7/dist-packages/odoo/addons',
# }
# },
# version => present,
# }
#
# @example Declaring the class with Odoo 9
# class { '::odoo':
# install_wkhtmltopdf => true,
# settings => {
# 'options' => {
# 'admin_passwd' => 'XXX_TOP_SECRET_XXX',
# 'db_host' => 'False',
# 'db_port' => 'False',
# 'db_user' => 'odoo',
# 'db_password' => 'False',
# 'addons_path' => '/usr/lib/python2.7/dist-packages/openerp/addons',
# }
# },
# version => present,
# }
#
# @param config_file [string] The Odoo configuration file. Will need to be
# changed to `/etc/odoo/openerp-server.conf` for Odoo 9.
# @param install_wkhtmltopdf [boolean] Whether or not to install the optional
Expand Down
5 changes: 5 additions & 0 deletions manifests/repo10.pp
@@ -1,5 +1,10 @@
# Install a repository to install an Odoo 10 package from.
#
# @example Declaring the class
# class { '::odoo::repo10':
# before => Class['odoo']
# }
#
# @param ensure [absent | present] Ensure the the repository is either
# absent or present.
# @param descr [string] A string to describe the repository.
Expand Down
5 changes: 5 additions & 0 deletions manifests/repo9.pp
@@ -1,5 +1,10 @@
# Install a repository to install an Odoo 9 package from.
#
# @example Declaring the class
# class { '::odoo::repo9':
# before => Class['odoo']
# }
#
# @param ensure [absent | present] Ensure the the repository is either
# absent or present.
# @param descr [string] A string to describe the repository.
Expand Down
2 changes: 1 addition & 1 deletion metadata.json
@@ -1,6 +1,6 @@
{
"name": "locp-odoo",
"version": "0.2.1",
"version": "0.2.2",
"author": "locp",
"summary": "Puppet module to install Odoo Community.",
"license": "Apache-2.0",
Expand Down

0 comments on commit 1ce58b4

Please sign in to comment.