Sha256: c6c8b4a7ad3f387973dd4c2b38071abdfe415544b6e692fbf41e871d0628e2bd

Contents?: true

Size: 641 Bytes

Versions: 6

Compression:

Stored size: 641 Bytes

Contents

module Fog
  module Deprecation

    def deprecate(older, newer)
      module_eval <<-EOS, __FILE__, __LINE__
        def #{older}(*args)
          Fog::Logger.warning("#{self} => ##{older} is deprecated, use ##{newer} instead [light_black](#{caller.first})[/]")
          send(:#{newer}, *args)
        end
      EOS
    end

    def self_deprecate(older, newer)
      module_eval <<-EOS, __FILE__, __LINE__
        def self.#{older}(*args)
          Fog::Logger.warning("#{self} => ##{older} is deprecated, use ##{newer} instead [light_black](#{caller.first})[/]")
          send(:#{newer}, *args)
        end
      EOS
    end

  end
end

Version data entries

6 entries across 6 versions & 3 rubygems

Version Path
brightbox-cli-0.16.0 lib/brightbox-cli/vendor/fog/lib/fog/core/deprecation.rb
brightbox-cli-0.15.0 lib/brightbox-cli/vendor/fog/lib/fog/core/deprecation.rb
tag-fog-1.0.1 lib/fog/core/deprecation.rb
brightbox-cli-0.14.1 lib/brightbox-cli/vendor/fog/lib/fog/core/deprecation.rb
brightbox-cli-0.14.0 lib/brightbox-cli/vendor/fog/lib/fog/core/deprecation.rb
fog-1.0.0 lib/fog/core/deprecation.rb