This repository has been archived by the owner on Oct 11, 2018. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 92
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #86 from nicolasbrechet/feature_oauth
Added extension oauth
- Loading branch information
Showing
3 changed files
with
118 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,60 @@ | ||
# == Class: php::extension::oauth | ||
# | ||
# Install and configure the oauth PHP extension | ||
# | ||
# === Parameters | ||
# | ||
# [*ensure*] | ||
# The version of the package to install | ||
# Could be "latest", "installed" or a pinned version | ||
# This matches "ensure" from Package | ||
# | ||
# [*package*] | ||
# The package name in your provider | ||
# | ||
# [*provider*] | ||
# The provider used to install the package | ||
# | ||
# [*inifile*] | ||
# The path to the extension ini file | ||
# | ||
# [*settings*] | ||
# Hash with 'set' nested hash of key => value | ||
# set changes to agues when applied to *inifile* | ||
# | ||
# === Variables | ||
# | ||
# No variables | ||
# | ||
# === Examples | ||
# | ||
# include php::extension::oauth | ||
# | ||
# === Authors | ||
# | ||
# Christian "Jippi" Winther <jippignu@gmail.com> | ||
# | ||
# === Copyright | ||
# | ||
# Copyright 2012-2013 Christian "Jippi" Winther, unless otherwise noted. | ||
# | ||
class php::extension::oauth( | ||
$ensure = $php::extension::oauth::params::ensure, | ||
$package = $php::extension::oauth::params::package, | ||
$provider = $php::extension::oauth::params::provider, | ||
$inifile = $php::extension::oauth::params::inifile, | ||
$settings = $php::extension::oauth::params::settings, | ||
) inherits php::extension::oauth::params { | ||
|
||
php::extension { 'oauth': | ||
ensure => $ensure, | ||
package => $package, | ||
provider => $provider | ||
} | ||
|
||
php::config { 'php-extension-oauth': | ||
file => $inifile, | ||
config => $settings | ||
} | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
# == Class: php::extension::oauth::params | ||
# | ||
# Defaults file for the oauth PHP extension | ||
# | ||
# === Parameters | ||
# | ||
# No parameters | ||
# | ||
# === Variables | ||
# | ||
# [*ensure*] | ||
# The version of the package to install | ||
# Could be "latest", "installed" or a pinned version | ||
# This matches "ensure" from Package | ||
# | ||
# [*package*] | ||
# The package name in your provider | ||
# | ||
# [*provider*] | ||
# The provider used to install the package | ||
# | ||
# [*inifile*] | ||
# The path to the extension ini file | ||
# | ||
# [*settings*] | ||
# Hash with 'set' nested hash of key => value | ||
# set changes to agues when applied to *inifile* | ||
# | ||
# === Examples | ||
# | ||
# No examples | ||
# | ||
# === Authors | ||
# | ||
# Christian "Jippi" Winther <jippignu@gmail.com> | ||
# | ||
# === Copyright | ||
# | ||
# Copyright 2012-2013 Christian "Jippi" Winther, unless otherwise noted. | ||
# | ||
class php::extension::oauth::params { | ||
|
||
$ensure = $php::params::ensure | ||
$package = 'php5-oauth' | ||
$provider = undef | ||
$inifile = "${php::params::config_root_ini}/oauth.ini" | ||
$settings = [ ] | ||
|
||
} |