specinfra 2.57.2 → 2.57.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: 6afabdf7ed8f74bc40fc9edf538a0b2b9726089b
4
- data.tar.gz: ed32f8006f73e8394ee63aee2f8f6ec4ff078698
3
+ metadata.gz: ea6a32d408ee5720f358dc9f52fe186e953899b0
4
+ data.tar.gz: d13f590f7f81dedb3945db4711ac799389afd583
5
5
  SHA512:
6
- metadata.gz: b0c59a2c069bf9b8ccca52d724b5044bce83d9f438606d7748399b3476b432198f2f18eb210a4195f19658a61596bc542316d95a18d30fa291c926d895a0a2f9
7
- data.tar.gz: cf7dff8d0a6aee1cafb651733d1a0a0ca1fd4e7d6edad0db8dc020637f5aba5548ee237e12799067e4d6753c8951e26fb749455349ed3d9fc79e29ff11679faa
6
+ metadata.gz: 3c0f38b754bb0494d374254d36ec916be0bebb34d73531c9c6d049601b731d8018a7ee9160e47194ee4d94530ddb182be5168b1d61e8947945ee4c4a5b8bd938
7
+ data.tar.gz: 1ad6f4144626f5c4f435a08290466e35b55e45866411839c681ffbdff848778a08ba4fd5ae80a0ff0221f306e9f682d94444329e91f6b02c815a4ac75cb0da72
@@ -122,11 +122,11 @@ module Specinfra
122
122
 
123
123
  pid = spawn(cmd, :out => out_w, :err => err_w)
124
124
 
125
+ pid, stats = Process.waitpid2(pid)
126
+
125
127
  out_w.close
126
128
  err_w.close
127
129
 
128
- pid, stats = Process.waitpid2(pid)
129
-
130
130
  begin
131
131
  quit_w.syswrite 1
132
132
  rescue Errno::EPIPE
@@ -5,7 +5,7 @@ class Specinfra::Command::Base::User < Specinfra::Command::Base
5
5
  end
6
6
 
7
7
  def check_belongs_to_group(user, group)
8
- "id #{escape(user)} | sed 's/ context=.*//g' |awk -F= '{print $4}' | grep -- #{escape(group)}"
8
+ "id #{escape(user)} | sed 's/ context=.*//g' | cut -f 4 -d '=' | grep -- #{escape(group)}"
9
9
  end
10
10
 
11
11
  def check_belongs_to_primary_group(user, group)
@@ -31,11 +31,11 @@ class Specinfra::Command::Base::User < Specinfra::Command::Base
31
31
  end
32
32
 
33
33
  def get_minimum_days_between_password_change(user)
34
- "chage -l #{escape(user)} | grep '^Minimum.*:' | awk -F ': ' '{print $2}'"
34
+ "chage -l #{escape(user)} | grep '^Minimum.*:' | cut -f 2 -d ': '"
35
35
  end
36
36
 
37
37
  def get_maximum_days_between_password_change(user)
38
- "chage -l #{escape(user)} | grep '^Maximum.*:' | awk -F ': ' '{print $2}'"
38
+ "chage -l #{escape(user)} | grep '^Maximum.*:' | cut -f 2 -d ': '"
39
39
  end
40
40
 
41
41
  def get_uid(user)
@@ -47,7 +47,7 @@ class Specinfra::Command::Base::User < Specinfra::Command::Base
47
47
  end
48
48
 
49
49
  def get_home_directory(user)
50
- "getent passwd #{escape(user)} | awk -F: '{ print $6 }'"
50
+ "getent passwd #{escape(user)} | cut -f 6 -d ':'"
51
51
  end
52
52
 
53
53
  def get_login_shell(user)
@@ -88,7 +88,7 @@ class Specinfra::Command::Base::User < Specinfra::Command::Base
88
88
  end
89
89
 
90
90
  def get_encrypted_password(user)
91
- "getent shadow #{escape(user)} | awk -F: '{ print $2 }'"
91
+ "getent shadow #{escape(user)} | cut -f 2 -d ':'"
92
92
  end
93
93
  end
94
94
  end
@@ -1,3 +1,3 @@
1
1
  module Specinfra
2
- VERSION = "2.57.2"
2
+ VERSION = "2.57.3"
3
3
  end
@@ -11,7 +11,7 @@ describe get_command(:get_user_gid, 'foo') do
11
11
  end
12
12
 
13
13
  describe get_command(:get_user_home_directory, 'foo') do
14
- it { should eq "getent passwd foo | awk -F: '{ print $6 }'" }
14
+ it { should eq "getent passwd foo | cut -f 6 -d ':'" }
15
15
  end
16
16
 
17
17
  describe get_command(:update_user_home_directory, 'user', 'dir') do
@@ -35,7 +35,7 @@ describe get_command(:update_user_encrypted_password, 'foo', 'xxxxxxxx') do
35
35
  end
36
36
 
37
37
  describe get_command(:get_user_encrypted_password, 'foo') do
38
- it { should eq "getent shadow foo | awk -F: '{ print $2 }'" }
38
+ it { should eq "getent shadow foo | cut -f 2 -d ':'" }
39
39
  end
40
40
 
41
41
  describe get_command(:check_user_has_login_shell, 'foo', '/bin/sh') do
@@ -43,11 +43,11 @@ describe get_command(:check_user_has_login_shell, 'foo', '/bin/sh') do
43
43
  end
44
44
 
45
45
  describe get_command(:get_user_minimum_days_between_password_change, 'foo') do
46
- it { should eq "chage -l foo | grep '^Minimum.*:' | awk -F ': ' '{print $2}'" }
46
+ it { should eq "chage -l foo | grep '^Minimum.*:' | cut -f 2 -d ': '" }
47
47
  end
48
48
 
49
49
  describe get_command(:get_user_maximum_days_between_password_change, 'foo') do
50
- it { should eq "chage -l foo | grep '^Maximum.*:' | awk -F ': ' '{print $2}'" }
50
+ it { should eq "chage -l foo | grep '^Maximum.*:' | cut -f 2 -d ': '" }
51
51
  end
52
52
 
53
53
  describe get_command(:get_user_login_shell, 'foo') do
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.57.2
4
+ version: 2.57.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: 2016-05-03 00:00:00.000000000 Z
11
+ date: 2016-05-20 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: net-scp