k_director 0.11.0 → 0.11.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 +4 -4
- data/docs/CHANGELOG.md +7 -0
- data/lib/k_director/directors/base_director.rb +31 -0
- data/lib/k_director/dsls/children/blueprint.rb +0 -29
- data/lib/k_director/version.rb +1 -1
- data/package-lock.json +2 -2
- data/package.json +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: d6ee6da028f776a4ed4ed470290696dfcf2c15c0caa417666e9300f1d75ea390
|
4
|
+
data.tar.gz: 14dd16cd8185b21eef317ea6b8cfda1ee570c8559e77db264021722889962a74
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 34896604b4d9731e4a4ab0924572fdb65736bab9e71b63491ba16fd9d3f79418e3e63d4d81818048870333c002f76316846617df1ccbe5aaffb1c171e73efdc8
|
7
|
+
data.tar.gz: dcf6fd9985456ad96ac7383b29a08fcf020b8947502eac2af80c2618481f12bc193d180a1518d40cb4d074d8a8412dcaeecb5c017e1cddeda406ee365deab520
|
data/docs/CHANGELOG.md
CHANGED
@@ -1,3 +1,10 @@
|
|
1
|
+
# [0.11.0](https://github.com/klueless-io/k_director/compare/v0.10.4...v0.11.0) (2022-02-07)
|
2
|
+
|
3
|
+
|
4
|
+
### Features
|
5
|
+
|
6
|
+
* move github, blueprint and package_json fluent accessors onto BaseDirector ([88fa3fd](https://github.com/klueless-io/k_director/commit/88fa3fd0df530bef3731f0b4a62369d925df2fa5))
|
7
|
+
|
1
8
|
## [0.10.4](https://github.com/klueless-io/k_director/compare/v0.10.3...v0.10.4) (2022-02-07)
|
2
9
|
|
3
10
|
|
@@ -89,6 +89,37 @@ module KDirector
|
|
89
89
|
@options.on_action
|
90
90
|
end
|
91
91
|
|
92
|
+
# Add a single file into the code base
|
93
|
+
#
|
94
|
+
# This is a wrapper around add_file that will add the file to the codebase using template path rules
|
95
|
+
#
|
96
|
+
# @param [String] output_filename The output file name, this can be a relative path
|
97
|
+
# @param [Hash] **opts The options
|
98
|
+
# @option opts [String] :template_filename Template filename can be set or it will default to the same value as the output file name
|
99
|
+
# @option opts [String] :template_subfolder Template subfolder
|
100
|
+
def add(output_file, **opts)
|
101
|
+
template_file = opts[:template_file] || output_file
|
102
|
+
template_parts = [template_base_folder, opts[:template_subfolder], template_file].reject(&:blank?)
|
103
|
+
template_path = File.join(*template_parts)
|
104
|
+
|
105
|
+
# maybe template_file should be renamed to template_path in k_builder
|
106
|
+
opts[:template_file] = template_path
|
107
|
+
|
108
|
+
add_file(output_file, **opts)
|
109
|
+
end
|
110
|
+
|
111
|
+
def oadd(name, **opts)
|
112
|
+
add(name, **{ open: true }.merge(opts))
|
113
|
+
end
|
114
|
+
|
115
|
+
def tadd(name, **opts)
|
116
|
+
add(name, **{ open_template: true }.merge(opts))
|
117
|
+
end
|
118
|
+
|
119
|
+
def fadd(name, **opts)
|
120
|
+
add(name, **{ on_exist: :write }.merge(opts))
|
121
|
+
end
|
122
|
+
|
92
123
|
# Add a file to target folder
|
93
124
|
def add_file(file, **opts)
|
94
125
|
opts = {
|
@@ -7,35 +7,6 @@ module KDirector
|
|
7
7
|
#
|
8
8
|
# A blueprint is a recipe that you can follow to build out assets on the target application
|
9
9
|
class Blueprint < KDirector::Directors::ChildDirector
|
10
|
-
# Add a single file into the code base
|
11
|
-
#
|
12
|
-
# @param [String] output_filename The output file name, this can be a relative path
|
13
|
-
# @param [Hash] **opts The options
|
14
|
-
# @option opts [String] :template_filename Template filename can be set or it will default to the same value as the output file name
|
15
|
-
# @option opts [String] :template_subfolder Template subfolder
|
16
|
-
def add(output_file, **opts)
|
17
|
-
template_file = opts[:template_file] || output_file
|
18
|
-
template_parts = [template_base_folder, opts[:template_subfolder], template_file].reject(&:blank?)
|
19
|
-
template_path = File.join(*template_parts)
|
20
|
-
|
21
|
-
# maybe template_file should be renamed to template_path in k_builder
|
22
|
-
opts[:template_file] = template_path
|
23
|
-
|
24
|
-
add_file(output_file, **opts)
|
25
|
-
end
|
26
|
-
|
27
|
-
def oadd(name, **opts)
|
28
|
-
add(name, **{ open: true }.merge(opts))
|
29
|
-
end
|
30
|
-
|
31
|
-
def tadd(name, **opts)
|
32
|
-
add(name, **{ open_template: true }.merge(opts))
|
33
|
-
end
|
34
|
-
|
35
|
-
def fadd(name, **opts)
|
36
|
-
add(name, **{ on_exist: :write }.merge(opts))
|
37
|
-
end
|
38
|
-
|
39
10
|
# def template_content(template_file, **opts)
|
40
11
|
# template_parts = [template_base_folder, opts[:template_subfolder], template_file].reject(&:blank?)
|
41
12
|
# template_file = File.join(*template_parts)
|
data/lib/k_director/version.rb
CHANGED
data/package-lock.json
CHANGED
@@ -1,12 +1,12 @@
|
|
1
1
|
{
|
2
2
|
"name": "k_director",
|
3
|
-
"version": "0.11.
|
3
|
+
"version": "0.11.1",
|
4
4
|
"lockfileVersion": 2,
|
5
5
|
"requires": true,
|
6
6
|
"packages": {
|
7
7
|
"": {
|
8
8
|
"name": "k_director",
|
9
|
-
"version": "0.11.
|
9
|
+
"version": "0.11.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