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 +4 -4
- data/.builders/generators/01-bootstrap.rb +1 -1
- data/k_director.gemspec +1 -1
- data/lib/k_director/builders/actions_builder.rb +28 -0
- data/lib/k_director/builders/dom_builder.rb +41 -0
- data/lib/k_director/version.rb +1 -1
- data/lib/k_director.rb +4 -0
- data/package-lock.json +2 -2
- data/package.json +1 -1
- metadata +17 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 26b288bba48d5f70640335342441187fc943f05fc91e7c130017717717ab1235
|
4
|
+
data.tar.gz: 216f9aae4dd9bc02d2ada72459cabfd04c9676ff12e820f4045da60ec18ddab1
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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 '
|
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
@@ -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
|
data/lib/k_director/version.rb
CHANGED
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.
|
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.
|
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
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.
|
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
|