From 3cda71d2f63238dc55e7e5a8794174e90cdc2a26 Mon Sep 17 00:00:00 2001 From: f440 Date: Fri, 19 Jul 2024 22:30:28 +0900 Subject: [PATCH 1/3] Remove unused files from package --- activerecord-multi-tenant.gemspec | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) 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' From a80f08405ce0241ce7929730a662f7b3c7cdf882 Mon Sep 17 00:00:00 2001 From: f440 Date: Fri, 19 Jul 2024 22:41:07 +0900 Subject: [PATCH 2/3] Remove docs and changelog from package, add URLs to metadata --- activerecord-multi-tenant.gemspec | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/activerecord-multi-tenant.gemspec b/activerecord-multi-tenant.gemspec index 729df40..6a6bfc8 100644 --- a/activerecord-multi-tenant.gemspec +++ b/activerecord-multi-tenant.gemspec @@ -18,11 +18,17 @@ Gem::Specification.new do |spec| 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]) + f.start_with?(*%w[bin/ docs/ test/ spec/ features/ .git .github Appraisals appveyor Gemfile CHANGELOG]) end end spec.require_paths = ['lib'] spec.homepage = 'https://github.com/citusdata/activerecord-multi-tenant' + + spec.metadata['homepage_uri'] = spec.homepage + spec.metadata['source_code_uri'] = spec.homepage + spec.metadata['changelog_uri'] = "https://github.com/citusdata/activerecord-multi-tenant/blob/v#{spec.version}/CHANGELOG.md" + spec.metadata['documentation_uri'] = 'https://activerecord-multi-tenant.readthedocs.io' + spec.license = 'MIT' spec.add_dependency 'rails', '>= 6' From 46cf81febf0ce82682c1ee61578de914c97f3fa4 Mon Sep 17 00:00:00 2001 From: f440 Date: Thu, 15 Aug 2024 09:03:31 +0900 Subject: [PATCH 3/3] Add a slash to the end of the excluded directories MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Philip Dubé --- activerecord-multi-tenant.gemspec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/activerecord-multi-tenant.gemspec b/activerecord-multi-tenant.gemspec index 6a6bfc8..9a0b93c 100644 --- a/activerecord-multi-tenant.gemspec +++ b/activerecord-multi-tenant.gemspec @@ -18,7 +18,7 @@ Gem::Specification.new do |spec| 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/ docs/ test/ spec/ features/ .git .github Appraisals appveyor Gemfile CHANGELOG]) + f.start_with?(*%w[bin/ docs/ test/ spec/ features/ .git/ .github/ Appraisals appveyor Gemfile CHANGELOG]) end end spec.require_paths = ['lib']