kanrisuru 0.8.10 → 0.8.11

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: 8665542405d850b01c9c8623c200207c284925a0c14eb21a908711ebce6acf1e
4
- data.tar.gz: f52cdd4ecb4483d161494290da195270062865028a7ca02251a6de930f8477a1
3
+ metadata.gz: 5aa4c218e69710bd9ce035eca337448c240efc8e9b3e505dc1d70c4dea3e3190
4
+ data.tar.gz: 488db0a56c43a223031ef657f21413aa0852f6edd2afb68b0c5f5eac97d81cd3
5
5
  SHA512:
6
- metadata.gz: b7eeaf4fb3741e149ee9563d244934e72d9cc56bdfbcffb90bdddf57545c49b5a9736c93dca2a78c65b73d8848f84617ce7b4d323de81c214ed473764a401a94
7
- data.tar.gz: 834dc4092cfdd58e670b926eb3b77ed37d8a40cfb813aa8189f3ac718033d2de37d1ee23e59b530e7342dbd90c9807b35f95d194ac3239af4e9dfed2ee445875
6
+ metadata.gz: b8c45c70ddfdfedb3dcad6698e9f1228ff1ce05aa222972f29e5979e33ef85dc7227dbe8532a50755a61342fec067fdde7303dfd4cba5048de9d44d4f6a27f65
7
+ data.tar.gz: d417cbc907dd714ffc2385e13f6547b5fd0f42bd5e3f5c83531ace728e355a19a12d2156f4f7cb52b51d608984fe65966f0d287e72655c4088f4b24299d3afc3
data/CHANGELOG.md CHANGED
@@ -1,3 +1,6 @@
1
+ ## Kanrisuru 0.8.11 (October 1, 20201)
2
+ * Allow `Kanrisuru::Mode` as mode option in mkdir method.
3
+
1
4
  ## Kanrisuru 0.8.10 (August 24, 20201)
2
5
  * Fix bug with rspec test case.
3
6
 
@@ -219,7 +219,17 @@ module Kanrisuru
219
219
 
220
220
  command = Kanrisuru::Command.new("mkdir #{path}")
221
221
  command.append_flag('-p', opts[:silent])
222
- command.append_arg('-m', opts[:mode])
222
+
223
+ if Kanrisuru::Util.present?(opts[:mode])
224
+ mode = opts[:mode]
225
+ if mode.instance_of?(Kanrisuru::Mode)
226
+ mode = mode.numeric
227
+ elsif mode.instance_of?(String) && (mode.include?(',') || /[=+-]/.match(mode))
228
+ mode = Kanrisuru::Mode.new(mode).numeric
229
+ end
230
+
231
+ command.append_arg('-m', mode)
232
+ end
223
233
 
224
234
  execute_shell(command)
225
235
 
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Kanrisuru
4
- VERSION = '0.8.10'
4
+ VERSION = '0.8.11'
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: kanrisuru
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.8.10
4
+ version: 0.8.11
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ryan Mammina
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2021-08-24 00:00:00.000000000 Z
11
+ date: 2021-10-01 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rspec