k_director 0.12.0 → 0.12.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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 61ab15797b459bd3b8a2938801a016638c268ef5339cd5df1a5a4a7985c255cd
4
- data.tar.gz: d8670419a2617533e13c8ad2eef7e1f74b412ee780c119550f670d850b6f9897
3
+ metadata.gz: 299e8ce98da8e9466c4394c2bd5b004a62cc69f3f9f99df5e0d94166de79604c
4
+ data.tar.gz: d2919e383af54afd515024ec6c6cc0e11906455680bb1fe62661b2649a32f3e6
5
5
  SHA512:
6
- metadata.gz: 67eabf548f77d0d21d444b8186304054fe097195ce78a7f5d8e0ccc072dd04b16a05d59a43956d287c2045e3fe2aeb8a9ba778442c2620dd1ff9668b503968a0
7
- data.tar.gz: c29f1c1d1440a5de7d3081cefd7463efcd4d6d8d95020d72a3efab8f71c25c5ee7ba0fceb0b9e76d2a5eb372a0459080299d9952a82cb19ea3ed3cca2ad26202
6
+ metadata.gz: afca62f2f2ceeb8bb99aab3d720f23963d4b559144e0388aebdc22bf58deb746da7e86dec8fac60ed90cb76815c146ca8acb9ce868cd2aa1c408b42c6ac2b275
7
+ data.tar.gz: 2fb3e677abf07ad9f7ec9cad4c94beaac720e1d1f8cce8cc0d9e12c988f17fde5e8be91ae6187018de18a4cc3cea032fb8ac277e927613dc0e7d57623b9354d9
data/docs/CHANGELOG.md CHANGED
@@ -1,3 +1,10 @@
1
+ # [0.12.0](https://github.com/klueless-io/k_director/compare/v0.11.3...v0.12.0) (2022-02-11)
2
+
3
+
4
+ ### Features
5
+
6
+ * split dom_builder out from actions_builder ([f728e0e](https://github.com/klueless-io/k_director/commit/f728e0e04ef668928ed78ed6e008c3996a2023e8))
7
+
1
8
  ## [0.11.3](https://github.com/klueless-io/k_director/compare/v0.11.2...v0.11.3) (2022-02-08)
2
9
 
3
10
 
@@ -10,13 +10,23 @@ module KDirector
10
10
  class << self
11
11
  def init(k_builder, builder = nil, **opts)
12
12
  if builder.nil?
13
- builder = KDirector::Builders::ActionsBuilder.new
13
+ builder = builder_type.new
14
14
  else
15
15
  builder.reset
16
16
  end
17
17
 
18
18
  new(k_builder, builder, **opts)
19
19
  end
20
+
21
+ def builder_type
22
+ return @builder_type if defined? @builder_type
23
+
24
+ @builder_type = KDirector::Builders::ActionsBuilder
25
+ end
26
+
27
+ def default_builder_type(type)
28
+ @builder_type = type
29
+ end
20
30
  end
21
31
 
22
32
  attr_reader :builder
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module KDirector
4
- VERSION = '0.12.0'
4
+ VERSION = '0.12.1'
5
5
  end
data/package-lock.json CHANGED
@@ -1,12 +1,12 @@
1
1
  {
2
2
  "name": "k_director",
3
- "version": "0.12.0",
3
+ "version": "0.12.1",
4
4
  "lockfileVersion": 2,
5
5
  "requires": true,
6
6
  "packages": {
7
7
  "": {
8
8
  "name": "k_director",
9
- "version": "0.12.0",
9
+ "version": "0.12.1",
10
10
  "devDependencies": {
11
11
  "@klueless-js/semantic-release-rubygem": "github:klueless-js/semantic-release-rubygem",
12
12
  "@semantic-release/changelog": "^6.0.1",
data/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "k_director",
3
- "version": "0.12.0",
3
+ "version": "0.12.1",
4
4
  "description": "Command line and CI/CD tools for k_director",
5
5
  "scripts": {
6
6
  "release": "semantic-release"
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: k_director
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.12.0
4
+ version: 0.12.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - David Cruwys
@@ -90,7 +90,6 @@ extra_rdoc_files: []
90
90
  files:
91
91
  - ".builders/_.rb"
92
92
  - ".builders/boot.rb"
93
- - ".builders/dsl/ruby_gem_dsl.rb"
94
93
  - ".builders/generators/01-bootstrap.rb"
95
94
  - ".builders/run.rb"
96
95
  - ".githooks/commit-msg"
@@ -1,77 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- module Dsl
4
- class RubyGemDsl < Dsl::Directors::BaseDirector
5
- def default_director_name
6
- 'Ruby Gem'
7
- end
8
-
9
- def repo_name
10
- options.repo_name
11
- end
12
-
13
- def repo_account
14
- options.repo_account
15
- end
16
-
17
- # def default_template_base_folder
18
- # end
19
- # def initialize(k_builder, builder, **opts)
20
- # super(k_builder, builder, **opts)
21
- # # @on_action = opts[:on_action] || :queue # %i[queue execute]
22
- # end
23
- def github(**opts, &block)
24
- github = Dsl::Github.new(self, **opts)
25
- github.instance_eval(&block)
26
-
27
- self
28
- end
29
-
30
- def blueprint(**opts, &block)
31
- blueprint = Dsl::RubyGemBlueprint.new(self, **opts)
32
- blueprint.instance_eval(&block)
33
-
34
- self
35
- end
36
- end
37
-
38
- class RubyGemBlueprint < Dsl::Directors::ChildDirector
39
- def template_content(template_filename)
40
- template_parts = [template_base_folder, template_filename]
41
- template_file = File.join(*template_parts)
42
-
43
- file = k_builder.find_template_file(template_file)
44
- File.read(file)
45
- end
46
-
47
- def run_template_script(template_filename, **opts)
48
- template_parts = [template_base_folder, template_filename]
49
- template_file = File.join(*template_parts)
50
-
51
- script = k_builder.process_any_content(template_file: template_file, **opts)
52
-
53
- run_script(script)
54
- # action = k_builder.run_script_action(script)
55
- # run_action(action)
56
- end
57
-
58
- # Create a single file
59
- #
60
- # @param [String] output_filename The output file name, this can be a relative path
61
- # @param [Hash] **opts The options
62
- # @option opts [String] :template_filename Template filename can be set or it will default to the same value as the output file name
63
- # @option opts [String] :template_subfolder Template subfolder
64
- def add(output_file, **opts)
65
- template_file = opts[:template_file] || output_file
66
- template_parts = [template_base_folder, opts[:template_subfolder], opts[:template_variant], template_file].reject(&:blank?)
67
-
68
- opts[:template_file] = File.join(*template_parts)
69
-
70
- add_file(output_file, **opts)
71
- end
72
-
73
- def oadd(name, **opts); add(name, **{ open: true }.merge(opts)); end
74
- def tadd(name, **opts); add(name, **{ open_template: true }.merge(opts)); end
75
- def fadd(name, **opts); add(name, **{ on_exist: :write }.merge(opts)); end
76
- end
77
- end