-
Notifications
You must be signed in to change notification settings - Fork 3
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
More Refactoring #19
More Refactoring #19
Conversation
PROMETHEUS_TERRAFORM_DIR = "spec/environment" | ||
PROMETHEUS_PACKER_DIR = "spec/environment" | ||
TERRAFORM_STUB = true | ||
PROMETHEUS_WORKSPACE = $PWD |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
i split out the .env.test
and .env.sample
so to better suit their named purposes. Sample might be where people would start from in a new project.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We should update the README with this information.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, i should probably write a separate section on starting a new project with prometheus. I'm punting a little bit though, since I might just introduce a generator soon that will take most of the manual steps out though.
1e5cb02
to
aff6e37
Compare
#expect(Rake).to receive(:sh).with(cmd).and_return(true) | ||
#@cmd_test.clean | ||
|
||
#it "cleans up existing state data from the given stack directory within a container" do |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
i realized the container run of this was a bit roundabout, with the clean command now all in ruby, it should work fine with a containerized terraform or not.
|
||
Dotenv.load | ||
Dotenv.load(*%w(.env .env.sample)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Would both .env and .env.sample get loaded if both exist? If so, which gets precedence?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yep. From the docs, it seems like pre-existing defined env vars will not get overwritten (unless forced), so the ones in .env
should have precedence over the .env.sample
Looks like some good stuff, based on just a visual review of the code. Just a few minor comments. |
- Codeclimate and related tooling yml/configs. Setup instructions [here](https://github.com/codeclimate/codeclimate). Details on simplecov [here](https://github.com/colszowka/simplecov). - cleanup dotenv usage - `.env` -> `.env.sample`, `.env.test`. This allow better seperate of test environment specifics from the actual code base, and can let us cook up a more reasonable sample `.env` file for either templating/getting started examples. - cleaned up pry usage: should only be required if the RACK_ENV = 'development' - Freed up the `Terraform` class/module namespace for usage later. - Rake task cleanup - Prometheus specific testing is now not exported as part of `spec_tasks` - Removed the extra `*.rake` redirection to define the exported rake tasks more programatically without excessive nesting. - Gemspec cleanup: only export gem necessary files. - Feature: stdlib Logger is now used for logging to STDOUT. - Terraform reworking: Logic is now split from the basic CLI command wrapping. - Tools moved to `state_stores` for better organizational grouping (and to prepare from namespacing later) - Handling terraform `-var` for both post and pre 0.7.0
here. Details on
simplecov here.
.env
->.env.sample
,.env.test
. This allow better seperate oftest environment specifics from the actual code base, and can let us
cook up a more reasonable sample
.env
file for eithertemplating/getting started examples.
'development'
Terraform
class/module namespace for usage later.spec_tasks
*.rake
redirection to define the exported raketasks more programatically without excessive nesting.
wrapping.
state_stores
for better organizational grouping (andto prepare from namespacing later)
-var
for both post and pre 0.7.0commit 2788d32