kanrisuru 0.8.6 → 0.8.10
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +12 -0
- data/lib/kanrisuru/core/archive.rb +8 -7
- data/lib/kanrisuru/core/path.rb +2 -2
- data/lib/kanrisuru/mode.rb +1 -1
- data/lib/kanrisuru/version.rb +1 -1
- data/spec/functional/core/file_spec.rb +4 -0
- data/spec/functional/core/path_spec.rb +3 -3
- data/spec/unit/core/path_spec.rb +2 -2
- 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: 8665542405d850b01c9c8623c200207c284925a0c14eb21a908711ebce6acf1e
|
4
|
+
data.tar.gz: f52cdd4ecb4483d161494290da195270062865028a7ca02251a6de930f8477a1
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b7eeaf4fb3741e149ee9563d244934e72d9cc56bdfbcffb90bdddf57545c49b5a9736c93dca2a78c65b73d8848f84617ce7b4d323de81c214ed473764a401a94
|
7
|
+
data.tar.gz: 834dc4092cfdd58e670b926eb3b77ed37d8a40cfb813aa8189f3ac718033d2de37d1ee23e59b530e7342dbd90c9807b35f95d194ac3239af4e9dfed2ee445875
|
data/CHANGELOG.md
CHANGED
@@ -1,3 +1,15 @@
|
|
1
|
+
## Kanrisuru 0.8.10 (August 24, 20201)
|
2
|
+
* Fix bug with rspec test case.
|
3
|
+
|
4
|
+
## Kanrisuru 0.8.9 (August 24, 2021)
|
5
|
+
* Fix spelling error exception `ArgumentError` in `Kanrisuru::Mode` class.
|
6
|
+
|
7
|
+
## Kanrisuru 0.8.8 (August 21, 2021) ##
|
8
|
+
* Add shorthand notation for tar command actions, such as `x` for `extract`, `t` for `list`, and `c` for `create`.
|
9
|
+
|
10
|
+
## Kanrisuru 0.8.7 (August 21, 2021) ##
|
11
|
+
* Fix `FileInfo` field for ls command. Was set to `memory_blocks`, but was incorrect, corrected this to `hard_links`.
|
12
|
+
|
1
13
|
## Kanrisuru 0.8.6 (August 21, 2021) ##
|
2
14
|
* Add `minimum_io_size`, `physical_sector_size`, and `logical_sector_size` to the blkid low level disk probe for devices.
|
3
15
|
|
@@ -24,7 +24,7 @@ module Kanrisuru
|
|
24
24
|
set_compression(command, compress) if compress
|
25
25
|
|
26
26
|
case action
|
27
|
-
when 'list'
|
27
|
+
when 'list', 't'
|
28
28
|
command.append_flag('-t')
|
29
29
|
command.append_arg('--occurrence', opts[:occurrence])
|
30
30
|
command.append_flag('--label', opts[:label])
|
@@ -38,9 +38,10 @@ module Kanrisuru
|
|
38
38
|
FilePath.new(item)
|
39
39
|
end
|
40
40
|
end
|
41
|
-
when 'extract', 'get'
|
41
|
+
when 'extract', 'get', 'x'
|
42
42
|
command.append_flag('-x')
|
43
43
|
command.append_arg('--occurrence', opts[:occurrence])
|
44
|
+
|
44
45
|
command.append_flag('--no-same-owner', opts[:no_same_owner])
|
45
46
|
command.append_flag('--no-same-permissions', opts[:no_same_permissions])
|
46
47
|
command.append_flag('--no-selinux', opts[:no_selinux])
|
@@ -64,7 +65,7 @@ module Kanrisuru
|
|
64
65
|
|
65
66
|
execute_shell(command)
|
66
67
|
Kanrisuru::Result.new(command)
|
67
|
-
when 'create'
|
68
|
+
when 'create', 'c'
|
68
69
|
command.append_flag('-c')
|
69
70
|
command.append_flag('--multi-volume', opts[:multi_volume])
|
70
71
|
|
@@ -81,7 +82,7 @@ module Kanrisuru
|
|
81
82
|
execute_shell(command)
|
82
83
|
|
83
84
|
Kanrisuru::Result.new(command)
|
84
|
-
when 'append'
|
85
|
+
when 'append', 'r'
|
85
86
|
command.append_flag('-r')
|
86
87
|
|
87
88
|
if Kanrisuru::Util.present?(paths)
|
@@ -91,7 +92,7 @@ module Kanrisuru
|
|
91
92
|
|
92
93
|
execute_shell(command)
|
93
94
|
Kanrisuru::Result.new(command)
|
94
|
-
when 'catenate', 'concat'
|
95
|
+
when 'catenate', 'concat', 'A'
|
95
96
|
command.append_flag('-A')
|
96
97
|
|
97
98
|
if Kanrisuru::Util.present?(paths)
|
@@ -101,7 +102,7 @@ module Kanrisuru
|
|
101
102
|
|
102
103
|
execute_shell(command)
|
103
104
|
Kanrisuru::Result.new(command)
|
104
|
-
when 'update'
|
105
|
+
when 'update', 'u'
|
105
106
|
command.append_flag('-u')
|
106
107
|
|
107
108
|
if Kanrisuru::Util.present?(paths)
|
@@ -111,7 +112,7 @@ module Kanrisuru
|
|
111
112
|
|
112
113
|
execute_shell(command)
|
113
114
|
Kanrisuru::Result.new(command)
|
114
|
-
when 'diff', 'compare'
|
115
|
+
when 'diff', 'compare', 'd'
|
115
116
|
command.append_flag('-d')
|
116
117
|
command.append_arg('--occurrence', opts[:occurrence])
|
117
118
|
|
data/lib/kanrisuru/core/path.rb
CHANGED
@@ -15,8 +15,8 @@ module Kanrisuru
|
|
15
15
|
os_define :linux, :which
|
16
16
|
|
17
17
|
FilePath = Struct.new(:path)
|
18
|
-
FileInfoId = Struct.new(:inode, :mode, :
|
19
|
-
FileInfo = Struct.new(:inode, :mode, :
|
18
|
+
FileInfoId = Struct.new(:inode, :mode, :hard_links, :uid, :gid, :fsize, :date, :path, :type)
|
19
|
+
FileInfo = Struct.new(:inode, :mode, :hard_links, :owner, :group, :fsize, :date, :path, :type)
|
20
20
|
UserName = Struct.new(:user)
|
21
21
|
|
22
22
|
def ls(opts = {})
|
data/lib/kanrisuru/mode.rb
CHANGED
@@ -235,7 +235,7 @@ module Kanrisuru
|
|
235
235
|
@group = Kanrisuru::Mode::Permission.new(symbolic_to_numeric(modes[3..5]), modes[3..5])
|
236
236
|
@other = Kanrisuru::Mode::Permission.new(symbolic_to_numeric(modes[6..8]), modes[6..8])
|
237
237
|
else
|
238
|
-
raise
|
238
|
+
raise ArgumentError, "Invalid format for mode #{string}"
|
239
239
|
end
|
240
240
|
end
|
241
241
|
|
data/lib/kanrisuru/version.rb
CHANGED
@@ -67,6 +67,10 @@ RSpec.describe Kanrisuru::Core::File do
|
|
67
67
|
mode = host.chmod(path, mode).mode
|
68
68
|
expect(mode.symbolic).to eq('-rwxr--r--')
|
69
69
|
expect(mode.to_i).to eq(0o744)
|
70
|
+
|
71
|
+
expect {
|
72
|
+
host.chmod(path, 600)
|
73
|
+
}.to raise_error(ArgumentError)
|
70
74
|
end
|
71
75
|
|
72
76
|
it 'changes file owner and group' do
|
@@ -29,13 +29,13 @@ RSpec.describe Kanrisuru::Core::Path do
|
|
29
29
|
expect(result.data).to be_instance_of(Array)
|
30
30
|
|
31
31
|
file = result.find { |f| f.path == '.bashrc' }
|
32
|
-
expect(file.
|
32
|
+
expect(file.owner).to eq(1000)
|
33
33
|
|
34
34
|
case os_name
|
35
35
|
when 'opensuse', 'sles'
|
36
|
-
expect(file.
|
36
|
+
expect(file.group).to eq(100)
|
37
37
|
else
|
38
|
-
expect(file.
|
38
|
+
expect(file.group).to eq(1000)
|
39
39
|
end
|
40
40
|
end
|
41
41
|
|
data/spec/unit/core/path_spec.rb
CHANGED
@@ -6,10 +6,10 @@ RSpec.describe Kanrisuru::Core::Path do
|
|
6
6
|
it 'responds to path fields' do
|
7
7
|
expect(Kanrisuru::Core::Path::FilePath.new).to respond_to(:path)
|
8
8
|
expect(Kanrisuru::Core::Path::FileInfoId.new).to respond_to(
|
9
|
-
:inode, :mode, :
|
9
|
+
:inode, :mode, :hard_links, :uid, :gid, :fsize, :date, :path, :type
|
10
10
|
)
|
11
11
|
expect(Kanrisuru::Core::Path::FileInfo.new).to respond_to(
|
12
|
-
:inode, :mode, :
|
12
|
+
:inode, :mode, :hard_links, :owner, :group, :fsize, :date, :path, :type
|
13
13
|
)
|
14
14
|
expect(Kanrisuru::Core::Path::UserName.new).to respond_to(:user)
|
15
15
|
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.
|
4
|
+
version: 0.8.10
|
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-24 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rspec
|