specinfra 2.18.2 → 2.18.3
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/user.rb +4 -0
- data/lib/specinfra/version.rb +1 -1
- data/spec/command/base/user_spec.rb +4 -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: cbffd79911b524f8816754369992ddf5efbb7a44
|
4
|
+
data.tar.gz: 3a35dc80f90c08b6e6c05afdcc8a7c80a1f4afe0
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 7a467e1e362a56c97db08d6bb1eb3e557f623f5e47f2b773d57c8b97fcad0bc4abe7e30c474f9361ae2a9c9f66a177c1ff4c8d3b49bea5a374295708dab9fcd7
|
7
|
+
data.tar.gz: cb051f389156a273be4d7251a591ed3990ea4fdee966ebb5160d8a08628c312beb22167b90e63a76d3457ec7b25505251d4b11dc3731532e1b8349fc6700cc79
|
@@ -42,6 +42,10 @@ class Specinfra::Command::Base::User < Specinfra::Command::Base
|
|
42
42
|
"getent passwd #{escape(user)} | awk -F: '{ print $6 }'"
|
43
43
|
end
|
44
44
|
|
45
|
+
def update_home_directory(user, directory)
|
46
|
+
"usermod -d #{escape(directory)} #{escape(user)}"
|
47
|
+
end
|
48
|
+
|
45
49
|
def update_uid(user, uid)
|
46
50
|
"usermod -u #{escape(uid)} #{escape(user)}"
|
47
51
|
end
|
data/lib/specinfra/version.rb
CHANGED
@@ -14,6 +14,10 @@ describe get_command(:get_user_home_directory, 'foo') do
|
|
14
14
|
it { should eq "getent passwd foo | awk -F: '{ print $6 }'" }
|
15
15
|
end
|
16
16
|
|
17
|
+
describe get_command(:update_user_home_directory, 'user', 'dir') do
|
18
|
+
it { should eq "usermod -d dir user" }
|
19
|
+
end
|
20
|
+
|
17
21
|
describe get_command(:update_user_uid, 'foo', 100) do
|
18
22
|
it { should eq 'usermod -u 100 foo' }
|
19
23
|
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.18.
|
4
|
+
version: 2.18.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Gosuke Miyashita
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-03-
|
11
|
+
date: 2015-03-07 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: net-ssh
|