Sha256: 9addc96ed8e467476348c033bff502dd3d387118f543993601ea339cfe4b267e

Contents?: true

Size: 583 Bytes

Versions: 10

Compression:

Stored size: 583 Bytes

Contents

Money.class_eval do
  ACTIVE_SUPPORT_DEFINED = defined?(ActiveSupport)

  def self.active_support_deprecator
    @active_support_deprecator ||= ActiveSupport::Deprecation.new('1.0.0', 'Shopify/Money')
  end

  def self.deprecate(message)
    if ACTIVE_SUPPORT_DEFINED
      external_callstack = caller_locations.reject do |location|
        location.to_s.include?('gems/shopify-money')
      end
      active_support_deprecator.warn("[Shopify/Money] #{message}\n", external_callstack)
    else
      Kernel.warn("DEPRECATION WARNING: [Shopify/Money] #{message}\n")
    end
  end
end

Version data entries

10 entries across 10 versions & 1 rubygems

Version Path
shopify-money-0.14.1 lib/money/deprecations.rb
shopify-money-0.14.0 lib/money/deprecations.rb
shopify-money-0.13.1 lib/money/deprecations.rb
shopify-money-0.13.0 lib/money/deprecations.rb
shopify-money-0.12.0 lib/money/deprecations.rb
shopify-money-0.11.9 lib/money/deprecations.rb
shopify-money-0.11.8 lib/money/deprecations.rb
shopify-money-0.11.7 lib/money/deprecations.rb
shopify-money-0.11.6 lib/money/deprecations.rb
shopify-money-0.11.5 lib/money/deprecations.rb