aboutsummaryrefslogtreecommitdiffstats
path: root/lib/bundler/environment.rb
diff options
context:
space:
mode:
authorCarl Lerche <carllerche@mac.com>2010-06-01 12:31:34 -0700
committerCarl Lerche <carllerche@mac.com>2010-06-01 12:31:34 -0700
commit4bc9f4fbef551ec2da7cb08db85e2ad1d988e634 (patch)
tree037d6d021f887c8e803af62e40efdfd838baa1dc /lib/bundler/environment.rb
parentd2e512332043877ccc935a9dc4ce59e367aeaaac (diff)
downloadbundler-4bc9f4fbef551ec2da7cb08db85e2ad1d988e634.tar.gz
Move lock generation into Definition
Diffstat (limited to 'lib/bundler/environment.rb')
-rw-r--r--lib/bundler/environment.rb30
1 files changed, 1 insertions, 29 deletions
diff --git a/lib/bundler/environment.rb b/lib/bundler/environment.rb
index 51187fa8..9bf31b9b 100644
--- a/lib/bundler/environment.rb
+++ b/lib/bundler/environment.rb
@@ -48,37 +48,9 @@ module Bundler
# ==== Locking
def write_yml_lock
- contents = lock_content
File.open(root.join('Gemfile.lock'), 'w') do |f|
- f.puts contents
+ f.puts @definition.to_lock
end
end
-
- def lock_content
- out = ""
-
- @definition.sources.each do |source|
- # Add the source header
- out << source.to_lock
- # Find all specs for this source
- specs.
- select { |s| s.source == source }.
- sort_by { |s| s.name }.
- each do |spec|
- out << spec.to_lock
- end
- out << "\n"
- end
-
- out << "DEPENDENCIES\n"
-
- @definition.dependencies.
- sort_by { |d| d.name }.
- each do |dep|
- out << dep.to_lock
- end
-
- out
- end
end
end