Sha256: ff05823b1fabdf025058bd765f4b0e44a6e76f70ed089d936d21b9f23f71a026

Contents?: true

Size: 672 Bytes

Versions: 30

Compression:

Stored size: 672 Bytes

Contents

module Scrivito
  class Deprecation
    def self.warn(message, source = caller(1))
      ActiveSupport::Deprecation.warn(message, source)
    end

    def self.warn_method(deprecated_method_name, new_method_name = nil)
      warn(warn_method_message(deprecated_method_name, new_method_name), caller(1))
    end

    private_class_method def self.warn_method_message(deprecated_method_name, new_method_name = nil)
      message = "The method #{deprecated_method_name} is deprecated and will be removed "\
        "from the Scrivito SDK in the next major version. "
      message << "Please use #{new_method_name} instead" if new_method_name
      message
    end
  end
end

Version data entries

30 entries across 30 versions & 1 rubygems

Version Path
scrivito_sdk-1.18.0 app/cms/scrivito/deprecation.rb
scrivito_sdk-1.18.0.rc1 app/cms/scrivito/deprecation.rb
scrivito_sdk-1.17.0 app/cms/scrivito/deprecation.rb
scrivito_sdk-1.17.0.rc3 app/cms/scrivito/deprecation.rb
scrivito_sdk-1.17.0.rc2 app/cms/scrivito/deprecation.rb
scrivito_sdk-1.17.0.rc1 app/cms/scrivito/deprecation.rb
scrivito_sdk-1.16.0 app/cms/scrivito/deprecation.rb
scrivito_sdk-1.16.0.rc2 app/cms/scrivito/deprecation.rb
scrivito_sdk-1.16.0.rc1 app/cms/scrivito/deprecation.rb
scrivito_sdk-1.15.0 app/cms/scrivito/deprecation.rb
scrivito_sdk-1.15.0.rc2 app/cms/scrivito/deprecation.rb
scrivito_sdk-1.15.0.rc1 app/cms/scrivito/deprecation.rb
scrivito_sdk-1.14.0 app/cms/scrivito/deprecation.rb
scrivito_sdk-1.14.0.rc3 app/cms/scrivito/deprecation.rb
scrivito_sdk-1.14.0.rc2 app/cms/scrivito/deprecation.rb
scrivito_sdk-1.14.0.rc1 app/cms/scrivito/deprecation.rb
scrivito_sdk-1.13.0 app/cms/scrivito/deprecation.rb
scrivito_sdk-1.13.0.rc2 app/cms/scrivito/deprecation.rb
scrivito_sdk-1.13.0.rc1 app/cms/scrivito/deprecation.rb
scrivito_sdk-1.12.0 app/cms/scrivito/deprecation.rb