Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Synchronize generated gemspec with current bundler template #12414

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
Synchronize generated gemspec with current bundler template
See template at https://github.com/rubygems/rubygems/blob/d786a1ccca3922d21572f77b021c51bfaf005819/bundler/lib/bundler/templates/newgem/newgem.gemspec.tt#L34

Additionally, exclude .gem files, since there seem to be several gems built from swagger-codegen that are recursively including older .gem versions, and thus growing in size exponentially
segiddins committed Jul 29, 2024
commit 7769ecd6f6e4590f81e79a382e9b24a7ff3ecdc7
10 changes: 8 additions & 2 deletions modules/swagger-codegen/src/main/resources/ruby/gemspec.mustache
Original file line number Diff line number Diff line change
@@ -36,8 +36,14 @@ Gem::Specification.new do |s|
s.add_development_dependency 'autotest-growl', '~> 0.2', '>= 0.2.16'
s.add_development_dependency 'autotest-fsevent', '~> 0.2', '>= 0.2.12'

s.files = `find *`.split("\n").uniq.sort.select { |f| !f.empty? }
s.test_files = `find spec/*`.split("\n")
gemspec = File.basename(__FILE__)
spec.files = IO.popen(%w[find * -print0], chdir: __dir__, err: IO::NULL) do |ls|
ls.readlines("\x0", chomp: true).reject do |f|
(f == gemspec) ||
f.start_with?(*%w[bin/ test/ spec/ features/ .git Gemfile]) ||
f.end_with?(".gem")
end
end
s.executables = []
s.require_paths = ["lib"]
end