kanrisuru 0.8.2 → 0.8.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +4 -0
- data/lib/kanrisuru/core/disk.rb +2 -2
- data/lib/kanrisuru/version.rb +1 -1
- data/spec/functional/core/disk_spec.rb +7 -0
- 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: 7986958e7a5a32bb79f6f8cd225b73e996f68329e9adb95c324ad898efaa8bdc
|
4
|
+
data.tar.gz: '02279420cd5ff6017234d4058847173f3be44810267e57c59cb2b09be8f9dadc'
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 7fedbd06614d36213c5d7df56c22e1f88ecb5b41732704a02b41eff1272559db3f8dc22eaa1112188cd5b0204f4c81f40e1d7f66689c41ca2d34ef0c125fbd9e
|
7
|
+
data.tar.gz: a451f3c5c4cb26ff0bf733371175c99f148ccd9531bcf0366b08d063b4ac495b1fdd3aafe47ff40b4a2cbd9df94b2de3c7dff8e0afa1f9717b3e54271a4ef75b
|
data/CHANGELOG.md
CHANGED
@@ -1,3 +1,7 @@
|
|
1
|
+
## Kanrisuru 0.8.3 (August 20, 2021) ##
|
2
|
+
* Fix bug with disk usage, `du` command by escaping the awk variables in the command.
|
3
|
+
* Update `du` command to execute with shell user.
|
4
|
+
|
1
5
|
## Kanrisuru 0.8.2 (August 19, 2021) ##
|
2
6
|
* Convert `major` and `minor` device field values to an `integer` in lsblk system module.
|
3
7
|
|
data/lib/kanrisuru/core/disk.rb
CHANGED
@@ -31,9 +31,9 @@ module Kanrisuru
|
|
31
31
|
|
32
32
|
command = Kanrisuru::Command.new('du')
|
33
33
|
command.append_arg('-s', path)
|
34
|
-
command | "awk '{print
|
34
|
+
command | "awk '{print \\$1, \\$2}'"
|
35
35
|
|
36
|
-
|
36
|
+
execute_shell(command)
|
37
37
|
|
38
38
|
Kanrisuru::Result.new(command) do |cmd|
|
39
39
|
string = cmd.to_s
|
data/lib/kanrisuru/version.rb
CHANGED
@@ -65,6 +65,13 @@ RSpec.describe Kanrisuru::Core::Disk do
|
|
65
65
|
expect(result[0].path).to eq("#{host_json['home']}/.bashrc")
|
66
66
|
end
|
67
67
|
|
68
|
+
it 'gets disk usage root' do
|
69
|
+
host.su('root')
|
70
|
+
result = host.du(path: '/etc')
|
71
|
+
expect(result).to be_success
|
72
|
+
expect(result[0].path).to eq("/etc")
|
73
|
+
end
|
74
|
+
|
68
75
|
it 'gets disk free for system' do
|
69
76
|
expect(host.df.data).to be_instance_of(Array)
|
70
77
|
expect(host.df(inodes: true).data).to be_instance_of(Array)
|
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.
|
4
|
+
version: 0.8.3
|
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-
|
11
|
+
date: 2021-08-20 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rspec
|