summaryrefslogtreecommitdiff
path: root/lib/bundler/lockfile_parser.rb
diff options
context:
space:
mode:
Diffstat (limited to 'lib/bundler/lockfile_parser.rb')
-rw-r--r--lib/bundler/lockfile_parser.rb16
1 files changed, 8 insertions, 8 deletions
diff --git a/lib/bundler/lockfile_parser.rb b/lib/bundler/lockfile_parser.rb
index 3025513f2d..e0c6dd1c38 100644
--- a/lib/bundler/lockfile_parser.rb
+++ b/lib/bundler/lockfile_parser.rb
@@ -26,29 +26,29 @@ module Bundler
OPTIONS = /^ ([a-z]+): (.*)$/i
SOURCE = [GIT, GEM, PATH].freeze
- ATTRIBUTES_BY_VERSION_INTRODUCED = {
+ SECTIONS_BY_VERSION_INTRODUCED = {
Gem::Version.create("1.0") => [DEPENDENCIES, PLATFORMS, GIT, GEM, PATH].freeze,
Gem::Version.create("1.10") => [BUNDLED].freeze,
Gem::Version.create("1.12") => [RUBY].freeze,
}.freeze
- ALL_KNOWN_ATTRIBUTES = ATTRIBUTES_BY_VERSION_INTRODUCED.values.flatten.freeze
+ KNOWN_SECTIONS = SECTIONS_BY_VERSION_INTRODUCED.values.flatten.freeze
- ENVIRONMENT_VERSION_ATTRIBUTES = [BUNDLED, RUBY].freeze
+ ENVIRONMENT_VERSION_SECTIONS = [BUNDLED, RUBY].freeze
- def self.attributes_in_lockfile(lockfile_contents)
+ def self.sections_in_lockfile(lockfile_contents)
lockfile_contents.scan(/^\w[\w ]*$/).uniq
end
- def self.unknown_attributes_in_lockfile(lockfile_contents)
- attributes_in_lockfile(lockfile_contents) - ALL_KNOWN_ATTRIBUTES
+ def self.unknown_sections_in_lockfile(lockfile_contents)
+ sections_in_lockfile(lockfile_contents) - KNOWN_SECTIONS
end
- def self.attributes_to_ignore(base_version = nil)
+ def self.sections_to_ignore(base_version = nil)
base_version &&= base_version.release
base_version ||= Gem::Version.create("1.0")
attributes = []
- ATTRIBUTES_BY_VERSION_INTRODUCED.each do |version, introduced|
+ SECTIONS_BY_VERSION_INTRODUCED.each do |version, introduced|
next if version <= base_version
attributes += introduced
end