Skip to content

Commit 683e80b

Browse files
committedDec 5, 2024
[Gem] Updates gemspecs so unnecessary files are not included in build
1 parent 4925c5e commit 683e80b

File tree

2 files changed

+7
-2
lines changed

2 files changed

+7
-2
lines changed
 

‎elasticsearch-api/elasticsearch-api.gemspec

+3-1
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,9 @@ Gem::Specification.new do |s|
3434
'source_code_uri' => 'https://github.com/elastic/elasticsearch-ruby/tree/main/elasticsearch-api',
3535
'bug_tracker_uri' => 'https://github.com/elastic/elasticsearch-ruby/issues'
3636
}
37-
s.files = `git ls-files`.split($/)
37+
s.files = `git ls-files`.split($/).reject do |file|
38+
file.match(/^utils\/|^spec\/|^api-spec-testing\/|^Gemfile|^Rakefile/)
39+
end
3840
s.executables = s.files.grep(%r{^bin/}) { |f| File.basename(f) }
3941
s.test_files = s.files.grep(%r{^(test|spec|features)/})
4042
s.require_paths = ['lib']

‎elasticsearch/elasticsearch.gemspec

+4-1
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,10 @@ Gem::Specification.new do |s|
3333
'source_code_uri' => 'https://github.com/elastic/elasticsearch-ruby/tree/main',
3434
'bug_tracker_uri' => 'https://github.com/elastic/elasticsearch-ruby/issues'
3535
}
36-
s.files = `git ls-files`.split($/)
36+
s.files = `git ls-files`.split($/).reject do |file|
37+
file.match(/^spec\/|^Gemfile|^Rakefile/)
38+
end
39+
3740
s.executables = s.files.grep(%r{^bin/}) { |f| File.basename(f) }
3841
s.executables << 'elastic_ruby_console'
3942
s.test_files = s.files.grep(%r{^(test|spec|features)/})

0 commit comments

Comments
 (0)