Commit ca66745a authored by Felipe Zipitria's avatar Felipe Zipitria
Browse files

Merge remote-tracking branch 'upstream/master'

parents f423ceaf aafd620b
modulesync_config_version: '1.5.0'
modulesync_config_version: '1.6.0'
......@@ -46,7 +46,7 @@ Style/HashSyntax:
Style/RedundantReturn:
Enabled: True
Style/EndOfLine:
Layout/EndOfLine:
Enabled: False
Lint/AmbiguousOperator:
......
......@@ -4,12 +4,7 @@ dist: trusty
language: ruby
cache: bundler
before_install:
- bundle -v
- rm Gemfile.lock || true
- gem update --system
- gem update bundler
- gem --version
- bundle -v
- rm -f Gemfile.lock
script:
- 'bundle exec rake $CHECK'
matrix:
......
......@@ -26,6 +26,12 @@ exclude_paths = %w(
PuppetLint.configuration.ignore_paths = exclude_paths
PuppetSyntax.exclude_paths = exclude_paths
desc 'Auto-correct puppet-lint offenses'
task 'lint:auto_correct' do
PuppetLint.configuration.fix = true
Rake::Task[:lint].invoke
end
desc 'Run acceptance tests'
RSpec::Core::RakeTask.new(:acceptance) do |t|
t.pattern = 'spec/acceptance'
......@@ -48,6 +54,27 @@ task test_with_coveralls: [:test] do
end
end
desc "Print supported beaker sets"
task 'beaker_sets', [:directory] do |t, args|
directory = args[:directory]
metadata = JSON.load(File.read('metadata.json'))
(metadata['operatingsystem_support'] || []).each do |os|
(os['operatingsystemrelease'] || []).each do |release|
if directory
beaker_set = "#{directory}/#{os['operatingsystem'].downcase}-#{release}"
else
beaker_set = "#{os['operatingsystem'].downcase}-#{release}-x64"
end
filename = "spec/acceptance/nodesets/#{beaker_set}.yml"
puts beaker_set if File.exists? filename
end
end
end
begin
require 'github_changelog_generator/task'
GitHubChangelogGenerator::RakeTask.new :changelog do |config|
......
......@@ -21,25 +21,27 @@ class php::pear (
if $package {
$package_name = $package
} else {
case $facts['os']['family'] {
'Debian': {
# Debian is a litte stupid: The pear package is called 'php-pear'
# even though others are called 'php5-fpm' or 'php5-dev'
$package_name = "php-${::php::params::pear_package_suffix}"
}
'Amazon': {
# On Amazon Linux the package name is also just 'php-pear'.
# This would normally not be problematic but if you specify a
# package_prefix other than 'php' then it will fail.
$package_name = "php-${::php::params::pear_package_suffix}"
}
'FreeBSD': {
# On FreeBSD the package name is just 'pear'.
$package_name = $::php::params::pear_package_suffix
}
default: {
# This is the default for all other architectures
$package_name = "${::php::package_prefix}${::php::params::pear_package_suffix}"
if $facts['os']['name'] == 'Amazon' {
# On Amazon Linux the package name is also just 'php-pear'.
# This would normally not be problematic but if you specify a
# package_prefix other than 'php' then it will fail.
$package_name = "php-${::php::params::pear_package_suffix}"
}
else {
case $facts['os']['family'] {
'Debian': {
# Debian is a litte stupid: The pear package is called 'php-pear'
# even though others are called 'php5-fpm' or 'php5-dev'
$package_name = "php-${::php::params::pear_package_suffix}"
}
'FreeBSD': {
# On FreeBSD the package name is just 'pear'.
$package_name = $::php::params::pear_package_suffix
}
default: {
# This is the default for all other architectures
$package_name = "${::php::package_prefix}${::php::params::pear_package_suffix}"
}
}
}
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment