Sha256: 80b96227f03437c701952a46916caa5811d59323e947e06f2e10f2e10450149d

Contents?: true

Size: 649 Bytes

Versions: 107

Compression:

Stored size: 649 Bytes

Contents

module Fog
  module Deprecation

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

  end
end

Version data entries

107 entries across 107 versions & 19 rubygems

Version Path
fog-core-1.24.0 lib/fog/core/deprecation.rb
fog-core-1.23.0 lib/fog/core/deprecation.rb
fog-core-1.22.0 lib/fog/core/deprecation.rb
fog-core-1.21.1 lib/fog/core/deprecation.rb
fog-maestrodev-1.20.0.20140305101839 lib/fog/core/deprecation.rb
fog-maestrodev-1.20.0.20140305101305 lib/fog/core/deprecation.rb
cifrado-0.2.1 vendor/fog/lib/fog/core/deprecation.rb
cifrado-0.2.0 vendor/fog/lib/fog/core/deprecation.rb
fog-core-1.21.0 lib/fog/core/deprecation.rb
fog-maestrodev-1.19.0.20140212012611 lib/fog/core/deprecation.rb
fog-1.20.0 lib/fog/core/deprecation.rb
fog-maestrodev-1.19.0.20140110004459 lib/fog/core/deprecation.rb
fog-maestrodev-1.19.0.20140110003812 lib/fog/core/deprecation.rb
fog-maestrodev-1.19.0.20140109202555 lib/fog/core/deprecation.rb
fog-maestrodev-1.19.0.20140107192102 lib/fog/core/deprecation.rb
fog-maestrodev-1.19.0.20140107142106 lib/fog/core/deprecation.rb
fog-maestrodev-1.19.0.20131219203941 lib/fog/core/deprecation.rb
fog-maestrodev-1.18.0.20131219193542 lib/fog/core/deprecation.rb
fog-1.19.0 lib/fog/core/deprecation.rb
fog-maestrodev-1.18.0.20131219033443 lib/fog/core/deprecation.rb