Skip to content

Make sure that we properly calculate the root for the sample file#22

Merged
etagwerker merged 1 commit intomainfrom
fixes/sample_file_calculation
Aug 31, 2021
Merged

Make sure that we properly calculate the root for the sample file#22
etagwerker merged 1 commit intomainfrom
fixes/sample_file_calculation

Conversation

@etagwerker
Copy link
Copy Markdown
Member

Hi there,

This fixes #21.

It uses Dotenv's root path calculation mechanism to figure out where we can find the .env.sample file.

Please check it out. Thanks!

I will abide by the code of conduct.

@etagwerker etagwerker requested a review from arielj August 21, 2021 02:26
Copy link
Copy Markdown
Contributor

@arielj arielj left a comment

Choose a reason for hiding this comment

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

Tested and can confirm it shows the correct path for the .env.sample file 👍

I just added a really small formatting comment.

Comment thread lib/dotenv_validator.rb Outdated
#
# Taken from Dotenv source code.
def self.root
root_or_pwd =Pathname.new(ENV["RAILS_ROOT"] || Dir.pwd)
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Just beeing nitpicky here, there's a missing space between = and Pathname

@etagwerker etagwerker force-pushed the fixes/sample_file_calculation branch from ea2db50 to 1f5ab48 Compare August 31, 2021 18:46
@etagwerker
Copy link
Copy Markdown
Member Author

@arielj thanks for your review! I just addressed it so I'll merge this now. 😃

@etagwerker etagwerker merged commit a976408 into main Aug 31, 2021
@etagwerker etagwerker deleted the fixes/sample_file_calculation branch August 31, 2021 18:54
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.

[BUG] DotenvValidator cannot find sample file from within a normal Rails app

2 participants