Skip to content

Conversation

@purinkle
Copy link
Contributor

No description provided.

stevepolitodesign and others added 3 commits December 11, 2025 07:26
Similar to the last rewrite, we generate a new gem and do a directory
swap, while making sure to preserve important files like NEWS.md.

This branch will serve as a new base for us to merge into while we build
up an [application template][template].

This approach is largely inspired by [staples][].

[template]: https://guides.rubyonrails.org/generators.html#application-templates
[staples]: https://github.com/stevepolitodesign/staples
Introduces [Procfile][1] to automatically start the server and run
migrations during the [release phase][2].

Additionally, we update our [database connection preference][3] to
account for [nuance in connecting with Heroku][4].

[1]:
https://devcenter.heroku.com/articles/getting-started-with-rails8#create-a-procfile
[2]: https://devcenter.heroku.com/articles/release-phase
[3]:
https://guides.rubyonrails.org/configuring.html#connection-preference
[4]:
https://discuss.rubyonrails.org/t/brainstorming-approaches-to-reconcile-rails-8s-default-multi-db-setup-with-database-url/86769
Comment on lines 28 to 40
private

def options
{}
end

def relative_to_original_destination_root(path, remove_dot = true)
path
end

def say_status(...)
# Silence output
end
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We have to add all these methods to get uncomment_lines to work. The other option is to do a gsub instead of using Thor. Both have pros and cons.

Copy link
Contributor

@stevepolitodesign stevepolitodesign Dec 11, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is the idea that this class would be invoked from the application template?

Maybe something like?

If so, I worry it adds a lot of overheard, when we could just call the following directly in the application template like you're doing in #1261

  uncomment_lines(
    "config/environments/test.rb",
    /config\.i18n\.raise_on_missing_translations\s*=\s*true/
  )
  comment_lines(
    "config/environments/test.rb",
    /config\.action_dispatch\.show_exceptions\s=\s:rescuable/
  )

But, it's possible I'm misunderstanding.

Base automatically changed from sp-cli to main December 19, 2025 17:17
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