This repository has been archived by the owner on Dec 2, 2020. It is now read-only.
forked from mattheath/puppet-php
-
Notifications
You must be signed in to change notification settings - Fork 29
Add's the uopz's extension #65
Open
alexmace
wants to merge
6
commits into
boxen:master
Choose a base branch
from
namesco:add-uopz
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from 5 commits
Commits
Show all changes
6 commits
Select commit
Hold shift + click to select a range
4483518
Added the uopz extension
alexmace c7fd8b9
uopz prepends all of its tags with a 'v'
alexmace 580efbf
Updates based on what other extensions are doing, and fixing a lart e…
alexmace 5509422
Added a generic ini file for zend extensions
alexmace 21443f4
spec file for the uopz extension
alexmace 4f8b979
Updated the comment to remove the reference to v1 syntax
alexmace File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,58 @@ | ||
# Installs a php extension for a specific version of php. | ||
# | ||
# Usage: | ||
# | ||
# php::extension::uopz { 'uopz for 5.4.10': | ||
# php => '5.4.10', | ||
# version => '1.0.3' | ||
# } | ||
# | ||
define php::extension::uopz( | ||
$php, | ||
$version = '2.0.6' | ||
) { | ||
include boxen::config | ||
|
||
require php::config | ||
# Require php version eg. php::5_4_10 | ||
# This will compile, install and set up config dirs if not present | ||
php_require($php) | ||
|
||
$extension = 'uopz' | ||
|
||
# Final module install path | ||
$module_path = "${php::config::root}/versions/${php}/modules/${extension}.so" | ||
|
||
# Clone the source respository | ||
repository { "${php::config::extensioncachedir}/uopz": | ||
source => 'krakjoe/uopz' | ||
} | ||
|
||
|
||
# Additional options | ||
$configure_params = '' | ||
|
||
php_extension { $name: | ||
provider => 'git', | ||
|
||
extension => $extension, | ||
version => "v${version}", | ||
|
||
homebrew_path => $boxen::config::homebrewdir, | ||
phpenv_root => $php::config::root, | ||
php_version => $php, | ||
|
||
cache_dir => $php::config::extensioncachedir, | ||
require => Repository["${php::config::extensioncachedir}/uopz"], | ||
|
||
configure_params => $configure_params, | ||
} | ||
|
||
# Add config file once extension is installed | ||
|
||
file { "${php::config::configdir}/${php}/conf.d/${extension}.ini": | ||
content => template('php/extensions/zend_generic.ini.erb'), | ||
require => Php_extension[$name], | ||
} | ||
|
||
} |
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,38 @@ | ||
require 'spec_helper' | ||
|
||
describe "php::extension::uopz" do | ||
let(:facts) { default_test_facts } | ||
let(:title) { "uopz for 5.4.17" } | ||
let(:params) do | ||
{ | ||
:php => "5.4.17", | ||
:version => "2.0.6" | ||
} | ||
end | ||
|
||
it do | ||
should contain_class("php::config") | ||
should contain_php__version("5.4.17") | ||
|
||
should contain_repository("/test/boxen/data/php/cache/extensions/uopz").with({ | ||
:source => "krakjoe/uopz" | ||
}) | ||
|
||
should contain_php_extension("uopz for 5.4.17").with({ | ||
:provider => "git", | ||
:extension => "uopz", | ||
:version => "v2.0.6", | ||
:homebrew_path => "/test/boxen/homebrew", | ||
:phpenv_root => "/test/boxen/phpenv", | ||
:php_version => "5.4.17", | ||
:cache_dir => "/test/boxen/data/php/cache/extensions", | ||
:require => "Repository[/test/boxen/data/php/cache/extensions/uopz]", | ||
:configure_params => '', | ||
}) | ||
|
||
should contain_file("/test/boxen/config/php/5.4.17/conf.d/uopz.ini").with({ | ||
:content => File.read("spec/fixtures/uopz.ini"), | ||
:require => "Php_extension[uopz for 5.4.17]" | ||
}) | ||
end | ||
end |
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 @@ | ||
zend_extension=/test/boxen/phpenv/versions/5.4.17/modules/uopz.so |
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 @@ | ||
zend_extension=<%= @module_path %> |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This comment uses the old syntax. Can you please update to the new syntax or remove it to avoid confusion?