From: Morgan Haskel Date: Wed, 30 Jul 2014 18:44:51 +0000 (-0400) Subject: Merge pull request #330 from dantman/master X-Git-Tag: 1.6.0~7 X-Git-Url: https://review.fuel-infra.org/gitweb?a=commitdiff_plain;h=84b53dcde475d8573f0a609e30b5f876dd08aa69;hp=562e702a46fa55f54bb436aa9df4267003622fa1;p=puppet-modules%2Fpuppetlabs-apt.git Merge pull request #330 from dantman/master Fix inconsistent $proxy_host handling in apt and apt::ppa. --- diff --git a/CHANGELOG.md b/CHANGELOG.md index bf8553d..011c41d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,14 @@ +##2014-07-15 - Supported Release 1.5.2 +###Summary + +This release merely updates metadata.json so the module can be uninstalled and +upgraded via the puppet module command. + +##2014-07-10 - Supported Release 1.5.1 +###Summary + +This release has added tests to ensure graceful failure on OSX. + ##2014-06-04 - Release 1.5.0 ###Summary diff --git a/Modulefile b/Modulefile deleted file mode 100644 index 45169b3..0000000 --- a/Modulefile +++ /dev/null @@ -1,14 +0,0 @@ -name 'puppetlabs-apt' -version '1.5.0' -source 'https://github.com/puppetlabs/puppetlabs-apt' -author 'Evolving Web / Puppet Labs' -license 'Apache License 2.0' -summary 'Puppet Labs Apt Module' -description 'APT Module for Puppet' -project_page 'https://github.com/puppetlabs/puppetlabs-apt' - -## Add dependencies, if any: -#dependency 'puppetlabs/stdlib', '2.x' -# The dependency should be written as above but librarian-puppet -# does not support the expression as the PMT does. -dependency 'puppetlabs/stdlib', '>= 2.2.1' diff --git a/README.md b/README.md index 9c52c77..0749cb8 100644 --- a/README.md +++ b/README.md @@ -33,7 +33,7 @@ To begin using the APT module with default parameters, declare the class include apt -Puppet code that uses anything from the APT module requires that the core apt class be declared/\s\+$//e +Puppet code that uses anything from the APT module requires that the core apt class be declared. Usage ----- diff --git a/manifests/params.pp b/manifests/params.pp index f635b58..d57b801 100644 --- a/manifests/params.pp +++ b/manifests/params.pp @@ -49,6 +49,9 @@ class apt::params { } } } + '': { + fail('Unable to determine lsbdistid, is lsb-release installed?') + } default: { fail("Unsupported lsbdistid (${::lsbdistid})") } diff --git a/metadata.json b/metadata.json index 7365c67..f1c18a5 100644 --- a/metadata.json +++ b/metadata.json @@ -1,31 +1,43 @@ { - "name": "puppetlabs-apt", - "version": "1.5.0", - "source": "https://github.com/puppetlabs/puppetlabs-apt", - "author": "Puppet Labs", - "license": "Apache-2.0", - "project_page": "https://github.com/puppetlabs/puppetlabs-apt", - "summary": "Puppet Labs Apt Module", - "operatingsystem_support": [ - { - "operatingsystem": "Debian", - "operatingsystemrelease": [ - "6", - "7" - ] - }, - { - "operatingsystem": "Ubuntu", - "operatingsystemrelease": [ - "10.04", - "12.04", - "14.04" - ] - } - ], - "requirements": [ - { "name": "pe", "version_requirement": ">= 3.2.0 < 3.4.0" }, - { "name": "puppet", "version_requirement": "3.x" } - ], - "dependencies": [] + "name": "puppetlabs-apt", + "version": "1.5.2", + "author": "Puppet Labs", + "summary": "Puppet Labs Apt Module", + "license": "Apache-2.0", + "source": "https://github.com/puppetlabs/puppetlabs-apt", + "project_page": "https://github.com/puppetlabs/puppetlabs-apt", + "issues_url": "https://github.com/puppetlabs/puppetlabs-apt/issues", + "operatingsystem_support": [ + { + "operatingsystem": "Debian", + "operatingsystemrelease": [ + "6", + "7" + ] + }, + { + "operatingsystem": "Ubuntu", + "operatingsystemrelease": [ + "10.04", + "12.04", + "14.04" + ] + } + ], + "requirements": [ + { + "name": "pe", + "version_requirement": ">= 3.2.0 < 3.4.0" + }, + { + "name": "puppet", + "version_requirement": "3.x" + } + ], + "dependencies": [ + { + "name": "puppetlabs/stdlib", + "version_requirement": ">= 2.2.1" + } + ] } diff --git a/spec/acceptance/apt_spec.rb b/spec/acceptance/apt_spec.rb index 60def0e..97f00f1 100644 --- a/spec/acceptance/apt_spec.rb +++ b/spec/acceptance/apt_spec.rb @@ -15,7 +15,7 @@ describe 'apt class', :unless => UNSUPPORTED_PLATFORMS.include?(fact('osfamily') EOS apply_manifest(pp, :catch_failures => true) do |r| - expect(r.stdout).to match(/apt_update/) + expect(r.stdout).to match(/Exec\[apt_update\]/) end end end @@ -26,7 +26,7 @@ describe 'apt class', :unless => UNSUPPORTED_PLATFORMS.include?(fact('osfamily') EOS apply_manifest(pp, :catch_failures => true) do |r| - expect(r.stdout).to_not match(/apt_update/) + expect(r.stdout).to_not match(/Exec\[apt_update\]/) end end end diff --git a/spec/classes/params_spec.rb b/spec/classes/params_spec.rb index aa330bb..d85e849 100644 --- a/spec/classes/params_spec.rb +++ b/spec/classes/params_spec.rb @@ -24,4 +24,16 @@ describe 'apt::params', :type => :class do end end + + describe "With lsb-release not installed" do + let(:facts) { { :lsbdistid => '' } } + let (:title) { 'my_package' } + + it do + expect { + should compile + }.to raise_error(Puppet::Error, /Unable to determine lsbdistid, is lsb-release installed/) + end + end + end