k_builder 0.0.58 → 0.0.59
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/lib/k_builder/base_builder.rb +13 -0
- 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: cbc297bfc032f0b46f8930052990d5593ec6c490e5616ebb56d340dd0dad7ec6
|
4
|
+
data.tar.gz: f15472d59d723cd64995cc2402a94a3c1e67ffe2bcdd698de0e6c6475c615e47
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 0f8df1c0e2d708a2f11104b9dc01d1dd71d9fab123c473d610d2fec9f95de27469ff6729545b1b63105c14fe6576600694dbe43fc0783c70e7a44b8f6906f1b0
|
7
|
+
data.tar.gz: 38b884a40257519f61a116d5e063261029220c543628f4122247745cfeb2d8f400a66186cf64de8fa50ee9989cf14f64e49c2162ad08e3ade510ad3a06f1e274
|
@@ -94,6 +94,7 @@ module KBuilder
|
|
94
94
|
# @option opts [String] :to Recipient email
|
95
95
|
# @option opts [String] :body The email's body
|
96
96
|
def add_file(file, **opts)
|
97
|
+
# move to command
|
97
98
|
full_file = opts.key?(:folder_key) ? target_file(file, folder: opts[:folder_key]) : target_file(file)
|
98
99
|
|
99
100
|
# Need logging options that can log these internal details
|
@@ -111,6 +112,16 @@ module KBuilder
|
|
111
112
|
end
|
112
113
|
alias touch add_file # it is expected that you would not supply any options, just a file name
|
113
114
|
|
115
|
+
def make_folder(folder_key = nil, sub_path: nil)
|
116
|
+
folder_key = current_folder_key if folder_key.nil?
|
117
|
+
folder = target_folder(folder_key)
|
118
|
+
folder = File.join(folder, sub_path) unless sub_path.nil?
|
119
|
+
|
120
|
+
FileUtils.mkdir_p(folder)
|
121
|
+
|
122
|
+
self
|
123
|
+
end
|
124
|
+
|
114
125
|
# Add content to the clipboard
|
115
126
|
#
|
116
127
|
# @option opts [String] :content Supply the content that you want to write to the file
|
@@ -122,6 +133,7 @@ module KBuilder
|
|
122
133
|
# @option opts [String] :to Recipient email
|
123
134
|
# @option opts [String] :body The email's body
|
124
135
|
def add_clipboard(**opts)
|
136
|
+
# move to command
|
125
137
|
content = process_any_content(**opts)
|
126
138
|
|
127
139
|
begin
|
@@ -139,6 +151,7 @@ module KBuilder
|
|
139
151
|
alias clipboard_copy add_clipboard
|
140
152
|
|
141
153
|
def vscode(*file_parts, folder: current_folder_key)
|
154
|
+
# move to command
|
142
155
|
file = target_file(*file_parts, folder: folder)
|
143
156
|
|
144
157
|
rc "code #{file}"
|
data/lib/k_builder/version.rb
CHANGED