Skip to content

Improve viewer class (fully qualify ht_crypt) #88

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 7 additions & 2 deletions .fixtures.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,10 @@
# See https://github.com/puppetlabs/puppetlabs_spec_helper#using-fixtures for details
---
fixtures:
forge_modules:
# stdlib: "puppetlabs/stdlib"
repositories:
stdlib: https://github.com/puppetlabs/puppetlabs-stdlib.git
apache: https://github.com/puppetlabs/puppetlabs-apache.git
htpasswd: https://github.com/citrininfo/puppet-htpasswd.git
vcsrepo: https://github.com/puppetlabs/puppetlabs-vcsrepo.git
git: https://github.com/puppetlabs-toy-chest/puppetlabs-git.git
concat: https://github.com/puppetlabs/puppetlabs-concat.git

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@DLeich might it be better to refer to the Forge versions, instead of the bleeding edge versions on GitHub?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

no :) we refer to master/main branch for unit tests, so wen can detect breaking changes in dependencies before they are released. for acceptance tests we use the latest versions, that the metadata.json accepts, from the forge (this module currently has no acceptance tests but I will add them later

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Right on! Makes sense.

I've got a module I've been struggling to add acceptance tests to; would love to see how you do that here or elsewhere.

22 changes: 20 additions & 2 deletions manifests/viewer.pp
Original file line number Diff line number Diff line change
@@ -1,5 +1,23 @@
# @summary
# A class to configure the diff viewer webservice. For full details, see
# https://github.com/voxpupuli/puppet-catalog-diff-viewer
#
# @param remote
# The source git repository to fetch the catalog diff viewer tool from.
#
# @param password
# Specifiy the desired password to set for authentication into the viewer tool post installation.
#
# @param revision
# Specify the release or branch from the repository specified in $remote to utilize.
#
# @param port
# Specify the port to run the diff viewer tool on.
#
# @param listen_ip
# Specify what IP address apache should listen on for accessing the viewer tool.
class catalog_diff::viewer (
String $remote = 'https://github.com/camptocamp/puppet-catalog-diff-viewer.git',
String $remote = 'https://github.com/voxpupuli/puppet-catalog-diff-viewer.git',
String $password = 'puppet',
String $revision = 'master',
Integer $port = 1495,
Expand Down Expand Up @@ -35,7 +53,7 @@

htpasswd { 'puppet':
username => 'puppet',
cryptpasswd => ht_crypt($password, $facts['dmi']['product']['uuid']),
cryptpasswd => htpasswd::ht_crypt($password, $facts['dmi']['product']['uuid']),
target => '/var/www/.htpasswd',
}

Expand Down
21 changes: 20 additions & 1 deletion metadata.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,26 @@
"project_page": "https://github.com/voxpupuli/puppet-catalog_diff",
"issues_url": "https://github.com/voxpupuli/puppet-catalog_diff/issues",
"dependencies": [

{
"name": "puppetlabs/apache",
"version_requirement": ">=6.0.0 < 8.0.0"
},
{
"name": "citrin/htpasswd",
"version_requirement": ">=1.0.0 < 2.0.0"
},
{
"name": "puppetlabs/vcsrepo",
"version_requirement": ">=4.0.0 < 6.0.0"
},
{
"name": "puppetlabs/git",
"version_requirement": ">=0.5.0 < 1.0.0"
},
{
"name": "puppetlabs/concat",
"version_requirement": ">=7.0.0 < 8.0.0"
}
],
"operatingsystem_support": [
{
Expand Down