Skip to content
This repository was archived by the owner on Oct 11, 2018. It is now read-only.

Commit 60b1447

Browse files
authored
Merge pull request #86 from nicolasbrechet/feature_oauth
Added extension oauth
2 parents b23307f + fa9b3a4 commit 60b1447

3 files changed

Lines changed: 118 additions & 0 deletions

File tree

docs/extensions.rst

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -201,6 +201,15 @@ Class name: ``php::extension::newrelic``.
201201

202202
* ``$inifile`` defaults to ``${php::params::config_root_ini}/newrelic.ini``
203203

204+
oauth
205+
-----
206+
207+
Class name: ``php::extension::oauth``.
208+
209+
* ``$package`` defaults to ``php5-oauth``
210+
211+
* ``$inifile`` defaults to ``${php::params::config_root_ini}/oauth.ini``
212+
204213
opcache
205214
-------
206215

manifests/extension/oauth.pp

Lines changed: 60 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,60 @@
1+
# == Class: php::extension::oauth
2+
#
3+
# Install and configure the oauth PHP extension
4+
#
5+
# === Parameters
6+
#
7+
# [*ensure*]
8+
# The version of the package to install
9+
# Could be "latest", "installed" or a pinned version
10+
# This matches "ensure" from Package
11+
#
12+
# [*package*]
13+
# The package name in your provider
14+
#
15+
# [*provider*]
16+
# The provider used to install the package
17+
#
18+
# [*inifile*]
19+
# The path to the extension ini file
20+
#
21+
# [*settings*]
22+
# Hash with 'set' nested hash of key => value
23+
# set changes to agues when applied to *inifile*
24+
#
25+
# === Variables
26+
#
27+
# No variables
28+
#
29+
# === Examples
30+
#
31+
# include php::extension::oauth
32+
#
33+
# === Authors
34+
#
35+
# Christian "Jippi" Winther <jippignu@gmail.com>
36+
#
37+
# === Copyright
38+
#
39+
# Copyright 2012-2013 Christian "Jippi" Winther, unless otherwise noted.
40+
#
41+
class php::extension::oauth(
42+
$ensure = $php::extension::oauth::params::ensure,
43+
$package = $php::extension::oauth::params::package,
44+
$provider = $php::extension::oauth::params::provider,
45+
$inifile = $php::extension::oauth::params::inifile,
46+
$settings = $php::extension::oauth::params::settings,
47+
) inherits php::extension::oauth::params {
48+
49+
php::extension { 'oauth':
50+
ensure => $ensure,
51+
package => $package,
52+
provider => $provider
53+
}
54+
55+
php::config { 'php-extension-oauth':
56+
file => $inifile,
57+
config => $settings
58+
}
59+
60+
}
Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
# == Class: php::extension::oauth::params
2+
#
3+
# Defaults file for the oauth PHP extension
4+
#
5+
# === Parameters
6+
#
7+
# No parameters
8+
#
9+
# === Variables
10+
#
11+
# [*ensure*]
12+
# The version of the package to install
13+
# Could be "latest", "installed" or a pinned version
14+
# This matches "ensure" from Package
15+
#
16+
# [*package*]
17+
# The package name in your provider
18+
#
19+
# [*provider*]
20+
# The provider used to install the package
21+
#
22+
# [*inifile*]
23+
# The path to the extension ini file
24+
#
25+
# [*settings*]
26+
# Hash with 'set' nested hash of key => value
27+
# set changes to agues when applied to *inifile*
28+
#
29+
# === Examples
30+
#
31+
# No examples
32+
#
33+
# === Authors
34+
#
35+
# Christian "Jippi" Winther <jippignu@gmail.com>
36+
#
37+
# === Copyright
38+
#
39+
# Copyright 2012-2013 Christian "Jippi" Winther, unless otherwise noted.
40+
#
41+
class php::extension::oauth::params {
42+
43+
$ensure = $php::params::ensure
44+
$package = 'php5-oauth'
45+
$provider = undef
46+
$inifile = "${php::params::config_root_ini}/oauth.ini"
47+
$settings = [ ]
48+
49+
}

0 commit comments

Comments
 (0)