Skip to content
This repository has been archived by the owner on Apr 14, 2021. It is now read-only.

Commit

Permalink
Merge pull request #3579 from pducks32/fix-boolean-settings
Browse files Browse the repository at this point in the history
Fix `bundle gem` boolean settings
  • Loading branch information
indirect committed Apr 20, 2015
2 parents c7fce74 + 8247e55 commit 182372b
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
2 changes: 1 addition & 1 deletion lib/bundler/cli/gem.rb
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,7 @@ def ask_and_set(key, header, message)

if choice.nil?
Bundler.ui.confirm header
choice = (Bundler.ui.ask("#{message} y/(n):") =~ /y|yes/)
choice = Bundler.ui.yes? "#{message} y/(n):"
Bundler.settings.set_global("gem.#{key}", choice)
end

Expand Down
8 changes: 8 additions & 0 deletions lib/bundler/ui/shell.rb
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,14 @@ def ask(msg)
@shell.ask(msg)
end

def yes?(msg)
@shell.yes?(msg)
end

def no?
@shell.no?(msg)
end

def level=(level)
raise ArgumentError unless LEVELS.include?(level.to_s)
@level = level
Expand Down

0 comments on commit 182372b

Please sign in to comment.