prebundler 0.11.7 → 0.11.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/CHANGELOG.md +7 -0
- data/lib/prebundler/cli/install.rb +7 -3
- data/lib/prebundler/gem_ref.rb +10 -2
- data/lib/prebundler/gemfile_interpreter.rb +3 -0
- data/lib/prebundler/git_gem_ref.rb +4 -4
- data/lib/prebundler/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 2b7bea8849dcfbf9020cff5c2c1b9b680cf791db9d2c9b8f3281433001e33bb2
|
4
|
+
data.tar.gz: 121f2dc97ae36b8fa7da226bb87de592597b7dfcd97f3a26b90e3c85e2270ad1
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 20fd4208dbef759aa79fc2c98364073fe02a58d277eecb8f27192b7c1ac112cd6112d8b381b77f4d31c2225cbbff91bd96322f360d7708d060e8d5d62b1272fc
|
7
|
+
data.tar.gz: 3d5d817a64373717bab3e2e40ae46db92d1e20d05cd637c5efbbd41fe27404214ac0bb034c3fb76cca16592220680b0f7810122f7ba52258482916828c5281e0
|
data/CHANGELOG.md
CHANGED
@@ -1,3 +1,10 @@
|
|
1
|
+
0.11.8
|
2
|
+
===
|
3
|
+
- Don't store gems in the backend if they failed to install.
|
4
|
+
- Use an absolute bundle path.
|
5
|
+
- Only consider a gem from the lockfile if it matches the current platform.
|
6
|
+
- Fix `#install` methods so they all return true/false.
|
7
|
+
|
1
8
|
0.11.7
|
2
9
|
===
|
3
10
|
- Fix bug causing platform-specific gems to be installed from source even if they were already present in the backend.
|
@@ -102,8 +102,12 @@ module Prebundler
|
|
102
102
|
FileUtils.rm(dest_file)
|
103
103
|
else
|
104
104
|
out.puts "Installing #{gem_ref.id} from source"
|
105
|
-
|
106
|
-
|
105
|
+
|
106
|
+
if gem_ref.install
|
107
|
+
store_gem(gem_ref, dest_file) if gem_ref.storable?
|
108
|
+
else
|
109
|
+
out.puts "Failed to install #{gem_ref.id} from source"
|
110
|
+
end
|
107
111
|
end
|
108
112
|
end
|
109
113
|
|
@@ -179,7 +183,7 @@ module Prebundler
|
|
179
183
|
end
|
180
184
|
|
181
185
|
def bundle_path
|
182
|
-
options.fetch(:'bundle-path')
|
186
|
+
File.expand_path(options.fetch(:'bundle-path'))
|
183
187
|
end
|
184
188
|
|
185
189
|
def config
|
data/lib/prebundler/gem_ref.rb
CHANGED
@@ -48,11 +48,19 @@ module Prebundler
|
|
48
48
|
end
|
49
49
|
|
50
50
|
def install
|
51
|
+
# NOTE: the --platform argument doesn't work when --ignore-dependencies
|
52
|
+
# is specified, no idea why
|
51
53
|
Bundler.with_unbundled_env do
|
52
|
-
system(
|
54
|
+
system(
|
55
|
+
{ "GEM_HOME" => bundle_path },
|
56
|
+
'gem install -N --ignore-dependencies '\
|
57
|
+
"--source #{source} #{name} "\
|
58
|
+
"--version #{version} "\
|
59
|
+
"--platform #{Bundler.local_platform.to_s}"
|
60
|
+
)
|
53
61
|
end
|
54
62
|
|
55
|
-
$?.exitstatus
|
63
|
+
$?.exitstatus == 0
|
56
64
|
end
|
57
65
|
|
58
66
|
def install_from_tar(tar_file)
|
@@ -17,8 +17,11 @@ module Prebundler
|
|
17
17
|
instance_eval(File.read(gemfile_path))
|
18
18
|
|
19
19
|
lockfile = Bundler::LockfileParser.new(File.read("#{gemfile_path}.lock"))
|
20
|
+
local_platform = Bundler.local_platform.to_s
|
20
21
|
|
21
22
|
lockfile.specs.each do |spec|
|
23
|
+
next if spec.platform != 'ruby' && spec.platform.to_s != local_platform
|
24
|
+
|
22
25
|
gems[spec.name] ||= GemRef.create(spec.name, bundle_path, options)
|
23
26
|
gems[spec.name].spec = spec
|
24
27
|
gems[spec.name].dependencies = spec.dependencies.map(&:name)
|
@@ -22,15 +22,15 @@ module Prebundler
|
|
22
22
|
FileUtils.mkdir_p(install_path)
|
23
23
|
FileUtils.mkdir_p(cache_path)
|
24
24
|
|
25
|
-
return if File.exist?(cache_dir) || File.exist?(install_dir)
|
25
|
+
return true if File.exist?(cache_dir) || File.exist?(install_dir)
|
26
26
|
system "git clone #{uri} \"#{cache_dir}\" --bare --no-hardlinks --quiet"
|
27
|
-
return
|
27
|
+
return false if $?.exitstatus != 0
|
28
28
|
system "git clone --no-checkout --quiet \"#{cache_dir}\" \"#{install_dir}\""
|
29
|
-
return
|
29
|
+
return false if $?.exitstatus != 0
|
30
30
|
Dir.chdir(install_dir) { system "git reset --hard --quiet #{revision}" }
|
31
31
|
serialize_gemspecs
|
32
32
|
copy_gemspecs
|
33
|
-
|
33
|
+
$?.exitstatus == 0
|
34
34
|
end
|
35
35
|
|
36
36
|
def to_gem
|
data/lib/prebundler/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: prebundler
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.11.
|
4
|
+
version: 0.11.8
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Cameron Dutro
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2021-05-04 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|