specinfra 2.18.2 → 2.18.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
  SHA1:
3
- metadata.gz: 02ae335e1959787204447d1b773a79a39c266953
4
- data.tar.gz: d69f35462442aa8478066d3133a42031082e8759
3
+ metadata.gz: cbffd79911b524f8816754369992ddf5efbb7a44
4
+ data.tar.gz: 3a35dc80f90c08b6e6c05afdcc8a7c80a1f4afe0
5
5
  SHA512:
6
- metadata.gz: 954e34b845d79e6a63dbae19abbc4898f3f722be54b7131bb24fdc73e74f67271a8cb29a094d76d72bdf3027652c4e7a3ef8bb4b7c1a00e78c5c3c956e7f2370
7
- data.tar.gz: 7ea174d5fe37d3d81b905902796df74ec27d796529c1f24797b7c55ffa928a0b77d1c6f33bc69ef086475ca05b07e5798894fa80aea12d153cb28efaeeb8002a
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
@@ -1,3 +1,3 @@
1
1
  module Specinfra
2
- VERSION = "2.18.2"
2
+ VERSION = "2.18.3"
3
3
  end
@@ -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.2
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-06 00:00:00.000000000 Z
11
+ date: 2015-03-07 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: net-ssh