summaryrefslogtreecommitdiff
path: root/lib/bundler
diff options
context:
space:
mode:
authorTerence Lee <hone02@gmail.com>2010-11-17 16:36:02 -0600
committerTerence Lee <hone02@gmail.com>2010-11-17 16:40:07 -0600
commit7849f87034fe5bae71fa80fdde13d591b30d97d6 (patch)
tree1e423de873f1638e80841c39ea0608be5d13e3f1 /lib/bundler
parent1a53b56f75918b4d4a27cefad6e2499a19abebda (diff)
downloadbundler-7849f87034fe5bae71fa80fdde13d591b30d97d6.tar.gz
Reverts adding "bundler version to lockfile".
This should be in 1.1 not 1.0.x. Revert "implementation to detect for older version of bundler than lockfile" This reverts commit bb544c4ed1e06822af28bf4f2c45c84174791d2b. Revert "failing spec for older version of bundler than lockfile" This reverts commit 8928a690afab3da1661260e585efa421f03d592b. Revert "mildly clean up locking with version, mostly whitespace and helpers" This reverts commit 4139386351098883ec4634b1f7f7995149e91e0b. Revert "case better" This reverts commit 27c3d2679965bb89ffa9ddfdc613ffd5e92fe354. Revert "Addendum to #837, add unit test for Bundler::LockfileParser" This reverts commit 3a8e46a07c669ed9887c8b5b0cdda06f7c9ab24f. Revert "Closes #837. Add bundler version to lockfile" This reverts commit 7bd5ae288625dffa9a3e4aa03a3e28affed6af92.
Diffstat (limited to 'lib/bundler')
-rw-r--r--lib/bundler/definition.rb11
-rw-r--r--lib/bundler/installer.rb4
-rw-r--r--lib/bundler/lockfile_parser.rb16
3 files changed, 6 insertions, 25 deletions
diff --git a/lib/bundler/definition.rb b/lib/bundler/definition.rb
index dcac2c9be6..475a40c538 100644
--- a/lib/bundler/definition.rb
+++ b/lib/bundler/definition.rb
@@ -4,7 +4,7 @@ module Bundler
class Definition
include GemHelpers
- attr_reader :dependencies, :platforms, :sources, :version
+ attr_reader :dependencies, :platforms, :sources
def self.build(gemfile, lockfile, unlock)
unlock ||= {}
@@ -34,12 +34,10 @@ module Bundler
@remote = false
@specs = nil
@lockfile_contents = ""
- @version = nil
if lockfile && File.exists?(lockfile)
@lockfile_contents = Bundler.read_file(lockfile)
locked = LockfileParser.new(@lockfile_contents)
- @version = locked.metadata["version"]
@platforms = locked.platforms
if unlock != true
@@ -222,7 +220,8 @@ module Bundler
out << " #{p}\n"
end
- out << "\nDEPENDENCIES\n"
+ out << "\n"
+ out << "DEPENDENCIES\n"
handled = []
dependencies.
@@ -233,10 +232,6 @@ module Bundler
handled << dep.name
end
- out << "\nMETADATA\n"
-
- out << " version: #{Bundler::VERSION}\n"
-
out
end
diff --git a/lib/bundler/installer.rb b/lib/bundler/installer.rb
index b19f65f176..c1fbada82d 100644
--- a/lib/bundler/installer.rb
+++ b/lib/bundler/installer.rb
@@ -63,10 +63,6 @@ module Bundler
FileUtils.rm_rf(Bundler.tmp)
end
- if @definition.version && @definition.version > Bundler::VERSION
- Bundler.ui.warn "Your Gemfile.lock was generated by a newer version of Bundler than this one. Please upgrade!"
- end
-
lock
end
diff --git a/lib/bundler/lockfile_parser.rb b/lib/bundler/lockfile_parser.rb
index 664b60a9a5..bd79070547 100644
--- a/lib/bundler/lockfile_parser.rb
+++ b/lib/bundler/lockfile_parser.rb
@@ -2,24 +2,20 @@ require "strscan"
module Bundler
class LockfileParser
- attr_reader :sources, :dependencies, :specs, :platforms, :metadata
+ attr_reader :sources, :dependencies, :specs, :platforms
def initialize(lockfile)
@platforms = []
@sources = []
@dependencies = []
@specs = []
- @metadata = {}
@state = :source
lockfile.split(/(\r?\n)+/).each do |line|
- case line
- when "DEPENDENCIES"
+ if line == "DEPENDENCIES"
@state = :dependency
- when "PLATFORMS"
+ elsif line == "PLATFORMS"
@state = :platform
- when "METADATA"
- @state = :metadata
else
send("parse_#{@state}", line)
end
@@ -108,11 +104,5 @@ module Bundler
end
end
- def parse_metadata(line)
- if /^ ([a-z]+): (.*)$/i =~ line
- key, value = $1, $2
- @metadata[key] = value
- end
- end
end
end