Skip to content

Comments

Updated gemspec to specific Rails gems#175

Merged
leastbad merged 3 commits intostimulusreflex:masterfrom
paul:restrict-dependencies
Jan 5, 2022
Merged

Updated gemspec to specific Rails gems#175
leastbad merged 3 commits intostimulusreflex:masterfrom
paul:restrict-dependencies

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.
@paul paul force-pushed the restrict-dependencies branch from d1ea0e6 to ab0457e Compare January 4, 2022 19:35
@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

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.

3 participants