cfndk 0.1.0 → 0.1.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (41) hide show
  1. checksums.yaml +4 -4
  2. data/.circleci/config.yml +23 -14
  3. data/.gitignore +0 -1
  4. data/.rspec_parallel +6 -0
  5. data/Gemfile +1 -0
  6. data/Gemfile.lock +811 -0
  7. data/README.md +122 -10
  8. data/cfndk.gemspec +1 -0
  9. data/lib/cfndk/change_set_command.rb +97 -0
  10. data/lib/cfndk/command.rb +15 -181
  11. data/lib/cfndk/config_file_loadable.rb +13 -0
  12. data/lib/cfndk/global_config.rb +15 -0
  13. data/lib/cfndk/key_pair.rb +7 -4
  14. data/lib/cfndk/key_pair_command.rb +53 -0
  15. data/lib/cfndk/key_pairs.rb +2 -1
  16. data/lib/cfndk/logger.rb +1 -1
  17. data/lib/cfndk/stack.rb +382 -103
  18. data/lib/cfndk/stack_command.rb +110 -0
  19. data/lib/cfndk/stacks.rb +40 -14
  20. data/lib/cfndk/subcommand_help_returnable.rb +16 -0
  21. data/lib/cfndk/version.rb +1 -1
  22. data/lib/cfndk.rb +6 -0
  23. data/skel/cfndk.yml +4 -0
  24. data/spec/cfndk_change_set_create_spec.rb +436 -0
  25. data/spec/cfndk_change_set_destroy_spec.rb +160 -0
  26. data/spec/cfndk_change_set_execute_spec.rb +179 -0
  27. data/spec/cfndk_change_set_report_spec.rb +107 -0
  28. data/spec/cfndk_change_set_spec.rb +37 -0
  29. data/spec/cfndk_create_spec.rb +56 -141
  30. data/spec/cfndk_destroy_spec.rb +4 -2
  31. data/spec/cfndk_keypiar_spec.rb +11 -9
  32. data/spec/cfndk_report_spec.rb +3 -1
  33. data/spec/cfndk_spec.rb +5 -3
  34. data/spec/cfndk_stack_create_spec.rb +454 -0
  35. data/spec/cfndk_stack_destroy_spec.rb +161 -0
  36. data/spec/cfndk_stack_report_spec.rb +181 -0
  37. data/spec/cfndk_stack_spec.rb +6 -1146
  38. data/spec/cfndk_stack_update_spec.rb +467 -0
  39. data/spec/spec_helper.rb +4 -1
  40. data/spec/support/aruba.rb +1 -0
  41. metadata +42 -2
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 566120c36a4fa9b6267bdf60fa537cc542246b34
4
- data.tar.gz: 1ba3f83d708122867135ba13bcd5fa5dab3be1a3
3
+ metadata.gz: eb38edcc2c124cfd41cb85e7c16ed1f523bb0157
4
+ data.tar.gz: 886a24d5b93d1c9f6571a1987161c754968d197e
5
5
  SHA512:
6
- metadata.gz: 3971374374b13a9834974dc6f68221d7b42bfa9cd77d8efcfca557ad02c1c29c1644b2235fe47176c10b5ba6b351e77d9883036a2b7f45b242af657d17a31808
7
- data.tar.gz: de54298f5cc8ca0b591709ab100c3749a036d6dab5ec80382aeaad1c66166f0fbacdaf6d2ae71fc162341035bd82e4751c1d79ee3ec85ca533a023fbda34074d
6
+ metadata.gz: 0686bf0c281ce5ff8a714bef5a36d21a8024f0fcf0add433df161a67264a8db327ce858b53142ad2b2e51a8a2a81fc1e64292a1bd61151a476799f9b07023e0a
7
+ data.tar.gz: 27125c0c6ee8e9571a5643fb74b2d4975dc09c1f7bf94faa03f2ce87c62b8c2af8e9c2c96e0959c0ff81ff6bc06fb02734fbd2176e3d73e2dd99403e71bb39ac
data/.circleci/config.yml CHANGED
@@ -6,13 +6,9 @@ version: 2
6
6
  jobs:
7
7
  test:
8
8
  docker:
9
- # specify the version you desire here
10
9
  - image: circleci/ruby:2.4.1-node-browsers
11
-
12
- # Specify service dependencies here if necessary
13
- # CircleCI maintains a library of pre-built images
14
- # documented at https://circleci.com/docs/2.0/circleci-images/
15
- # - image: circleci/postgres:9.4
10
+ environment:
11
+ PARALLEL_TESTS_CONCURRENCY: 2
16
12
  parallelism: 1
17
13
  working_directory: ~/repo
18
14
 
@@ -22,10 +18,9 @@ jobs:
22
18
  # Download and cache dependencies
23
19
  - restore_cache:
24
20
  keys:
25
- - v1-dependencies-{{ checksum "Gemfile.lock" }}
21
+ - v1-dependencies-{{ checksum "~/repo/Gemfile.lock" }}
26
22
  # fallback to using the latest cache if no exact match is found
27
23
  - v1-dependencies-
28
-
29
24
  - run:
30
25
  name: install dependencies
31
26
  command: |
@@ -33,20 +28,34 @@ jobs:
33
28
 
34
29
  - save_cache:
35
30
  paths:
36
- - ./vendor/bundle
37
- key: v1-dependencies-{{ checksum "Gemfile.lock" }}
31
+ - ~/repo/vendor/bundle
32
+ key: v1-dependencies-{{ checksum "~/repo/Gemfile.lock" }}
33
+
34
+ - restore_cache:
35
+ keys:
36
+ - v2-runtime-log
38
37
 
39
38
  # run tests!
40
39
  - run:
41
40
  name: run tests
42
41
  command: |
43
42
  export AWS_REGION=ap-northeast-1
44
- CFNDK_COVERAGE=1 bundle exec rspec \
45
- --format p \
46
- --format html \
47
- --out /tmp/test-results/rspec.html
43
+ CFNDK_COVERAGE=1 bundle exec parallel_rspec \
44
+ -n ${PARALLEL_TESTS_CONCURRENCY} \
45
+ --runtime-log /home/circleci/repo/tmp/parallel_runtime_rspec.log \
46
+ spec
47
+
48
+ - save_cache:
49
+ paths:
50
+ - /home/circleci/repo/tmp/parallel_runtime_rspec.log
51
+ key: v2-runtime-log
48
52
 
49
53
  # collect reports
54
+ - store_test_results:
55
+ path: /home/circleci/repo/tmp/parallel_runtime_rspec.log
56
+ - store_artifacts:
57
+ path: /home/circleci/repo/tmp/parallel_runtime_rspec.log
58
+ destination: test-results/parallel_runtime_rspec.log
50
59
  - store_test_results:
51
60
  path: /tmp/test-results
52
61
  - store_artifacts:
data/.gitignore CHANGED
@@ -1,6 +1,5 @@
1
1
  /.bundle/
2
2
  /.yardoc
3
- /Gemfile.lock
4
3
  /_yardoc/
5
4
  /coverage/
6
5
  /doc/
data/.rspec_parallel ADDED
@@ -0,0 +1,6 @@
1
+ --format p
2
+ --format html --out /tmp/test-results/rspec<%= ENV['TEST_ENV_NUMBER'] %>.html
3
+ --format ParallelTests::RSpec::RuntimeLogger --out tmp/parallel_runtime_rspec.log
4
+ --profile 10
5
+
6
+
data/Gemfile CHANGED
@@ -10,4 +10,5 @@ group :development, :test do
10
10
  gem 'rspec'
11
11
  gem 'aruba'
12
12
  gem 'awspec'
13
+ gem 'parallel_tests'
13
14
  end