kubes 0.6.5 → 0.7.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 (47) hide show
  1. checksums.yaml +4 -4
  2. data/.github/ISSUE_TEMPLATE.md +7 -0
  3. data/.github/ISSUE_TEMPLATE/bug_report.md +84 -0
  4. data/.github/ISSUE_TEMPLATE/documentation.md +12 -0
  5. data/.github/ISSUE_TEMPLATE/feature_request.md +64 -0
  6. data/.github/ISSUE_TEMPLATE/question.md +14 -0
  7. data/.github/PULL_REQUEST_TEMPLATE.md +50 -0
  8. data/CHANGELOG.md +16 -0
  9. data/docs/_docs/dsl/multiple-resources.md +19 -21
  10. data/docs/_docs/helpers/google.md +1 -1
  11. data/docs/_docs/helpers/google/gke.md +7 -3
  12. data/docs/_docs/helpers/google/secrets.md +1 -1
  13. data/docs/_docs/intro/concepts.md +8 -9
  14. data/docs/_docs/intro/ordering.md +9 -10
  15. data/docs/_docs/resources/role.md +8 -9
  16. data/docs/_docs/yaml.md +4 -5
  17. data/docs/_docs/yaml/multiple-files.md +22 -0
  18. data/docs/_docs/yaml/multiple-resources.md +89 -0
  19. data/docs/_includes/commands.html +8 -9
  20. data/docs/_includes/config/hooks/options.md +1 -0
  21. data/docs/_includes/layering/layers.md +7 -4
  22. data/docs/_includes/sidebar.html +6 -1
  23. data/docs/_includes/vs/kubes/structure.md +12 -13
  24. data/kubes.gemspec +2 -2
  25. data/lib/kubes/command.rb +1 -1
  26. data/lib/kubes/compiler/dsl/core/base.rb +3 -7
  27. data/lib/kubes/compiler/dsl/core/blocks.rb +5 -1
  28. data/lib/kubes/compiler/dsl/syntax/endpoint.rb +34 -0
  29. data/lib/kubes/compiler/dsl/syntax/resource.rb +0 -1
  30. data/lib/kubes/compiler/layering.rb +3 -7
  31. data/lib/kubes/compiler/shared/runtime_helpers.rb +78 -0
  32. data/lib/kubes/compiler/strategy.rb +1 -15
  33. data/lib/kubes/compiler/strategy/base.rb +0 -56
  34. data/lib/kubes/compiler/strategy/dispatcher.rb +60 -0
  35. data/lib/kubes/compiler/strategy/erb.rb +8 -14
  36. data/lib/kubes/compiler/strategy/result.rb +6 -2
  37. data/lib/kubes/compiler/util/normalize.rb +2 -2
  38. data/lib/kubes/compiler/util/yaml_dump.rb +7 -4
  39. data/lib/kubes/version.rb +1 -1
  40. data/lib/templates/new/resource/dsl/endpoint.rb +3 -0
  41. data/lib/templates/new/resource/yaml/endpoint.yaml +9 -0
  42. data/spec/kubes/compiler/strategy/{dsl_spec.rb → dispatcher_spec.rb} +10 -9
  43. metadata +21 -12
  44. data/lib/kubes/compiler/shared/custom_helpers.rb +0 -17
  45. data/lib/kubes/compiler/shared/custom_variables.rb +0 -38
  46. data/lib/kubes/compiler/shared/plugin_helpers.rb +0 -14
  47. data/lib/kubes/compiler/strategy/dsl.rb +0 -4
@@ -1,38 +0,0 @@
1
- module Kubes::Compiler::Shared
2
- module CustomVariables
3
- include DslEvaluator
4
-
5
- # Load custom variables from project
6
- @@custom_variables_loaded = false
7
- def load_custom_variables
8
- return if Kubes.kustomize?
9
-
10
- ext = File.extname(@path)
11
- role = @path.sub(%r{.*\.kubes/resources/},'').sub(ext,'').split('/').first # IE: web
12
- kind = File.basename(@path).sub(ext,'') # IE: deployment
13
- all = "all"
14
- if @block_form
15
- kind = kind.pluralize
16
- all = all.pluralize
17
- end
18
-
19
- layers = [
20
- "base.rb",
21
- "#{Kubes.env}.rb",
22
- "base/all.rb",
23
- "base/all/#{Kubes.env}.rb",
24
- "base/#{kind}.rb",
25
- "base/#{kind}/base.rb",
26
- "base/#{kind}/#{Kubes.env}.rb",
27
- "#{role}/#{kind}.rb",
28
- "#{role}/#{kind}/base.rb",
29
- "#{role}/#{kind}/#{Kubes.env}.rb",
30
- ]
31
-
32
- layers.each do |layer|
33
- path = "#{Kubes.root}/.kubes/variables/#{layer}"
34
- evaluate_file(path)
35
- end
36
- end
37
- end
38
- end
@@ -1,14 +0,0 @@
1
- module Kubes::Compiler::Shared
2
- module PluginHelpers
3
- # Load plugin helper methods from project
4
- @@plugin_helpers_loaded = false
5
- def load_plugin_helpers
6
- return if @@plugin_helpers_loaded
7
- Kubes::Plugin.plugins.each do |klass|
8
- helpers_class = "#{klass}::Helpers".constantize # IE: KubesAws::Helpers
9
- self.class.send :include, helpers_class
10
- end
11
- @@plugin_helpers_loaded = true
12
- end
13
- end
14
- end
@@ -1,4 +0,0 @@
1
- class Kubes::Compiler::Strategy
2
- class Dsl < Base
3
- end
4
- end