k_director 0.1.0 → 0.1.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 22551692abb160d4c31e7472aeaaf881823b33e05633b6f9045d74fa93fcb799
4
- data.tar.gz: dc9bd11fe04bf8a562a51d98a8151317e1c827f0074a1d8f9bd52e94fb310a65
3
+ metadata.gz: 26b288bba48d5f70640335342441187fc943f05fc91e7c130017717717ab1235
4
+ data.tar.gz: 216f9aae4dd9bc02d2ada72459cabfd04c9676ff12e820f4045da60ec18ddab1
5
5
  SHA512:
6
- metadata.gz: 50e221c859695d3f08942358d7c96c39447f88e51bfe799b16277271bb343e1aafc9e731e1d0900373d0e4627828ffd82b3b07b741f4d8d77cb64fccef40a052
7
- data.tar.gz: ae33b727cec7d08e652fb2b0b6bbd4448bfb120d95761f5231bccbaef866291326d77c24c4ad6ca492b9f49b430efb7c9cf4d7f69766536594177fdc057b8089
6
+ metadata.gz: 28ce121b29805c24c235bdf4f1e45ded29e7f348790ab2d59c19f1334133d964d324af5116635120365ae4d8aa149db7743b9bc48433c3788557317ad62e5651
7
+ data.tar.gz: e6fb06a218c48a8c0a0852a07dd8c9c52c1309f7f2114ebfca5dc148c3619fffb4de4297c7f8beabf08a6489f79d516d944eac6180bc188d1d69650890c6ff4a
@@ -100,7 +100,7 @@ KManager.action :bootstrap do
100
100
  # add('.github/workflows/semver.yml')
101
101
  # add('.releaserc.json')
102
102
 
103
- run_command("git add .; git commit -m 'feat: #{self.options.description.downcase}'; git push")
103
+ # run_command("git add .; git commit -m 'chore: #{self.options.description.downcase}'; git push")
104
104
  end
105
105
 
106
106
  # director.k_builder.debug
data/k_director.gemspec CHANGED
@@ -43,5 +43,5 @@ Gem::Specification.new do |spec|
43
43
 
44
44
  spec.add_dependency 'k_log', '~> 0.0.0'
45
45
  # spec.add_dependency 'k_type', '~> 0.0.0'
46
- # spec.add_dependency 'k_util', '~> 0.0.0'
46
+ spec.add_dependency 'k_util', '~> 0.0.0'
47
47
  end
@@ -0,0 +1,28 @@
1
+ # frozen_string_literal: true
2
+
3
+ module KDirector
4
+ module Builders
5
+ # Data builder for KBuilder Actions
6
+ class ActionsBuilder < KDirector::Builders::DomBuilder
7
+ def initialize
8
+ super(schema)
9
+ end
10
+
11
+ def queue_action(action)
12
+ dom[:actions] << current_node(action)
13
+ end
14
+
15
+ def actions
16
+ dom[:actions]
17
+ end
18
+
19
+ private
20
+
21
+ def schema
22
+ {
23
+ actions: []
24
+ }
25
+ end
26
+ end
27
+ end
28
+ end
@@ -0,0 +1,41 @@
1
+ # frozen_string_literal: true
2
+
3
+ module KDirector
4
+ module Builders
5
+ # Base document builder
6
+ class DomBuilder
7
+ attr_reader :dom
8
+ attr_reader :node
9
+
10
+ def initialize(dom = nil)
11
+ @dom = dom || schema
12
+ end
13
+
14
+ def current_node(node)
15
+ @node = node
16
+ end
17
+
18
+ alias last_node node
19
+
20
+ def reset
21
+ @dom = schema
22
+ @last_node = nil
23
+ end
24
+
25
+ def schema
26
+ {}
27
+ end
28
+
29
+ def logit
30
+ puts JSON.pretty_generate(dom)
31
+ # log.structure(dom)
32
+
33
+ self
34
+ end
35
+
36
+ def data
37
+ KUtil.data.to_open_struct(@dom)
38
+ end
39
+ end
40
+ end
41
+ end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module KDirector
4
- VERSION = '0.1.0'
4
+ VERSION = '0.1.1'
5
5
  end
data/lib/k_director.rb CHANGED
@@ -1,6 +1,10 @@
1
1
  # frozen_string_literal: true
2
2
 
3
+ require 'k_util'
4
+
3
5
  require_relative 'k_director/version'
6
+ require_relative 'k_director/builders/dom_builder'
7
+ require_relative 'k_director/builders/actions_builder'
4
8
 
5
9
  module KDirector
6
10
  # raise KDirector::Error, 'Sample message'
data/package-lock.json CHANGED
@@ -1,12 +1,12 @@
1
1
  {
2
2
  "name": "k_director",
3
- "version": "0.1.0",
3
+ "version": "0.1.1",
4
4
  "lockfileVersion": 2,
5
5
  "requires": true,
6
6
  "packages": {
7
7
  "": {
8
8
  "name": "k_director",
9
- "version": "0.1.0",
9
+ "version": "0.1.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.1.0",
3
+ "version": "0.1.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.1.0
4
+ version: 0.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - David Cruwys
@@ -24,6 +24,20 @@ dependencies:
24
24
  - - "~>"
25
25
  - !ruby/object:Gem::Version
26
26
  version: 0.0.0
27
+ - !ruby/object:Gem::Dependency
28
+ name: k_util
29
+ requirement: !ruby/object:Gem::Requirement
30
+ requirements:
31
+ - - "~>"
32
+ - !ruby/object:Gem::Version
33
+ version: 0.0.0
34
+ type: :runtime
35
+ prerelease: false
36
+ version_requirements: !ruby/object:Gem::Requirement
37
+ requirements:
38
+ - - "~>"
39
+ - !ruby/object:Gem::Version
40
+ version: 0.0.0
27
41
  description: " KDirector provides domain specific language implementations for
28
42
  code generation\n"
29
43
  email:
@@ -60,6 +74,8 @@ files:
60
74
  - docs/LICENSE.txt
61
75
  - k_director.gemspec
62
76
  - lib/k_director.rb
77
+ - lib/k_director/builders/actions_builder.rb
78
+ - lib/k_director/builders/dom_builder.rb
63
79
  - lib/k_director/version.rb
64
80
  - package-lock.json
65
81
  - package.json