Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Updated gemspec to specific Rails gems #175

Merged
merged 3 commits into from
Jan 5, 2022

Conversation

paul
Copy link
Contributor

@paul paul commented Jan 4, 2022

Most apps don't require the full suite of Rails gems, and can avoid installing them to save CI and deploy time. This gem, however, had a dependency on the Rails meta-gem which ended up installing them all anyways.

Instead, we can limit it to only the Rails gems that we directly depend upon.

I'm not sure how to really test this, since the dummy app uses all of Rails. I grep'd through ./lib to see what parts of Rails were being used, but that might not be comprehensive.

Note: I ran ./bin/standardize as instructed by the README, but it touched dozens of files which I didn't commit as part of this PR.

Most apps don't require the full suite of Rails gems, and can avoid
installing them to save CI and deploy time. This gem, however, had a
dependency on the Rails meta-gem which ended up installing them all
anyways.

Instead, we can limit it to only the Rails gems that we directly depend
upon.
@leastbad
Copy link
Contributor

leastbad commented Jan 5, 2022

I added ActionView to the list, because we use it in identifiable.rb, as well as the test suite.

The bigger question which @julianrubisch is better-equipped to answer is whether the test dummy requiring all of Rails means that the Gemspec for CableReady needs to include all of Rails.

@leastbad
Copy link
Contributor

leastbad commented Jan 5, 2022

Actually, I hope I haven't made a mess of this - I just realized that we'll have to run bundle on this so that the Gemfile.lock is regenerated. Can you please pull it, run bundle and push the changes? With my apologies and graditude.

nvm: took care of it!

@julianrubisch
Copy link
Contributor

The bigger question which @julianrubisch is better-equipped to answer is whether the test dummy requiring all of Rails means that the Gemspec for CableReady needs to include all of Rails.

Well the easiest way to tell is to, well, run the tests. But either way I think it could be added as a development dependency...

@leastbad
Copy link
Contributor

leastbad commented Jan 5, 2022

Well the easiest way to tell is to, well, run the tests. But either way I think it could be added as a development dependency...

LGTM:

Finished in 8.717977s, 6.4235 runs/s, 19.2705 assertions/s.
56 runs, 168 assertions, 0 failures, 0 errors, 0 skips

@leastbad leastbad merged commit fe78fbe into stimulusreflex:master Jan 5, 2022
@paul
Copy link
Contributor Author

paul commented Jan 5, 2022

I did add it as a development dependency: https://github.com/stimulusreflex/cable_ready/pull/175/files#diff-2f4da7b98a9c86d38f368f6119614e27dbb9c1e4dc3d70240cb466cc211435acR32

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants