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

Use Thor's apply instead of a prerequisite task #150

Merged
merged 1 commit into from
Jan 21, 2024

Conversation

jonathanhefner
Copy link
Member

The css:install:shared task serves only as a prerequisite for the other installer tasks; it should not be run on its own (nor listed with rake --tasks). By replacing this task with corresponding calls to Thor's apply method, we avoid the overhead of running bin/rails app:template (and bundle install) multiple times.


As a point of comparison, running the tests from #149 without this PR:

$ time bundle exec appraisal rake test

real  1m3.454s
user  11m54.481s
sys   2m39.424s

And running them with this PR:

$ time bundle exec appraisal rake test

real  0m43.129s
user  7m49.613s
sys   1m48.380s

The `css:install:shared` task serves only as a prerequisite for the
other installer tasks; it should not be run on its own (nor listed with
`rake --tasks`).  By replacing this task with corresponding calls to
Thor's `apply` method, we avoid the overhead of running
`bin/rails app:template` (and `bundle install`) multiple times.
@dhh dhh merged commit 7638f92 into rails:main Jan 21, 2024
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.

2 participants