k_builder 0.0.57 → 0.0.58
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/k_builder/base_builder.rb +28 -2
- data/lib/k_builder/configuration.rb +3 -13
- data/lib/k_builder/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: f173e365f4bece5981d87548e67b32f9748e2ae8438d2d3bb54c121de957ec87
|
4
|
+
data.tar.gz: 3d2c0d23e74b0049a112f8e175fa6dce05a1afad90b80f77a63f82d3231c772a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 63901b9242e0933f4d6b639fbdbba2212b5f37d614b1cf43cf7ace40d97560bd0afb47cba1879c4e2ba9d923f52c12f5456ce03c734a77d63472977adc996184
|
7
|
+
data.tar.gz: eec21944c6e4d9cc64f2fa841ecbe1c655f14146626e04152b9ad152824b19f0a1d7450346781aaba1f0d4994649d99faa00ea39a5f40714a1df143b0adbc22a
|
@@ -8,6 +8,8 @@ module KBuilder
|
|
8
8
|
# Setter methods (are NOT fluent) can be created as needed
|
9
9
|
# these methods would not be prefixed with the set_
|
10
10
|
class BaseBuilder
|
11
|
+
include KLog::Logging
|
12
|
+
|
11
13
|
attr_reader :configuration
|
12
14
|
|
13
15
|
attr_accessor :target_folders
|
@@ -57,6 +59,17 @@ module KBuilder
|
|
57
59
|
}
|
58
60
|
end
|
59
61
|
|
62
|
+
def debug
|
63
|
+
log.subheading 'kbuilder'
|
64
|
+
|
65
|
+
target_folders.debug(title: 'target_folders')
|
66
|
+
|
67
|
+
log.info ''
|
68
|
+
|
69
|
+
template_folders.debug(title: 'template folders (search order)')
|
70
|
+
''
|
71
|
+
end
|
72
|
+
|
60
73
|
# ----------------------------------------------------------------------
|
61
74
|
# Fluent interface
|
62
75
|
# ----------------------------------------------------------------------
|
@@ -92,6 +105,7 @@ module KBuilder
|
|
92
105
|
|
93
106
|
# Prettier needs to work with the original file name
|
94
107
|
run_prettier file if opts.key?(:pretty)
|
108
|
+
# Need support for rubocop -a
|
95
109
|
|
96
110
|
self
|
97
111
|
end
|
@@ -234,9 +248,19 @@ module KBuilder
|
|
234
248
|
|
235
249
|
return unless opts[:content_file]
|
236
250
|
|
237
|
-
|
251
|
+
# NOTE: when using content file, you still want to search for it in the template folders, I THINK?
|
252
|
+
cf = find_template_file(opts[:content_file])
|
253
|
+
|
254
|
+
return "content not found: #{opts[:content_file]}" if cf.nil?
|
255
|
+
|
256
|
+
# cf = opts[:content_file]
|
257
|
+
|
258
|
+
# unless File.exist?(cf)
|
259
|
+
# cf_from_template_folders = find_template_file(cf)
|
260
|
+
# return "Content not found: #{File.expand_path(cf)}" unless File.exist?(cf_from_template_folders)
|
238
261
|
|
239
|
-
|
262
|
+
# cf = cf_from_template_folders
|
263
|
+
# end
|
240
264
|
|
241
265
|
File.read(cf)
|
242
266
|
end
|
@@ -298,6 +322,8 @@ module KBuilder
|
|
298
322
|
|
299
323
|
puts build_command
|
300
324
|
|
325
|
+
# need to support the fork process options as I was not able to run
|
326
|
+
# k_builder_watch -n because it hid all the following output
|
301
327
|
system(build_command)
|
302
328
|
end
|
303
329
|
alias rc run_command
|
@@ -48,25 +48,15 @@ module KBuilder
|
|
48
48
|
@template_folders = orig.template_folders.clone
|
49
49
|
end
|
50
50
|
|
51
|
-
# rubocop:disable Metrics/AbcSize
|
52
51
|
def debug
|
53
52
|
log.subheading 'kbuilder base configuration'
|
54
53
|
|
55
|
-
|
56
|
-
target_folders.folders.each_key do |key|
|
57
|
-
folder = target_folders.folders[key]
|
58
|
-
log.kv key.to_s, folder
|
59
|
-
end
|
60
|
-
log.info ''
|
54
|
+
target_folders.debug(title: 'target_folders')
|
61
55
|
|
62
|
-
log.
|
56
|
+
log.info ''
|
63
57
|
|
64
|
-
template_folders.
|
65
|
-
folder = template_folders.folders[key]
|
66
|
-
log.kv key.to_s, folder
|
67
|
-
end
|
58
|
+
template_folders.debug(title: 'template folders (search order)')
|
68
59
|
''
|
69
60
|
end
|
70
|
-
# rubocop:enable Metrics/AbcSize
|
71
61
|
end
|
72
62
|
end
|
data/lib/k_builder/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: k_builder
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.58
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- David Cruwys
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2021-
|
11
|
+
date: 2021-06-26 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: handlebars-helpers
|