Sha256: ba36c61949b98e374c6ff41b6ae30e1fcf48901d9e52ebd28a9289868ba9959d

Contents?: true

Size: 600 Bytes

Versions: 2

Compression:

Stored size: 600 Bytes

Contents

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 && !FALSE_VALUES.include?(ENV['RECORD_DEPRECATIONS'])
    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.2.1 lib/uncruft.rb
uncruft-0.2.0 lib/uncruft.rb