(GH-1038) add support for `check-valid-until` configuration
[puppet-modules/puppetlabs-apt.git] / lib / puppet / type / apt_key.rb
index e543b96cb980a2d63bf197fddf2903e3b6ca5e54..c78ba8fb438538eb4a0034f335b617fd2c50f6e9 100644 (file)
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
 require 'pathname'
 require 'puppet/parameter/boolean'
 
@@ -68,7 +70,7 @@ Puppet::Type.newtype(:apt_key) do
     desc 'The key server to fetch the key from based on the ID. It can either be a domain name or url.'
     defaultto :'keyserver.ubuntu.com'
 
-    newvalues(%r{\A((hkp|hkps|http|https):\/\/)?([a-z\d])([a-z\d-]{0,61}\.)+[a-z\d]+(:\d{2,5})?(\/[a-zA-Z\d\-_]+)*\/?$})
+    newvalues(%r{\A((hkp|hkps|http|https):\/\/)?([a-z\d])([a-z\d-]{0,61}\.)+[a-z\d]+(:\d{2,5})?(\/[a-zA-Z\d\-_.]+)*\/?$})
   end
 
   newparam(:options) do
@@ -81,7 +83,7 @@ Puppet::Type.newtype(:apt_key) do
   end
 
   newparam(:weak_ssl, boolean: true, parent: Puppet::Parameter::Boolean) do
-    desc 'When true and source uses https, accepts download of keys without SSL verfication'
+    desc 'When true and source uses https, accepts download of keys without SSL verification'
     defaultto false
   end