Sha256: 55bbca2b91ee07deebe004547db12d98a83149241b96ee4802483eb2994828d0

Contents?: true

Size: 701 Bytes

Versions: 57

Compression:

Stored size: 701 Bytes

Contents

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

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

      private

      def 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
end

Version data entries

57 entries across 57 versions & 1 rubygems

Version Path
scrivito_sdk-1.9.1 lib/scrivito/deprecation.rb
scrivito_sdk-1.9.1.rc1 lib/scrivito/deprecation.rb
scrivito_sdk-1.9.0 lib/scrivito/deprecation.rb
scrivito_sdk-1.9.0.rc2 lib/scrivito/deprecation.rb
scrivito_sdk-1.9.0.rc1 lib/scrivito/deprecation.rb
scrivito_sdk-1.8.1 lib/scrivito/deprecation.rb
scrivito_sdk-1.8.1.rc1 lib/scrivito/deprecation.rb
scrivito_sdk-1.8.0 lib/scrivito/deprecation.rb
scrivito_sdk-1.8.0.rc2 lib/scrivito/deprecation.rb
scrivito_sdk-1.8.0.rc1 lib/scrivito/deprecation.rb
scrivito_sdk-1.7.0 lib/scrivito/deprecation.rb
scrivito_sdk-1.7.0.rc2 lib/scrivito/deprecation.rb
scrivito_sdk-1.5.5 lib/scrivito/deprecation.rb
scrivito_sdk-1.6.1 lib/scrivito/deprecation.rb
scrivito_sdk-1.6.1.rc1 lib/scrivito/deprecation.rb
scrivito_sdk-1.5.5.rc1 lib/scrivito/deprecation.rb
scrivito_sdk-1.4.3 lib/scrivito/deprecation.rb
scrivito_sdk-1.5.4 lib/scrivito/deprecation.rb
scrivito_sdk-1.7.0.rc1 lib/scrivito/deprecation.rb
scrivito_sdk-1.6.0 lib/scrivito/deprecation.rb