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

Prompt should not infer project_name from the path #107

Merged
merged 1 commit into from
Dec 1, 2018

Conversation

gabetax
Copy link
Contributor

@gabetax gabetax commented Nov 29, 2018

The existing project_name implementation infers itself the directory the application exists in. However, this expectation fails several situations, such as

  • Docker conventionally puts applications in /app
  • Capistrano conventionally puts applications in /:prefix/project_name/releases/20181126-020459-399a6ff/

Instead, this infers the project name from the Rails.application class name, which is set by rails new. A similar approach is used in the marco-polo irb prompt gem:

https://github.com/arches/marco-polo/blob/0f53f5645bceac45757f061fc9b53ab2396afda7/lib/marco-polo.rb#L17

The existing `project_name` implementation infers itself the directory the application exists in. However, this expectation fails several situations, such as

- Docker conventionally puts applications in /app
- Capistrano conventionally puts applications in /:prefix/project_name/releases/20181126-020459-399a6ff/

Instead, this infers the project name from the `Rails.application` class name, which is set by `rails new`. A similar approach is used in the marco-polo irb prompt gem:

https://github.com/arches/marco-polo/blob/0f53f5645bceac45757f061fc9b53ab2396afda7/lib/marco-polo.rb#L17
@rf- rf- merged commit e2f547e into pry:master Dec 1, 2018
@rf-
Copy link
Member

rf- commented Dec 1, 2018

LGTM, thanks!

@gabetax gabetax deleted the patch-1 branch December 3, 2018 04:56
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.

None yet

2 participants