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

Make Rails arguments optional #32

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

Rukomoynikov
Copy link

@Rukomoynikov Rukomoynikov commented Oct 6, 2024

Motivation:

Calling rails-new without any arguments fails with error: (error: the following required arguments were not provided: ..). Making rails arguments optional allows to simply run rails-new and see what params are required for scaffolding new rails application (for example app name).

Original and updated behaviour

Without any parameters

Original

rails-new

error: the following required arguments were not provided:
  <ARGS>...

Usage: rails-new <ARGS>...

For more information, try '--help'.

Updated

rails-new

Starts the docker container and shows the normal ruby on rails generator text:

Usage:                                                                                                                                         
  rails new APP_PATH [options]                                                                                                                 

Options:
  [--skip-namespace]. # Skip namespace (affects only isolated engines)
...

@Rukomoynikov
Copy link
Author

Fundamentally it makes <app_name> part of rails commands area. So, rails-new will not have any logic apart from instructions on what ruby\rails version use for building docker image.

Before:

> rails-new

error: the following required arguments were not provided:
  <ARGS>...

Usage: rails-new <ARGS>...

For more information, try '--help'.

After:

> rails-new

Usage:
  rails new APP_PATH [options]

Options:
[--skip-namespace]                                            # Skip namespace (affects only isolated engines)
[--skip-collision-check]                                      # Skip collision check
...

@Rukomoynikov
Copy link
Author

If this direction is fundamentally correct I will fix the test.

@rafaelfranca
Copy link
Member

Yeah. Makes sense to me

@Rukomoynikov
Copy link
Author

Yeah. Makes sense to me

Thank you, I will update the PR.

@Rukomoynikov Rukomoynikov force-pushed the make_rails_args_nonrequired branch from b0bbc32 to 8f9732f Compare January 21, 2025 13:44
Calling rails-new without any arguments fails with error: (error: the following required arguments were not provided: <ARGS>..). Making rails arguments optional allows to simply run rails-new and see what params are required for scaffolding new rails application (for example app name).
@Rukomoynikov Rukomoynikov force-pushed the make_rails_args_nonrequired branch from 8f9732f to a1e4607 Compare February 14, 2025 11:25
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