Sha256: 2d03aa305205acb0cef8d790ece9c958214d108e7f06aba3724139215dd63c36

Contents?: true

Size: 613 Bytes

Versions: 17

Compression:

Stored size: 613 Bytes

Contents

# frozen_string_literal: true
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

17 entries across 17 versions & 1 rubygems

Version Path
shopify-money-1.2.1 lib/money/deprecations.rb
shopify-money-1.2.0 lib/money/deprecations.rb
shopify-money-1.1.2 lib/money/deprecations.rb
shopify-money-1.1.1 lib/money/deprecations.rb
shopify-money-1.1.0 lib/money/deprecations.rb
shopify-money-1.0.2.pre lib/money/deprecations.rb
shopify-money-1.0.1.pre lib/money/deprecations.rb
shopify-money-1.0.0.pre lib/money/deprecations.rb
shopify-money-0.16.0 lib/money/deprecations.rb
shopify-money-0.15.0 lib/money/deprecations.rb
shopify-money-0.14.8 lib/money/deprecations.rb
shopify-money-0.14.7 lib/money/deprecations.rb
shopify-money-0.14.6 lib/money/deprecations.rb
shopify-money-0.14.5 lib/money/deprecations.rb
shopify-money-0.14.4 lib/money/deprecations.rb
shopify-money-0.14.3 lib/money/deprecations.rb
shopify-money-0.14.2 lib/money/deprecations.rb