k_builder 0.0.37 → 0.0.39
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 +11 -11
- data/lib/k_builder/version.rb +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: 5c8b5b5e5cc829fc8d5239d970cda55ef650e6d0b6bc5e6474a4d4172bde0661
|
4
|
+
data.tar.gz: c326954d805393dc3137c1b37642dfc507337d93319f8fd247bacfcb62d495e4
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a8def8a344f419a00722f2e0d2c481603fa940e02dab468a8a28251c273f1c8b0d06310cfd496abcad82d331f99efeb4f5c57f0c25462ddb2ca50da2b83008d0
|
7
|
+
data.tar.gz: bf23b9b0c8bc4cba10a2f944889210baa0378008779dd4ac935a85d42826c83e12aad1f84c29904fcf96aa0e3c2545baa32cfb7cb2a7a84bbf3c48d67cdb10a7
|
@@ -125,10 +125,6 @@ module KBuilder
|
|
125
125
|
end
|
126
126
|
alias cd set_current_folder
|
127
127
|
|
128
|
-
def current_folder_key
|
129
|
-
target_folders.current
|
130
|
-
end
|
131
|
-
|
132
128
|
# Fluent adder for target folder (KBuilder::NamedFolders)
|
133
129
|
def add_target_folder(folder_key, value)
|
134
130
|
target_folders.add(folder_key, value)
|
@@ -136,16 +132,20 @@ module KBuilder
|
|
136
132
|
self
|
137
133
|
end
|
138
134
|
|
139
|
-
|
135
|
+
def current_folder_key
|
136
|
+
target_folders.current
|
137
|
+
end
|
138
|
+
|
139
|
+
# Get target folder by folder_key
|
140
140
|
#
|
141
|
-
#
|
142
|
-
def
|
141
|
+
# If folder_key not supplied then get the current target folder
|
142
|
+
def target_folder(folder_key = current_folder_key)
|
143
143
|
target_folders.get(folder_key)
|
144
144
|
end
|
145
145
|
|
146
146
|
# Get target file
|
147
147
|
def target_file(file_parts, folder: current_folder_key)
|
148
|
-
File.join(
|
148
|
+
File.join(target_folder(folder), file_parts)
|
149
149
|
end
|
150
150
|
|
151
151
|
# Template folder & Files
|
@@ -243,11 +243,11 @@ module KBuilder
|
|
243
243
|
|
244
244
|
def run_command(command)
|
245
245
|
# Deep path create if needed
|
246
|
-
|
246
|
+
tf = target_folder
|
247
247
|
|
248
|
-
FileUtils.mkdir_p(
|
248
|
+
FileUtils.mkdir_p(tf)
|
249
249
|
|
250
|
-
build_command = "cd #{
|
250
|
+
build_command = "cd #{tf} && #{command}"
|
251
251
|
|
252
252
|
puts build_command
|
253
253
|
|
data/lib/k_builder/version.rb
CHANGED