Skip to content

Commit

Permalink
Remove rails binstub from built gems
Browse files Browse the repository at this point in the history
The bin/rails script is solely used for local dev purposes.
Since the default bindir from Rubygems is bin the binstub
gets installed with the gems. This can cause issues with
the rails command comming from rails itself.

Also removing the old script/rails files, which were excluded
to solve the same issue.

(cherry picked from commit dde8966)
  • Loading branch information
tvdeyen committed Nov 14, 2024
1 parent 4b5beac commit 5d8025b
Show file tree
Hide file tree
Showing 9 changed files with 7 additions and 37 deletions.
2 changes: 1 addition & 1 deletion admin/solidus_admin.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ Gem::Specification.new do |s|
s.metadata["changelog_uri"] = "https://github.com/solidusio/solidus/releases?q=%22solidus_admin%2Fv0%22&expanded=true"

s.files = `git ls-files -z`.split("\x0").reject do |f|
f.match(%r{^(spec|script)/})
f.match(%r{^(spec|bin)/})
end + ["app/assets/builds/solidus_admin/tailwind.css"]

s.required_ruby_version = '>= 3.1.0'
Expand Down
10 changes: 0 additions & 10 deletions api/script/rails

This file was deleted.

2 changes: 1 addition & 1 deletion api/solidus_api.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ Gem::Specification.new do |s|
s.metadata['rubygems_mfa_required'] = 'true'

s.files = `git ls-files -z`.split("\x0").reject do |f|
f.match(%r{^(spec|script)/})
f.match(%r{^(spec|bin)/})
end

s.required_ruby_version = '>= 3.1.0'
Expand Down
10 changes: 0 additions & 10 deletions backend/script/rails

This file was deleted.

2 changes: 1 addition & 1 deletion backend/solidus_backend.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ Gem::Specification.new do |s|
s.metadata['rubygems_mfa_required'] = 'true'

s.files = `git ls-files -z`.split("\x0").reject do |f|
f.match(%r{^(spec|script)/})
f.match(%r{^(spec|bin)/})
end

s.required_ruby_version = '>= 3.1.0'
Expand Down
10 changes: 0 additions & 10 deletions core/script/rails

This file was deleted.

2 changes: 1 addition & 1 deletion core/solidus_core.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ Gem::Specification.new do |s|
s.metadata['rubygems_mfa_required'] = 'true'

s.files = `git ls-files -z`.split("\x0").reject do |f|
f.match(%r{^(spec|script)/})
f.match(%r{^(spec|bin)/})
end

s.required_ruby_version = '>= 3.1.0'
Expand Down
2 changes: 1 addition & 1 deletion legacy_promotions/solidus_legacy_promotions.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ Gem::Specification.new do |s|
s.metadata['rubygems_mfa_required'] = 'true'

s.files = `git ls-files -z`.split("\x0").reject do |f|
f.match(%r{^(spec|script)/})
f.match(%r{^(spec|bin)/})
end

s.required_ruby_version = '>= 3.1.0'
Expand Down
4 changes: 2 additions & 2 deletions promotions/solidus_promotions.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -17,12 +17,12 @@ Gem::Specification.new do |spec|

spec.metadata["homepage_uri"] = spec.homepage

spec.required_ruby_version = ">= 3.0.0"
spec.required_ruby_version = ">= 3.1.0"

# Specify which files should be added to the gem when it is released.
# The `git ls-files -z` loads the files in the RubyGem that have been added into git.
files = Dir.chdir(__dir__) { `git ls-files -z`.split("\x0") }
spec.files = files.grep_v(%r{^(test|spec|features)/})
spec.files = files.grep_v(%r{^(spec|bin)/})

spec.add_dependency "importmap-rails", "~> 1.2"
spec.add_dependency "ransack-enum", "~> 1.0"
Expand Down

0 comments on commit 5d8025b

Please sign in to comment.