bundler 1.12.0.rc.2 → 1.12.0.rc.3
Sign up to get free protection for your applications and to get access to all the features.
Potentially problematic release.
This version of bundler might be problematic. Click here for more details.
- checksums.yaml +4 -4
- data/CHANGELOG.md +6 -0
- data/lib/bundler/cli/check.rb +1 -1
- data/lib/bundler/definition.rb +13 -9
- data/lib/bundler/environment.rb +1 -1
- data/lib/bundler/lockfile_parser.rb +29 -0
- data/lib/bundler/runtime.rb +1 -1
- data/lib/bundler/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 6c6e3bb6749fe497b955858e6fd5adc9c1ccbe23
|
4
|
+
data.tar.gz: cc7858b1fd4b74f7e71c97c62ded46317d02690b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f3cfde8e2f4d42e3a83ce2a1a573e4a7e19fd0abdd98f9de9fffa89d6516e6cf28fceddaca0b685d0f4c921ed489901c421773ee4d3079a954e66943a6bde899
|
7
|
+
data.tar.gz: 36c8f8d9c9953ac8738c251d4f234dc230a53b29ca65142a3597fe6455ea60181db264295b7c656b3926789c80e32aafe7216da57923194037b69a9d3f827df5
|
data/CHANGELOG.md
CHANGED
data/lib/bundler/cli/check.rb
CHANGED
@@ -32,7 +32,7 @@ module Bundler
|
|
32
32
|
Bundler.ui.error "This bundle has been frozen, but there is no #{Bundler.default_lockfile.relative_path_from(SharedHelpers.pwd)} present"
|
33
33
|
exit 1
|
34
34
|
else
|
35
|
-
Bundler.load.lock(:
|
35
|
+
Bundler.load.lock(:preserve_unknown_sections => true) unless options[:"dry-run"]
|
36
36
|
Bundler.ui.info "The Gemfile's dependencies are satisfied"
|
37
37
|
end
|
38
38
|
end
|
data/lib/bundler/definition.rb
CHANGED
@@ -241,7 +241,7 @@ module Bundler
|
|
241
241
|
dependencies.map(&:groups).flatten.uniq
|
242
242
|
end
|
243
243
|
|
244
|
-
def lock(file,
|
244
|
+
def lock(file, preserve_unknown_sections = false)
|
245
245
|
contents = to_lock
|
246
246
|
|
247
247
|
# Convert to \r\n if the existing lock has them
|
@@ -258,8 +258,8 @@ module Bundler
|
|
258
258
|
end
|
259
259
|
end
|
260
260
|
|
261
|
-
|
262
|
-
return if lockfiles_equal?(@lockfile_contents, contents,
|
261
|
+
preserve_unknown_sections ||= !updating_major && (Bundler.settings[:frozen] || !@unlocking)
|
262
|
+
return if lockfiles_equal?(@lockfile_contents, contents, preserve_unknown_sections)
|
263
263
|
|
264
264
|
if Bundler.settings[:frozen]
|
265
265
|
Bundler.ui.error "Cannot write a changed lockfile while frozen."
|
@@ -672,13 +672,17 @@ module Bundler
|
|
672
672
|
groups - Bundler.settings.without - @optional_groups + Bundler.settings.with
|
673
673
|
end
|
674
674
|
|
675
|
-
def lockfiles_equal?(current, proposed,
|
676
|
-
if
|
677
|
-
|
678
|
-
|
679
|
-
|
680
|
-
|
675
|
+
def lockfiles_equal?(current, proposed, preserve_unknown_sections)
|
676
|
+
if preserve_unknown_sections
|
677
|
+
sections_to_ignore = LockfileParser.sections_to_ignore(@locked_bundler_version)
|
678
|
+
sections_to_ignore += LockfileParser.unknown_sections_in_lockfile(current)
|
679
|
+
sections_to_ignore += LockfileParser::ENVIRONMENT_VERSION_SECTIONS
|
680
|
+
pattern = /#{Regexp.union(sections_to_ignore)}\n(\s{2,}.*\n)+/
|
681
|
+
whitespace_cleanup = /\n{2,}/
|
682
|
+
current = current.gsub(pattern, "\n").gsub(whitespace_cleanup, "\n\n").strip
|
683
|
+
proposed = proposed.gsub(pattern, "\n").gsub(whitespace_cleanup, "\n\n").strip
|
681
684
|
end
|
685
|
+
current == proposed
|
682
686
|
end
|
683
687
|
end
|
684
688
|
end
|
data/lib/bundler/environment.rb
CHANGED
@@ -26,6 +26,35 @@ module Bundler
|
|
26
26
|
OPTIONS = /^ ([a-z]+): (.*)$/i
|
27
27
|
SOURCE = [GIT, GEM, PATH].freeze
|
28
28
|
|
29
|
+
SECTIONS_BY_VERSION_INTRODUCED = {
|
30
|
+
Gem::Version.create("1.0") => [DEPENDENCIES, PLATFORMS, GIT, GEM, PATH].freeze,
|
31
|
+
Gem::Version.create("1.10") => [BUNDLED].freeze,
|
32
|
+
Gem::Version.create("1.12") => [RUBY].freeze,
|
33
|
+
}.freeze
|
34
|
+
|
35
|
+
KNOWN_SECTIONS = SECTIONS_BY_VERSION_INTRODUCED.values.flatten.freeze
|
36
|
+
|
37
|
+
ENVIRONMENT_VERSION_SECTIONS = [BUNDLED, RUBY].freeze
|
38
|
+
|
39
|
+
def self.sections_in_lockfile(lockfile_contents)
|
40
|
+
lockfile_contents.scan(/^\w[\w ]*$/).uniq
|
41
|
+
end
|
42
|
+
|
43
|
+
def self.unknown_sections_in_lockfile(lockfile_contents)
|
44
|
+
sections_in_lockfile(lockfile_contents) - KNOWN_SECTIONS
|
45
|
+
end
|
46
|
+
|
47
|
+
def self.sections_to_ignore(base_version = nil)
|
48
|
+
base_version &&= base_version.release
|
49
|
+
base_version ||= Gem::Version.create("1.0")
|
50
|
+
attributes = []
|
51
|
+
SECTIONS_BY_VERSION_INTRODUCED.each do |version, introduced|
|
52
|
+
next if version <= base_version
|
53
|
+
attributes += introduced
|
54
|
+
end
|
55
|
+
attributes
|
56
|
+
end
|
57
|
+
|
29
58
|
def initialize(lockfile)
|
30
59
|
@platforms = []
|
31
60
|
@sources = []
|
data/lib/bundler/runtime.rb
CHANGED
data/lib/bundler/version.rb
CHANGED
@@ -7,5 +7,5 @@ module Bundler
|
|
7
7
|
# We're doing this because we might write tests that deal
|
8
8
|
# with other versions of bundler and we are unsure how to
|
9
9
|
# handle this better.
|
10
|
-
VERSION = "1.12.0.rc.
|
10
|
+
VERSION = "1.12.0.rc.3" unless defined?(::Bundler::VERSION)
|
11
11
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: bundler
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.12.0.rc.
|
4
|
+
version: 1.12.0.rc.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- André Arko
|
@@ -11,7 +11,7 @@ authors:
|
|
11
11
|
autorequire:
|
12
12
|
bindir: exe
|
13
13
|
cert_chain: []
|
14
|
-
date: 2016-04-
|
14
|
+
date: 2016-04-20 00:00:00.000000000 Z
|
15
15
|
dependencies:
|
16
16
|
- !ruby/object:Gem::Dependency
|
17
17
|
name: automatiek
|