Skip to content

Commit

Permalink
Merge pull request #18 from unifio/yl-refactoring
Browse files Browse the repository at this point in the history
Large sweeping refactoring
  • Loading branch information
yuhunglin authored Jun 27, 2016
2 parents 359f277 + d8d26ed commit 9d4718f
Show file tree
Hide file tree
Showing 53 changed files with 1,028 additions and 736 deletions.
2 changes: 2 additions & 0 deletions .rspec
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
--color
--format documentation
Empty file added CHANGELOG.md
Empty file.
74 changes: 61 additions & 13 deletions Gemfile.lock
Original file line number Diff line number Diff line change
@@ -1,24 +1,40 @@
PATH
remote: .
specs:
prometheus-unifio (0.1.3)
prometheus-unifio (0.1.4)
activemodel (~> 4.2.6)
activesupport (~> 4.2.6)
aws-sdk (~> 2.3.8)
deep_merge (~> 1.0.1)
hiera (~> 3.2.0)
json (~> 1.8.3)
rake (>= 11.1.2)
rest-client (~> 1.8.0)
rest-client (~> 2.0.0.rc3)
virtus (~> 1.0.5)

GEM
remote: http://rubygems.org/
specs:
activemodel (4.2.6)
activesupport (= 4.2.6)
builder (~> 3.1)
activesupport (4.2.6)
i18n (~> 0.7)
json (~> 1.7, >= 1.7.7)
minitest (~> 5.1)
thread_safe (~> 0.3, >= 0.3.4)
tzinfo (~> 1.1)
addressable (2.4.0)
aws-sdk (2.3.9)
aws-sdk-resources (= 2.3.9)
aws-sdk-core (2.3.9)
aws-sdk (2.3.13)
aws-sdk-resources (= 2.3.13)
aws-sdk-core (2.3.13)
jmespath (~> 1.0)
aws-sdk-resources (2.3.9)
aws-sdk-core (= 2.3.9)
aws-sdk-resources (2.3.13)
aws-sdk-core (= 2.3.13)
axiom-types (0.1.1)
descendants_tracker (~> 0.0.4)
ice_nine (~> 0.11.0)
thread_safe (~> 0.3, >= 0.3.1)
builder (3.2.2)
byebug (9.0.4)
ci_reporter (2.0.0)
Expand All @@ -27,42 +43,63 @@ GEM
ci_reporter (~> 2.0)
rspec (>= 2.14, < 4)
coderay (1.1.1)
coercible (1.0.0)
descendants_tracker (~> 0.0.1)
crack (0.4.3)
safe_yaml (~> 1.0.0)
deep_merge (1.0.1)
descendants_tracker (0.0.4)
thread_safe (~> 0.3, >= 0.3.1)
diff-lcs (1.2.5)
domain_name (0.5.20160310)
unf (>= 0.0.5, < 1.0.0)
dotenv (2.1.1)
equalizer (0.0.11)
fabrication (2.15.2)
faraday (0.9.2)
multipart-post (>= 1.2, < 3)
gemfury (0.6.0)
faraday (>= 0.9.0, < 0.10.0.pre)
highline (~> 1.6.0)
multi_json (~> 1.10)
netrc (~> 0.10.0)
thor (>= 0.14.0, < 1.0.0.pre)
hashdiff (0.3.0)
hiera (3.2.0)
json_pure
highline (1.6.21)
http-cookie (1.0.2)
domain_name (~> 0.5)
i18n (0.7.0)
ice_nine (0.11.2)
jmespath (1.2.4)
json_pure (>= 1.8.1)
json (1.8.3)
json_pure (1.8.3)
method_source (0.8.2)
mime-types (2.99.2)
mime-types (3.1)
mime-types-data (~> 3.2015)
mime-types-data (3.2016.0521)
minitest (5.9.0)
multi_json (1.12.1)
multipart-post (2.0.0)
net-scp (1.2.1)
net-ssh (>= 2.6.5)
net-ssh (3.1.1)
net-telnet (0.1.1)
netrc (0.11.0)
netrc (0.10.3)
pry (0.10.3)
coderay (~> 1.1.0)
method_source (~> 0.8.1)
slop (~> 3.4)
pry-byebug (3.4.0)
byebug (~> 9.0)
pry (~> 0.10)
rake (11.1.2)
rest-client (1.8.0)
rake (11.2.2)
rest-client (2.0.0.rc3)
http-cookie (>= 1.0.2, < 2.0)
mime-types (>= 1.16, < 3.0)
netrc (~> 0.7)
mime-types (>= 1.16, < 4.0)
netrc (~> 0.8)
rspec (3.4.0)
rspec-core (~> 3.4.0)
rspec-expectations (~> 3.4.0)
Expand Down Expand Up @@ -92,9 +129,18 @@ GEM
net-ssh (>= 2.7, < 4.0)
net-telnet
sfl
thor (0.19.1)
thread_safe (0.3.5)
tzinfo (1.2.2)
thread_safe (~> 0.1)
unf (0.1.4)
unf_ext
unf_ext (0.0.7.2)
virtus (1.0.5)
axiom-types (~> 0.1)
coercible (~> 1.0)
descendants_tracker (~> 0.0, >= 0.0.3)
equalizer (~> 0.0, >= 0.0.9)
webmock (2.0.3)
addressable (>= 2.3.6)
crack (>= 0.3.2)
Expand All @@ -107,6 +153,8 @@ DEPENDENCIES
bundler (>= 1.9.0)
ci_reporter_rspec (~> 1.0.0)
dotenv (~> 2.1.0)
fabrication (~> 2.15.2)
gemfury (~> 0.6.0)
prometheus-unifio!
pry-byebug (~> 3.4.0)
rspec (~> 3.4.0)
Expand Down
21 changes: 20 additions & 1 deletion TODO.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,23 @@ all, ci, and rspec will likely all conflict. Might be able to ignore the rspec r

- `ruby/lib` might need to get shuffled to `?/lib/prometheus-unifio`
- ~~Top level namespacing: Prometheus -> PrometheusUnifio~~
- Allows for rubygems publishing (easier to deal with distribution, versioning)
- entities/terraform namespace
- individual state-stores: would be nice if it had something to describe the backing input types
- ~~check taskname, namespaces don't have spaces~~
- ~~stack public method surface area is a bit high~~
- stack caching opportunities if they're called multiple times in the rake tasks
- consider httparty vs rest-client
- ~~decoupling~~
- ~~hieradb::client -> is really a data_store/data_backend~~
- ~~missing a decoupling repository layer that can absorb the env_reader elements~~
- ~~push the hiera specifics out of stack and into the repository layer~~
- local code climate might be good while i'm shuffling stuff about
- ~~Repositories are likely to see some churn. Keeping them simple and stateless for now until it bcomes too much of a chore to pass the items around~~
- Use the invalid yaml syntax to figure out more things in rake tasks that needs to be lazy loaded
- Like the idea of maybe splitting out the syntax elements to a different gem. Gem installation & management would become easier
- missing spec around reports?
- Need to gem-friendly the namespace all under one umbrella
- leverage a separate .env.spec to point fixtures to spec/fixtures/*, should be able to sweep up spec/environment, prometheus_spec.yaml, root promethus.yaml, data
- free up terraform module namespace
- Remove liberal use of pry
- Look into muting the reporter as dev default: https://github.com/ci-reporter/ci_reporter
14 changes: 6 additions & 8 deletions bin/console
Original file line number Diff line number Diff line change
@@ -1,13 +1,11 @@
#!/usr/bin/env ruby

require "bundler/setup"
require "pry"
require "dotenv"
require 'active_support/core_ext/string/inflections'

# You can add fixtures and/or initialization code here to make experimenting
# with your gem easier. You can also use a different console, if you like.
Dotenv.load
require_relative '../ruby/lib/prometheus-unifio/core/bootstrap'

# (If you use this, don't forget to add pry to your Gemfile!)
#require "pry"
#Pry.start

require "irb"
IRB.start
Pry.start
8 changes: 6 additions & 2 deletions prometheus.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -32,10 +32,12 @@ Gem::Specification.new do |spec|
spec.add_dependency "deep_merge", "~> 1.0.1"
spec.add_dependency "hiera", "~> 3.2.0"
spec.add_dependency "json", "~> 1.8.3"
spec.add_dependency "rest-client", "~> 1.8.0"
spec.add_dependency "rest-client", "~> 2.0.0.rc3"
spec.add_dependency "rake", ">= 11.1.2"
spec.add_dependency "aws-sdk", "~> 2.3.8"

spec.add_dependency "virtus", "~> 1.0.5"
spec.add_dependency "activesupport", "~> 4.2.6"
spec.add_dependency "activemodel", "~> 4.2.6"

PrometheusUnifio::Helpers::SpecDependencies.dependencies.each do |name, requirement|
spec.add_development_dependency name, requirement
Expand All @@ -45,4 +47,6 @@ Gem::Specification.new do |spec|
spec.add_development_dependency "pry-byebug", "~> 3.4.0"
spec.add_development_dependency "serverspec", "~> 2.36.0"
spec.add_development_dependency "webmock", "~> 2.0.3"
spec.add_development_dependency "gemfury", "~> 0.6.0"
spec.add_development_dependency "fabrication", "~> 2.15.2"
end
Loading

0 comments on commit 9d4718f

Please sign in to comment.