Skip to content

Commit

Permalink
rename --no-lock to --dry-run
Browse files Browse the repository at this point in the history
  • Loading branch information
hone committed Jul 17, 2012
1 parent 2ef30d6 commit 7e16c24
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions lib/bundler/cli.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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]
Expand All @@ -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
Expand Down
4 changes: 2 additions & 2 deletions spec/other/check_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 7e16c24

Please sign in to comment.