Skip to content

Commit

Permalink
Synchronize generated gemspec with current bundler template
Browse files Browse the repository at this point in the history
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
  • Loading branch information
segiddins committed Jul 29, 2024
1 parent f41ecbf commit 7769ecd
Showing 1 changed file with 8 additions and 2 deletions.
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
Expand Up @@ -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

0 comments on commit 7769ecd

Please sign in to comment.