kanrisuru 0.8.2 → 0.8.3

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: ce41108c8201af2a48ac2453f8dc3fb993869e9264a8754d603a11d09ffe1cb5
4
- data.tar.gz: 542d34622a949d0eb5ddddc1d7403f13e9e37dfb39cb88b589c7655a2a34a3e4
3
+ metadata.gz: 7986958e7a5a32bb79f6f8cd225b73e996f68329e9adb95c324ad898efaa8bdc
4
+ data.tar.gz: '02279420cd5ff6017234d4058847173f3be44810267e57c59cb2b09be8f9dadc'
5
5
  SHA512:
6
- metadata.gz: 7aea2688091ff8449f21eb11cd2fdcb51d71563538fd9c9e38a484770adb8745663a3132314b0001d9e6206dbd57533fe2626af1c59e2ada6d0ea394e2fdd113
7
- data.tar.gz: 054a8612edecb94b79bd6b7488096ae12d4fee790d17cf295d4a04f397282ae2c9f5e4a977a37145bd4fc37bf0896a2a9bbd43098762ff65496de29804aa6a0b
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
 
@@ -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 $1, $2}'"
34
+ command | "awk '{print \\$1, \\$2}'"
35
35
 
36
- execute(command)
36
+ execute_shell(command)
37
37
 
38
38
  Kanrisuru::Result.new(command) do |cmd|
39
39
  string = cmd.to_s
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Kanrisuru
4
- VERSION = '0.8.2'
4
+ VERSION = '0.8.3'
5
5
  end
@@ -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.2
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-19 00:00:00.000000000 Z
11
+ date: 2021-08-20 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rspec