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-maestrodev-1.18.0.20131112185232 lib/fog/core/deprecation.rb
fog-maestrodev-1.18.0.20131111203459 lib/fog/core/deprecation.rb
fog-1.18.0 lib/fog/core/deprecation.rb
fog-1.17.0 lib/fog/core/deprecation.rb
fog-1.16.0 lib/fog/core/deprecation.rb
fog-maestrodev-1.15.0.20130927082724 lib/fog/core/deprecation.rb
fog-maestrodev-1.15.0.20130829165835 lib/fog/core/deprecation.rb
fog-1.15.0 lib/fog/core/deprecation.rb
gapinc-fog-1.14.0 lib/fog/core/deprecation.rb
fog-maestrodev-1.14.0.20130806165225 lib/fog/core/deprecation.rb
fog-1.14.0 lib/fog/core/deprecation.rb
fog-1.13.0 lib/fog/core/deprecation.rb
gapinc-fog-1.12.1.2 lib/fog/core/deprecation.rb
gapinc-fog-1.12.1.1 lib/fog/core/deprecation.rb
gapinc-fog-1.12.1a lib/fog/core/deprecation.rb
gapinc-fog-1.12.1 lib/fog/core/deprecation.rb
fog-1.12.1 lib/fog/core/deprecation.rb
fog-1.12.0 lib/fog/core/deprecation.rb
hpfog-0.0.20 lib/fog/core/deprecation.rb
vagrant-shell-0.2.6 vendor/bundle/gems/fog-1.10.1/lib/fog/core/deprecation.rb