Sha256: 48c5a14521367c4cfe91cdc10005441820beae40593888446d7bdcccc47fdc0d

Contents?: true

Size: 452 Bytes

Versions: 6

Compression:

Stored size: 452 Bytes

Contents

module Dotenvious
  class MismatchedVariableFinder
    def self.mismatched_vars?
      mismatched_vars.any?
    end

    def self.mismatched_vars
      keys.select do |key|
        ENV_EXAMPLE.has_key?(key) && ENV_EXAMPLE[key] != ENV[key]
      end
    end

    private

    def self.keys
      return ENV.keys if CONFIG[:custom_variables].nil?
      ENV.keys.reject do |key|
        CONFIG[:custom_variables].include?(key)
      end
    end
  end
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
dotenvious-0.0.7 lib/dotenvious/mismatched_variable_finder.rb
dotenvious-0.0.6 lib/dotenvious/mismatched_variable_finder.rb
dotenvious-0.0.5 lib/dotenvious/mismatched_variable_finder.rb
dotenvious-0.0.4 lib/dotenvious/mismatched_variable_finder.rb
dotenvious-0.0.3 lib/dotenvious/mismatched_variable_finder.rb
dotenvious-0.0.1 lib/dotenvious/mismatched_variable_finder.rb