Skip to content

Commit

Permalink
More refactoring
Browse files Browse the repository at this point in the history
- 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
  • Loading branch information
yuhunglin committed Aug 22, 2016
1 parent abac321 commit 242916b
Show file tree
Hide file tree
Showing 78 changed files with 2,636 additions and 898 deletions.
28 changes: 28 additions & 0 deletions .codeclimate.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
---
engines:
bundler-audit:
enabled: true
csslint:
enabled: false
duplication:
enabled: true
config:
languages:
ruby:
mass_threshold: 30
eslint:
enabled: false
fixme:
enabled: true
reek:
enabled: true
rubocop:
enabled: true
ratings:
paths:
- Gemfile.lock
- "**.inc"
- "**.module"
- "**.rb"
exclude_paths:
- spec/
7 changes: 2 additions & 5 deletions .env.sample
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
PROMETHEUS_CONFIG = "spec/prometheus_spec.yaml"
PROMETHEUS_TERRAFORM_DIR = "spec/environment"
PROMETHEUS_PACKER_DIR = "spec/environment"
TERRAFORM_STUB = true
PROMETHEUS_WORKSPACE = $PWD
AWS_REGION = "us-west-2"
ATLAS_TOKEN = "<insert token here>"
ATLAS_TOKEN = "<insert_token_here>"
6 changes: 6 additions & 0 deletions .env.test
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
PROMETHEUS_CONFIG = "spec/fixtures/prometheus_spec.yaml"
PROMETHEUS_TERRAFORM_DIR = "spec/fixtures/terraform"
PROMETHEUS_PACKER_DIR = "spec/fixtures/packer"
AWS_REGION = "us-west-2"
ATLAS_TOKEN = "<insert_token_here>"
RAKE_ENV = "test"
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,5 @@ spec/reports/*
**/terraform.tfstate*
data/dev/*
.env
coverage/*
.DS_Store
14 changes: 14 additions & 0 deletions .reek
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
---
TooManyStatements:
enabled: true
exclude:
- initialize
max_statements: 7
IrresponsibleModule:
enabled: false
DuplicateMethodCall:
max_calls: 3
NestedIterators:
max_allowed_nesting: 2
UtilityFunction:
public_methods_only: true
Loading

0 comments on commit 242916b

Please sign in to comment.