Sha256: 9c46ab2468b4f5c8ec36366ca0e57649d8a694ff0ed97dcc0c675c884f3a3058

Contents?: true

Size: 679 Bytes

Versions: 2

Compression:

Stored size: 679 Bytes

Contents

# frozen_string_literal: true

require 'active_support'
require 'active_support/time'

require 'uncruft/version'
require 'uncruft/railtie'
require 'uncruft/deprecation_handler'
require 'uncruft/deprecatable'
require 'uncruft/warning'

module Uncruft
  class << self
    # http://api.rubyonrails.org/classes/ActiveModel/Type/Boolean.html
    FALSE_VALUES = [false, 0, "0", "f", "F", "false", "FALSE", "off", "OFF"].to_set

    def record_deprecations?
      ENV['RECORD_DEPRECATIONS'].presence && !ENV['RECORD_DEPRECATIONS'].in?(FALSE_VALUES)
    end

    def ignorefile_path
      ENV['UNCRUFT_IGNOREFILE_PATH'] || Rails.root.join('config/deprecations.ignore')
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
uncruft-0.5.0 lib/uncruft.rb
uncruft-0.4.0 lib/uncruft.rb