Skip to content

Commit aa2f465

Browse files
justin808claude
andcommitted
Fix critical Pro gemspec and Gemfile issues
CRITICAL FIXES: 1. **Pro Gemfile path issue**: Updated react_on_rails_pro/Gemfile to explicitly point to the root-level gemspec with: `gemspec name: "react_on_rails_pro", path: ".."` Without this, bundler would look for react_on_rails_pro.gemspec in react_on_rails_pro/ directory (doesn't exist) when running from that directory. 2. **Pro rake tasks exclusion bug**: Replaced dangerous reject pattern that excluded ALL lib/tasks/ files with explicit whitelist. The old pattern `%r{^(lib/tasks)/}` excluded CRITICAL Pro rake tasks: - lib/tasks/assets_pro.rake (Pro asset bundling) - lib/tasks/v8_log_processor.rake (Pro V8 logging) New approach uses Dir.glob to explicitly include: - lib/react_on_rails_pro.rb - lib/react_on_rails_pro/**/* - lib/tasks/assets_pro.rake - lib/tasks/v8_log_processor.rake - CHANGELOG_PRO.md, LICENSE, README.md, gemspec ## Verification Tested with `gem build react_on_rails_pro.gemspec` and verified: ✅ Both Pro rake tasks are included ✅ All Pro lib files are included ✅ No MIT files are included (lib/react_on_rails/, MIT rake tasks) 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <[email protected]>
1 parent 744ed7b commit aa2f465

File tree

2 files changed

+11
-8
lines changed

2 files changed

+11
-8
lines changed

react_on_rails_pro.gemspec

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -20,12 +20,15 @@ Gem::Specification.new do |s|
2020
s.license = "UNLICENSED"
2121
s.metadata["rubygems_mfa_required"] = "true"
2222

23-
s.files = `git ls-files -z`.split("\x0")
24-
.reject { |f|
25-
f.match(
26-
%r{^(test|spec|features|tmp|node_modules|packages|coverage|Gemfile.lock|lib/tasks)/}
27-
)
28-
}
23+
# Explicitly whitelist Pro files to ensure we only include what belongs in this gem
24+
s.files = Dir.glob("{lib/react_on_rails_pro.rb,lib/react_on_rails_pro/**/*}") +
25+
Dir.glob("lib/tasks/{assets_pro.rake,v8_log_processor.rake}") +
26+
%w[
27+
react_on_rails_pro.gemspec
28+
CHANGELOG_PRO.md
29+
LICENSE
30+
README.md
31+
].select { |f| File.exist?(f) }
2932
s.bindir = "exe"
3033
s.executables = s.files.grep(%r{^exe/}) { |f| File.basename(f) }
3134
s.require_paths = ["lib"]

react_on_rails_pro/Gemfile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
source "https://rubygems.org"
44

5-
# Specify your gem"s dependencies in react_on_rails.gemspec
6-
gemspec
5+
# Specify your gem"s dependencies in react_on_rails_pro.gemspec (at repository root)
6+
gemspec name: "react_on_rails_pro", path: ".."
77

88
eval_gemfile File.expand_path("./Gemfile.loader", __dir__)

0 commit comments

Comments
 (0)