prebundler 0.15.1 → 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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: c4367b16dd270ecc8daa363de78e174123030871509d0fae9051194e82c086cb
4
- data.tar.gz: 4d72e1df239d66f4774b4c330f6d9af90fb0c98649338e7cca6c56b2c4dbb776
3
+ metadata.gz: c0fa034ffbb98e0cc6d86acf0f364e18524ad9fccb58531d8ce9a6c17eb0cada
4
+ data.tar.gz: 05ed655f3564bb17000ae9513d224800431670115357f3b379b5c9031853a8b5
5
5
  SHA512:
6
- metadata.gz: 0f7db5d69593de1cc601990a74a6d2dce27c9ff2f4d36dd7128201120386cb42b485edd1dc71fda4abf2c5a33a8b7b215351facc22718c8d6b6038b61600db8a
7
- data.tar.gz: 611ad14c794f56d6e986e69f5dc03434ae08d3d09e22e23cd98049da74aa69032894612dab35ffd35d308db36889f50106e261613ff8a46bbf21c5e1e8891ced
6
+ metadata.gz: aae6ace1ae931abd77108a31fff2df2a5d3a896922ae916c40cb89ef9043a8bb789460c51f87f4868381deef46eb5df8676c01b912fe43c4ff15946de7ab94a8
7
+ data.tar.gz: 7e198a678b46e2d303ad5b6cce696f9526211d9f765dcff49765947b9af5d52c3dd7839a72ab6c43d71dc5f320425b44f57fd4ba19cb7b03449df37efd046833
data/CHANGELOG.md CHANGED
@@ -1,3 +1,7 @@
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
+
1
5
  ## 0.15.1
2
6
  * Specify file path when evaling other gemfiles.
3
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.
@@ -117,9 +117,13 @@ module Prebundler
117
117
  end
118
118
 
119
119
  def store_gem(gem_ref, dest_file)
120
- out.puts "Storing #{gem_ref.id}"
121
- gem_ref.add_to_tar(dest_file)
122
- config.storage_backend.store_file(dest_file, gem_ref.tar_file)
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
@@ -188,7 +188,12 @@ module Prebundler
188
188
  end
189
189
 
190
190
  def find_platform_dir(base)
191
- platform = Bundler.local_platform.to_a
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('-')
@@ -18,11 +18,14 @@ module Prebundler
18
18
  instance_eval(File.read(gemfile_path), gemfile_path, 0)
19
19
 
20
20
  lockfile = Bundler::LockfileParser.new(File.read("#{gemfile_path}.lock"))
21
+ local_platform = Bundler.local_platform
21
22
 
22
23
  lockfile.specs.each do |spec|
23
- gems[spec.name] ||= GemRef.create(spec.name, bundle_path, options)
24
- gems[spec.name].spec = spec
25
- gems[spec.name].dependencies = spec.dependencies.map(&:name)
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
26
29
  end
27
30
 
28
31
  # Get rid of gems without a spec, as they are likely not supposed
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Prebundler
4
- VERSION = '0.15.1'
4
+ VERSION = '0.15.2'
5
5
  end
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.1
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: 2023-08-01 00:00:00.000000000 Z
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.3.19
134
- signing_key:
131
+ rubygems_version: 3.6.2
135
132
  specification_version: 4
136
133
  summary: Gem dependency prebuilder
137
134
  test_files: []