diff --git a/activerecord-multi-tenant.gemspec b/activerecord-multi-tenant.gemspec index 0811991..729df40 100644 --- a/activerecord-multi-tenant.gemspec +++ b/activerecord-multi-tenant.gemspec @@ -14,7 +14,13 @@ Gem::Specification.new do |spec| spec.required_ruby_version = '>= 3.0.0' spec.metadata = { 'rubygems_mfa_required' => 'true' } - spec.files = `git ls-files`.split("\n") + gemspec = File.basename(__FILE__) + spec.files = IO.popen(%w[git ls-files -z], 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 .github Appraisals appveyor Gemfile]) + end + end spec.require_paths = ['lib'] spec.homepage = 'https://github.com/citusdata/activerecord-multi-tenant' spec.license = 'MIT'