Skip to content
This repository has been archived by the owner on Jun 13, 2019. It is now read-only.

Commit

Permalink
Merge pull request #988 from till/r/php-ppa-discovery
Browse files Browse the repository at this point in the history
Refactor: allow php to setup ppa
  • Loading branch information
fh committed Apr 16, 2016
2 parents 62676d6 + 5c9bbb1 commit 2380252
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 2 deletions.
2 changes: 2 additions & 0 deletions php/attributes/default.rb
@@ -1,3 +1,5 @@
default['php']['ppa']['name'] = 'easybib-ppa'
default['php']['ppa']['uri'] = ::EasyBib::Ppa.ppa_mirror(node)
default['php']['ppa']['package_prefix'] = 'php5-easybib'

default['php-apc'] = {}
Expand Down
2 changes: 2 additions & 0 deletions php/metadata.rb
Expand Up @@ -5,6 +5,8 @@
license 'BSD License'
supports 'ubuntu'

depends 'apt'
depends 'aptly'
depends 'ies-apt'
depends 'php-fpm'
depends 'ohai'
12 changes: 11 additions & 1 deletion php/recipes/dependencies-ppa.rb
@@ -1,3 +1,13 @@
# used as a dependencies recipe for any php package from our ppa archive
include_recipe 'ies-apt::easybib'
include_recipe 'ies-apt::ppa'
include_recipe 'aptly::gpg'

ppa_config = node['php']['ppa']

apt_repository ppa_config['name'] do
uri ppa_config['uri']
distribution node['lsb']['codename']
components ['main']
end

include_recipe 'php-fpm::service'
3 changes: 2 additions & 1 deletion php/spec/dependencies-ppa_spec.rb
Expand Up @@ -6,6 +6,7 @@

it 'adds ppa mirror configuration' do
expect(chef_run).to include_recipe('ies-apt::ppa')
expect(chef_run).to include_recipe('ies-apt::easybib')
expect(chef_run).to include_recipe('aptly::gpg')
expect(chef_run).to add_apt_repository('easybib-ppa')
end
end

0 comments on commit 2380252

Please sign in to comment.