Merge pull request #138 from hunner/release_111 1.1.1
authorAshley Penney <apenney@gmail.com>
Tue, 2 Jul 2013 00:28:19 +0000 (17:28 -0700)
committerAshley Penney <apenney@gmail.com>
Tue, 2 Jul 2013 00:28:19 +0000 (17:28 -0700)
Release 111

.travis.yml
Gemfile
manifests/key.pp

index a19074d0b8412434d76d5d32f489c4210f9615e2..71054bb2eaac34cf7b97353c0f9c02a378126a84 100644 (file)
@@ -4,26 +4,23 @@ script: "bundle exec rake spec SPEC_OPTS='--format documentation'"
 rvm:
   - 1.8.7
   - 1.9.3
-  - ruby-head
+  - 2.0.0
 env:
-  - PUPPET_GEM_VERSION="~> 2.6.0"
   - PUPPET_GEM_VERSION="~> 2.7.0"
   - PUPPET_GEM_VERSION="~> 3.0.0"
   - PUPPET_GEM_VERSION="~> 3.1.0"
   - PUPPET_GEM_VERSION="~> 3.2.0"
 matrix:
   exclude:
-    - rvm: ruby-head
-      env: PUPPET_GEM_VERSION="~> 3.0.0"
-    - rvm: ruby-head
-      env: PUPPET_GEM_VERSION="~> 3.1.0"
     - rvm: 1.9.3
       env: PUPPET_GEM_VERSION="~> 2.7.0"
-    - rvm: ruby-head
+    - rvm: 2.0.0
       env: PUPPET_GEM_VERSION="~> 2.7.0"
-    - rvm: 1.9.3
-      env: PUPPET_GEM_VERSION="~> 2.6.0"
-    - rvm: ruby-head
-      env: PUPPET_GEM_VERSION="~> 2.6.0"
+    - rvm: 2.0.0
+      env: PUPPET_GEM_VERSION="~> 3.0.0"
+    - rvm: 2.0.0
+      env: PUPPET_GEM_VERSION="~> 3.1.0"
+    - rvm: 1.8.7
+      env: PUPPET_GEM_VERSION="~> 3.2.0"
 notifications:
   email: false
diff --git a/Gemfile b/Gemfile
index 8e5e04d744ce24eb8f62dc1d1390e62805fe790d..881fc90e21cf98c7fe8994ca6ad6062d1632632a 100644 (file)
--- a/Gemfile
+++ b/Gemfile
@@ -1,6 +1,8 @@
-source :rubygems
+source 'https://rubygems.org'
 
 group :development, :test do
+  gem 'rake',                   :require => false
+  gem 'rspec-puppet',           :require => false
   gem 'puppetlabs_spec_helper', :require => false
 end
 
index 98a0f3a32c4b42192f33f6795689b3df939b24ea..b14500ed039db17ca3990435af036f1945c61893 100644 (file)
@@ -9,6 +9,8 @@ define apt::key (
   include apt::params
 
   $upkey = upcase($key)
+  # trim the key to the last 8 chars so we can match longer keys with apt-key list too
+  $trimmedkey = regsubst($upkey, '^.*(.{8})$', '\1')
 
   if $key_content {
     $method = 'content'
@@ -48,7 +50,7 @@ define apt::key (
         exec { $digest:
           command   => $digest_command,
           path      => '/bin:/usr/bin',
-          unless    => "/usr/bin/apt-key list | /bin/grep '${upkey}'",
+          unless    => "/usr/bin/apt-key list | /bin/grep '${trimmedkey}'",
           logoutput => 'on_failure',
           before    => Anchor["apt::key ${upkey} present"],
         }
@@ -66,7 +68,7 @@ define apt::key (
       exec { "apt::key ${upkey} absent":
         command   => "apt-key del '${upkey}'",
         path      => '/bin:/usr/bin',
-        onlyif    => "apt-key list | grep '${upkey}'",
+        onlyif    => "apt-key list | grep '${trimmedkey}'",
         user      => 'root',
         group     => 'root',
         logoutput => 'on_failure',