excid3/jumpstart

Apply template to existing Projects

gathuku opened this issue · 4 comments

Provide an API for applying this template to existing projects. This will use rails app:template command

Cd to an existing project and Run.

rails app:template LOCATION=https://raw.githubusercontent.com/excid3/jumpstart/master/template.rb

This will be great.

I think we'll want to test this against Rails 6.0, 6.1, and 7.0. We will probably need to skip Javascript so that it can be configured using Jumpstart's template consistently using the bundling gems (which is why the 6.0+ requirement).

Pretty sure the new setup instructions would simply be:

rails new myapp --skip-javascript --database=postgresql
# Configure database.yml
rails app:template LOCATION=https://raw.githubusercontent.com/excid3/jumpstart/master/template.rb

I will be diving into it more tomorrow and give you some feedback.

Sounds good!

Is there a better way to know if you are applying template to a new or existing project?. I have used app_path.is_a(Pathname)
When using rails new
app_path will be a String

When using app:template
app_path with be a Pathname