require 'net/ftp'
require 'tempfile'
-if RUBY_VERSION == '1.8.7'
- # Mothers cry, puppies die and Ruby 1.8.7's open-uri needs to be
- # monkeypatched to support passing in :ftp_passive_mode.
- require File.expand_path(File.join(File.dirname(__FILE__), '..', '..', '..',
- 'puppet_x', 'apt_key', 'patch_openuri.rb'))
- OpenURI::Options[:ftp_active_mode] = false
-end
-
Puppet::Type.type(:apt_key).provide(:apt_key) do
desc 'apt-key provider for apt_key resource'
mk_resource_methods
- # Needed until PUP-1470 is fixed and we can drop support for Puppet versions
- # before that.
- def expired
- @property_hash[:expired]
- end
-
# Alias the setters of read-only properties
# to the read_only function.
alias_method :created=, :read_only