prebundler 0.15.0 → 0.15.2
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 +8 -0
- data/Gemfile +1 -0
- data/lib/prebundler/cli/install.rb +7 -3
- data/lib/prebundler/gem_ref.rb +6 -1
- data/lib/prebundler/gemfile_interpreter.rb +10 -5
- data/lib/prebundler/version.rb +1 -1
- metadata +3 -6
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: c0fa034ffbb98e0cc6d86acf0f364e18524ad9fccb58531d8ce9a6c17eb0cada
|
4
|
+
data.tar.gz: 05ed655f3564bb17000ae9513d224800431670115357f3b379b5c9031853a8b5
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: aae6ace1ae931abd77108a31fff2df2a5d3a896922ae916c40cb89ef9043a8bb789460c51f87f4868381deef46eb5df8676c01b912fe43c4ff15946de7ab94a8
|
7
|
+
data.tar.gz: 7e198a678b46e2d303ad5b6cce696f9526211d9f765dcff49765947b9af5d52c3dd7839a72ab6c43d71dc5f320425b44f57fd4ba19cb7b03449df37efd046833
|
data/CHANGELOG.md
CHANGED
@@ -1,3 +1,11 @@
|
|
1
|
+
## 0.15.2
|
2
|
+
* Fix issue causing prebundler to store empty archives for some gems with native extensions.
|
3
|
+
- `Bundler.local_platform` reports "aarch64-linux" in my Docker container, but eg. nokogiri's platform is "aarch64-linux-gnu." Using Bundler's local platform to identify the gem's installation directory silently fails because we're missing the "-gnu" part, so no files are included in the archive.
|
4
|
+
|
5
|
+
## 0.15.1
|
6
|
+
* Specify file path when evaling other gemfiles.
|
7
|
+
- `instance_eval` takes two additional arguments, the first of which populates the value of the `__FILE__` constant. This argument was not being passed in several cases, which led to an unexpected working directory when calling `eval_gemfile` with relative paths.
|
8
|
+
|
1
9
|
## 0.15.0
|
2
10
|
* Add the `prebundle lock` command, which simply invokes `bundle lock`.
|
3
11
|
|
data/Gemfile
CHANGED
@@ -117,9 +117,13 @@ module Prebundler
|
|
117
117
|
end
|
118
118
|
|
119
119
|
def store_gem(gem_ref, dest_file)
|
120
|
-
|
121
|
-
|
122
|
-
|
120
|
+
if File.exist?(gem_ref.install_dir)
|
121
|
+
out.puts "Storing #{gem_ref.id}"
|
122
|
+
gem_ref.add_to_tar(dest_file)
|
123
|
+
config.storage_backend.store_file(dest_file, gem_ref.tar_file)
|
124
|
+
else
|
125
|
+
out.puts "Could not determine install dir for #{gem_ref.id}, skipping storage"
|
126
|
+
end
|
123
127
|
end
|
124
128
|
|
125
129
|
def update_bundle_config
|
data/lib/prebundler/gem_ref.rb
CHANGED
@@ -188,7 +188,12 @@ module Prebundler
|
|
188
188
|
end
|
189
189
|
|
190
190
|
def find_platform_dir(base)
|
191
|
-
platform =
|
191
|
+
platform = case spec.platform
|
192
|
+
when String
|
193
|
+
[spec.platform]
|
194
|
+
else
|
195
|
+
spec.platform.to_a
|
196
|
+
end
|
192
197
|
|
193
198
|
platform.size.downto(0) do |i|
|
194
199
|
dir = [base, *platform[0...i]].join('-')
|
@@ -14,14 +14,18 @@ module Prebundler
|
|
14
14
|
@gemfile_path = gemfile_path
|
15
15
|
@bundle_path = bundle_path
|
16
16
|
@prefix = options[:prefix]
|
17
|
-
|
17
|
+
gemfile_path = File.expand_path(gemfile_path)
|
18
|
+
instance_eval(File.read(gemfile_path), gemfile_path, 0)
|
18
19
|
|
19
20
|
lockfile = Bundler::LockfileParser.new(File.read("#{gemfile_path}.lock"))
|
21
|
+
local_platform = Bundler.local_platform
|
20
22
|
|
21
23
|
lockfile.specs.each do |spec|
|
22
|
-
|
23
|
-
|
24
|
-
|
24
|
+
if spec.match_platform(local_platform)
|
25
|
+
gems[spec.name] ||= GemRef.create(spec.name, bundle_path, options)
|
26
|
+
gems[spec.name].spec = spec
|
27
|
+
gems[spec.name].dependencies = spec.dependencies.map(&:name)
|
28
|
+
end
|
25
29
|
end
|
26
30
|
|
27
31
|
# Get rid of gems without a spec, as they are likely not supposed
|
@@ -75,7 +79,8 @@ module Prebundler
|
|
75
79
|
end
|
76
80
|
|
77
81
|
def eval_gemfile(path)
|
78
|
-
|
82
|
+
path = File.expand_path(path)
|
83
|
+
instance_eval(File.read(path), path, 0)
|
79
84
|
end
|
80
85
|
end
|
81
86
|
end
|
data/lib/prebundler/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: prebundler
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.15.
|
4
|
+
version: 0.15.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Cameron Dutro
|
8
|
-
autorequire:
|
9
8
|
bindir: bin
|
10
9
|
cert_chain: []
|
11
|
-
date:
|
10
|
+
date: 2025-03-02 00:00:00.000000000 Z
|
12
11
|
dependencies:
|
13
12
|
- !ruby/object:Gem::Dependency
|
14
13
|
name: bundler
|
@@ -115,7 +114,6 @@ files:
|
|
115
114
|
homepage: http://github.com/camertron
|
116
115
|
licenses: []
|
117
116
|
metadata: {}
|
118
|
-
post_install_message:
|
119
117
|
rdoc_options: []
|
120
118
|
require_paths:
|
121
119
|
- lib
|
@@ -130,8 +128,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
130
128
|
- !ruby/object:Gem::Version
|
131
129
|
version: '0'
|
132
130
|
requirements: []
|
133
|
-
rubygems_version: 3.
|
134
|
-
signing_key:
|
131
|
+
rubygems_version: 3.6.2
|
135
132
|
specification_version: 4
|
136
133
|
summary: Gem dependency prebuilder
|
137
134
|
test_files: []
|