k_builder 0.0.58 → 0.0.59

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: f173e365f4bece5981d87548e67b32f9748e2ae8438d2d3bb54c121de957ec87
4
- data.tar.gz: 3d2c0d23e74b0049a112f8e175fa6dce05a1afad90b80f77a63f82d3231c772a
3
+ metadata.gz: cbc297bfc032f0b46f8930052990d5593ec6c490e5616ebb56d340dd0dad7ec6
4
+ data.tar.gz: f15472d59d723cd64995cc2402a94a3c1e67ffe2bcdd698de0e6c6475c615e47
5
5
  SHA512:
6
- metadata.gz: 63901b9242e0933f4d6b639fbdbba2212b5f37d614b1cf43cf7ace40d97560bd0afb47cba1879c4e2ba9d923f52c12f5456ce03c734a77d63472977adc996184
7
- data.tar.gz: eec21944c6e4d9cc64f2fa841ecbe1c655f14146626e04152b9ad152824b19f0a1d7450346781aaba1f0d4994649d99faa00ea39a5f40714a1df143b0adbc22a
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}"
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module KBuilder
4
- VERSION = '0.0.58'
4
+ VERSION = '0.0.59'
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: k_builder
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.58
4
+ version: 0.0.59
5
5
  platform: ruby
6
6
  authors:
7
7
  - David Cruwys