Class: Bundler::Patch::CLI::Options

Inherits:
Object
  • Object
show all
Defined in:
lib/bundler/patch/cli_options.rb

Instance Method Summary collapse

Instance Method Details

#normalize_options(options) ⇒ Object



4
5
6
7
8
9
10
11
12
13
14
# File 'lib/bundler/patch/cli_options.rb', line 4

def normalize_options(options)
  map = {:prefer_minimal => :minimal, :strict_updates => :strict, :minor_preferred => :minor}
  {}.tap do |target|
    options.each_pair do |k, v|
      new_key = k.to_s.gsub('-', '_').to_sym
      new_key = map[new_key] || new_key
      target[new_key] ||= v
    end
    process_gemfile_option(target)
  end
end