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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 0e855ea56fe8350c6d8f348caafec612a3faa998f6f39f0bfd631c0968b5476f
4
- data.tar.gz: 3a8ef5a51b2f968d17e688953cf6868a5a387bbe7579a19896fd0c21d4c01b36
3
+ metadata.gz: d6ee6da028f776a4ed4ed470290696dfcf2c15c0caa417666e9300f1d75ea390
4
+ data.tar.gz: 14dd16cd8185b21eef317ea6b8cfda1ee570c8559e77db264021722889962a74
5
5
  SHA512:
6
- metadata.gz: bf168f42f0a1e1df0bc0e169b824601579c793623458b5d13fbd8b3cf933d2fbe8abacf4e52f76c3c4795585cb32b276a5bae3505fa74d2cc63cb3d839a27341
7
- data.tar.gz: c3d3d4fd6fc847d62d23e32c15db3874badce4c8743d28c40111d725eb7a3e5f4d39fdb3442b42c213ae524c262d128ea9de4062e985a044ce4e8c85bba2bae5
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)
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module KDirector
4
- VERSION = '0.11.0'
4
+ VERSION = '0.11.1'
5
5
  end
data/package-lock.json CHANGED
@@ -1,12 +1,12 @@
1
1
  {
2
2
  "name": "k_director",
3
- "version": "0.11.0",
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.0",
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
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "k_director",
3
- "version": "0.11.0",
3
+ "version": "0.11.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.11.0
4
+ version: 0.11.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - David Cruwys