specinfra 2.76.3 → 2.76.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/specinfra/command/base/file.rb +2 -2
- data/lib/specinfra/version.rb +1 -1
- data/spec/command/base/file_spec.rb +8 -0
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 6e520eb86382bd78fcfc38c87433df87551b7570
|
4
|
+
data.tar.gz: 8a52edd53eeeb10e5cee61735e11cee4611c8cb0
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c81467a2ed0d1c6a1139082c7804274c8a7138e718809b436f42416a9454636999f3f974a4e286f0ad36737edb6c6aa29bc8c709f0a0321c3ccaa0805ace983d
|
7
|
+
data.tar.gz: a011f0739d49fc23350b93ffe085c2458d92548e32b523a28138a951b8175602b57e019cec948bf7a53dbf2b07bc0afe7ee0a8a41e54053c4333de97f4d29669
|
@@ -153,12 +153,12 @@ class Specinfra::Command::Base::File < Specinfra::Command::Base
|
|
153
153
|
def change_owner(file, owner, group=nil, options = {})
|
154
154
|
option = '-R' if options[:recursive]
|
155
155
|
owner = "#{owner}:#{group}" if group
|
156
|
-
"chown #{option} #{owner} #{escape(file)}".squeeze(' ')
|
156
|
+
"chown #{option} #{escape(owner)} #{escape(file)}".squeeze(' ')
|
157
157
|
end
|
158
158
|
|
159
159
|
def change_group(file, group, options = {})
|
160
160
|
option = '-R' if options[:recursive]
|
161
|
-
"chgrp #{option} #{group} #{escape(file)}".squeeze(' ')
|
161
|
+
"chgrp #{option} #{escape(group)} #{escape(file)}".squeeze(' ')
|
162
162
|
end
|
163
163
|
|
164
164
|
def create_as_directory(file)
|
data/lib/specinfra/version.rb
CHANGED
@@ -26,6 +26,10 @@ describe get_command(:change_file_owner, '/tmp', 'root', 'root') do
|
|
26
26
|
it { should eq 'chown root:root /tmp' }
|
27
27
|
end
|
28
28
|
|
29
|
+
describe get_command(:change_file_owner, '/tmp', 'root', 'Domain Users') do
|
30
|
+
it { should eq 'chown root:Domain\\ Users /tmp' }
|
31
|
+
end
|
32
|
+
|
29
33
|
describe get_command(:change_file_owner, '/tmp', 'root', 'root', :recursive => true) do
|
30
34
|
it { should eq 'chown -R root:root /tmp' }
|
31
35
|
end
|
@@ -34,6 +38,10 @@ describe get_command(:change_file_group, '/tmp', 'root') do
|
|
34
38
|
it { should eq 'chgrp root /tmp' }
|
35
39
|
end
|
36
40
|
|
41
|
+
describe get_command(:change_file_group, '/tmp', 'Domain Users') do
|
42
|
+
it { should eq 'chgrp Domain\ Users /tmp' }
|
43
|
+
end
|
44
|
+
|
37
45
|
describe get_command(:change_file_group, '/tmp', 'root', :recursive => true) do
|
38
46
|
it { should eq 'chgrp -R root /tmp' }
|
39
47
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: specinfra
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.76.
|
4
|
+
version: 2.76.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Gosuke Miyashita
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2018-
|
11
|
+
date: 2018-12-11 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: net-scp
|