serverlessgems 0.4.2 → 0.4.3

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: 4180b95b85ce932e83e67ba621485a458e1d7cff1d673af091eee2c80fc957e5
4
- data.tar.gz: 9b84b2f954ea096fc9a2c9b8243cd771847926c8b0b26023baa802f85d771030
3
+ metadata.gz: 3bf2582904ec4259bc6d3b6d0ebcf407e2a3061c5c32c49f1c96c23d46d28048
4
+ data.tar.gz: fb74483267d8a14301e6bb9f1ff1b9f8eae28227ae0b9895ad7853426103a46d
5
5
  SHA512:
6
- metadata.gz: acb02e4538a245354e35904f9b4ebd308bd768d9a87273c3b8ac2bf7bf217ce8575492ef4d5d8be8a1d8fb53a9bced3ea8a17afd10446eee95596d2df4714c5b
7
- data.tar.gz: df2bdc6db711f9d8599233e49fb8183006f6b14a41c28b93bfb4e48eea9f313e1af148d650238c8c4c2d778d68a6554069b2d931f6552a8b03f3eeb6ef3c491e
6
+ metadata.gz: 8ee67a43c0eb68cbddab1a0e7b1aa3b7739c56d43df9f0e1aa91e6a5f9d23630b325ffe01ced97febf178cb991a4068499c07d938221f6c7577965b974809ed9
7
+ data.tar.gz: 9bf66559b45718864229297600d8e4d9b85a341d5e63d20f34c61ebde5ac66c467b4d34dbb9f41b296a97cda5833f7540c6e76d0d217bd229743909d02d759b5
data/CHANGELOG.md CHANGED
@@ -3,6 +3,9 @@
3
3
  All notable changes to this project will be documented in this file.
4
4
  This project *loosely tries* to adhere to [Semantic Versioning](http://semver.org/).
5
5
 
6
+ ## [0.4.3] - 2025-10-11
7
+ - fix clean up gem variants
8
+
6
9
  ## [0.4.2] - 2025-10-10
7
10
  - fix gem detection ffi - gnu suffix and clean up incompatible platform variants
8
11
 
@@ -44,38 +44,36 @@ module Jets::Gems::Extract
44
44
  gem_groups[base_name] << {dir: dir, name: name}
45
45
  end
46
46
 
47
- # For each gem group, keep only x86_64-linux variants
48
- gem_groups.each do |base_name, variants|
49
- next if variants.size <= 1 # No cleanup needed if only one variant
47
+ # For each gem group, clean up platform variants
48
+ gem_groups.each { |base_name, variants| cleanup_gem_variants(base_name, variants, specs_dir) }
49
+ end
50
50
 
51
- say "Found #{variants.size} platform variants for #{base_name}:"
52
- variants.each { |v| say " - #{v[:name]}" }
51
+ # Clean up platform variants for a specific gem group
52
+ def cleanup_gem_variants(base_name, variants, specs_dir)
53
+ return if variants.size <= 1 # No cleanup needed if only one variant
53
54
 
54
- # Find x86_64-linux variants (preferred for AWS Lambda)
55
- x86_64_variants = variants.select { |v| v[:name].include?("-x86_64-linux-gnu") || v[:name].include?("-x86_64-linux") }
55
+ say "Found #{variants.size} platform variants for #{base_name}:"
56
+ variants.each { |v| say " - #{v[:name]}" }
56
57
 
57
- if x86_64_variants.any?
58
- # Keep x86_64-linux variants, remove others
59
- keep_variants = x86_64_variants
60
- remove_variants = variants - x86_64_variants
61
- else
62
- # If no x86_64-linux variants, keep the first one alphabetically
63
- keep_variants = [variants.min_by { |v| v[:name] }]
64
- remove_variants = variants - keep_variants
65
- end
58
+ # Always favor base gem variants (without platform suffix) - these are from Jets API
59
+ # Remove all platform-specific variants
60
+ base_variants = variants.select { |v| !v[:name].match(/-[^-]+-[^-]+$/) }
61
+ platform_variants = variants - base_variants
66
62
 
67
- say "Keeping: #{keep_variants.map { |v| v[:name] }.join(", ")}"
68
- say "Removing: #{remove_variants.map { |v| v[:name] }.join(", ")}"
63
+ keep_variants = base_variants.any? ? base_variants : variants
64
+ remove_variants = platform_variants
69
65
 
70
- # Remove incompatible variants
71
- remove_variants.each do |variant|
72
- say "Removing incompatible variant: #{variant[:name]}"
73
- FileUtils.rm_rf(variant[:dir])
66
+ say "Keeping: #{keep_variants.map { |v| v[:name] }.join(", ")}"
67
+ say "Removing: #{remove_variants.map { |v| v[:name] }.join(", ")}"
74
68
 
75
- # Also remove the corresponding gemspec
76
- gemspec_path = "#{specs_dir}/#{variant[:name]}.gemspec"
77
- FileUtils.rm_f(gemspec_path) if File.exist?(gemspec_path)
78
- end
69
+ # Remove incompatible variants
70
+ remove_variants.each do |variant|
71
+ say "Removing incompatible variant: #{variant[:name]}"
72
+ FileUtils.rm_rf(variant[:dir])
73
+
74
+ # Also remove the corresponding gemspec
75
+ gemspec_path = "#{specs_dir}/#{variant[:name]}.gemspec"
76
+ FileUtils.rm_f(gemspec_path) if File.exist?(gemspec_path)
79
77
  end
80
78
  end
81
79
 
@@ -1,5 +1,5 @@
1
1
  module Jets
2
2
  module Gems
3
- VERSION = "0.4.2"
3
+ VERSION = "0.4.3"
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,13 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: serverlessgems
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.2
4
+ version: 0.4.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Tung Nguyen
8
+ autorequire:
8
9
  bindir: exe
9
10
  cert_chain: []
10
- date: 1980-01-02 00:00:00.000000000 Z
11
+ date: 2025-10-11 00:00:00.000000000 Z
11
12
  dependencies:
12
13
  - !ruby/object:Gem::Dependency
13
14
  name: gems
@@ -93,6 +94,7 @@ dependencies:
93
94
  - - ">="
94
95
  - !ruby/object:Gem::Version
95
96
  version: '0'
97
+ description:
96
98
  email:
97
99
  - tongueroo@gmail.com
98
100
  executables: []
@@ -129,6 +131,7 @@ homepage: https://github.com/boltops-tools/serverlessgems
129
131
  licenses:
130
132
  - MIT
131
133
  metadata: {}
134
+ post_install_message:
132
135
  rdoc_options: []
133
136
  require_paths:
134
137
  - lib
@@ -143,7 +146,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
143
146
  - !ruby/object:Gem::Version
144
147
  version: '0'
145
148
  requirements: []
146
- rubygems_version: 3.6.7
149
+ rubygems_version: 3.4.19
150
+ signing_key:
147
151
  specification_version: 4
148
152
  summary: Client Library works with Serverless Gems API for Jets Ruby Serverless Framework
149
153
  test_files: []