Permalink
Browse files

rename --no-lock to --dry-run

  • Loading branch information...
hone committed Jul 17, 2012
1 parent 2ef30d6 commit 7e16c245e04b082e66d2d35f534e206b91ad6c75
Showing with 4 additions and 4 deletions.
  1. +2 −2 lib/bundler/cli.rb
  2. +2 −2 spec/other/check_spec.rb
View
@@ -94,7 +94,7 @@ def init
"Use the specified gemfile instead of Gemfile"
method_option "path", :type => :string, :banner =>
"Specify a different path than the system default ($BUNDLE_PATH or $GEM_HOME). Bundler will remember this value for future installs on this machine"
- method_option "lock", :type => :boolean, :default => true, :banner =>
+ method_option "dry-run", :type => :boolean, :default => false, :banner =>
"Lock the Gemfile"
def check
ENV['BUNDLE_GEMFILE'] = File.expand_path(options[:gemfile]) if options[:gemfile]
@@ -119,7 +119,7 @@ def check
Bundler.ui.error "This bundle has been frozen, but there is no Gemfile.lock present"
exit 1
else
- Bundler.load.lock if options[:lock]
+ Bundler.load.lock unless options[:"dry-run"]
Bundler.ui.info "The Gemfile's dependencies are satisfied"
end
end
View
@@ -36,15 +36,15 @@
bundled_app("Gemfile.lock").should exist
end
- it "does not create a Gemfile.lock if --no-lock was passed" do
+ it "does not create a Gemfile.lock if --dry-run was passed" do
install_gemfile <<-G
source "file://#{gem_repo1}"
gem "rails"
G
FileUtils.rm("Gemfile.lock")
- bundle "check --no-lock"
+ bundle "check --dry-run"
bundled_app("Gemfile.lock").should_not exist
end

0 comments on commit 7e16c24

Please sign in to comment.