LARailsLearners / box-office

2 stars 1 forks source link

Feature#11 add dot env gem #24

Closed server-monitor closed 8 years ago

server-monitor commented 8 years ago

To test:

  1. Add an example environment variable in .env. For example: S3_BUCKET=YOURS3BUCKET.
  2. In the box-office.rb file, after the Dotenv.load line, add the lines...

    puts( ('YOURS3BUCKET' == ENV.fetch('S3_BUCKET')) ? 'pass' : 'FAIL' )

  3. Run ruby box-office.rb
  4. You should see "pass" before the server displays its status.
  5. Clean up. Undo steps 1 to 4.
kangkyu commented 8 years ago

.env isn't supposed to add into .gitignore?

server-monitor commented 8 years ago

Not too familiar with dotenv but I'm fairly certain you're correct.

kangkyu commented 8 years ago

I'm not sure either, I think in our case we better do that because it's public repo https://github.com/bkeepers/dotenv#should-i-commit-my-env-file

server-monitor commented 8 years ago

Not sure if this is right way to do this:

  1. Add .env to .gitignore on this feature branch
  2. git push

I shouldn't have to create a new PR, right?

kangkyu commented 8 years ago

Maybe you're looking for git rm --cached command, for not tracking the file

kangkyu commented 8 years ago

Let's merge this PR when you have a moment @server-monitor It seems like there's nothing more to discuss on