specinfra 2.14.3 → 2.14.4
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 +4 -4
- data/lib/specinfra/command/base/file.rb +2 -2
- data/lib/specinfra/command/base/user.rb +1 -0
- data/lib/specinfra/version.rb +1 -1
- data/spec/command/base/user_spec.rb +2 -2
- 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: 78e4cd20118f7da1c280111157c3553b3fc480db
|
4
|
+
data.tar.gz: 08355f950af76fbb57ee56091635e026c41146da
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 877f03d84359256870c26860e03b99364f6153c1e2ceb502ff5478b25a1945d9eece9f118794a9d34ab5107042404203906477539f87f5aada1b0b6e644562e2
|
7
|
+
data.tar.gz: 59cc1afa0bd36ea01ca1f90d9f6c8557a13522d8ce78fb25b8645ac77fd7e553dd262b4a058d4c871fab3de4eb0f7adc2322b7fe57730644591364bfcc581032
|
@@ -53,7 +53,7 @@ class Specinfra::Command::Base::File < Specinfra::Command::Base
|
|
53
53
|
sed = "sed -n #{escape(from)},#{escape(to)}p #{escape(file)}"
|
54
54
|
sed += " | sed -n 1,#{escape(to)}p" if from != '1' and to != '$'
|
55
55
|
checker_with_regexp = check_contains_with_regexp("-", expected_pattern)
|
56
|
-
checker_with_fixed
|
56
|
+
checker_with_fixed = check_contains_with_fixed_strings("-", expected_pattern)
|
57
57
|
"#{sed} | #{checker_with_regexp} || #{sed} | #{checker_with_fixed}"
|
58
58
|
end
|
59
59
|
|
@@ -85,7 +85,7 @@ class Specinfra::Command::Base::File < Specinfra::Command::Base
|
|
85
85
|
end
|
86
86
|
|
87
87
|
def get_content(file)
|
88
|
-
"cat #{file} 2> /dev/null || echo -n"
|
88
|
+
"cat #{escape(file)} 2> /dev/null || echo -n"
|
89
89
|
end
|
90
90
|
|
91
91
|
def check_is_mounted(path)
|
@@ -55,6 +55,7 @@ class Specinfra::Command::Base::User < Specinfra::Command::Base
|
|
55
55
|
command << '-g' << escape(options[:gid]) if options[:gid]
|
56
56
|
command << '-d' << escape(options[:home_directory]) if options[:home_directory]
|
57
57
|
command << '-p' << escape(options[:password]) if options[:password]
|
58
|
+
command << '-m' if options[:create_home]
|
58
59
|
command << '-r' if options[:system_user]
|
59
60
|
command << '-u' << escape(options[:uid]) if options[:uid]
|
60
61
|
command << escape(user)
|
data/lib/specinfra/version.rb
CHANGED
@@ -22,8 +22,8 @@ describe get_command(:update_user_gid, 'foo', 100) do
|
|
22
22
|
it { should eq 'usermod -g 100 foo' }
|
23
23
|
end
|
24
24
|
|
25
|
-
describe get_command(:add_user, 'foo', :home_directory => '/home/foo', :password => '$6$foo/bar') do
|
26
|
-
it { should eq 'useradd -d /home/foo -p \$6\$foo/bar foo' }
|
25
|
+
describe get_command(:add_user, 'foo', :home_directory => '/home/foo', :password => '$6$foo/bar', :create_home => true) do
|
26
|
+
it { should eq 'useradd -d /home/foo -p \$6\$foo/bar -m foo' }
|
27
27
|
end
|
28
28
|
|
29
29
|
describe get_command(:update_user_encrypted_password, 'foo', 'xxxxxxxx') 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.14.
|
4
|
+
version: 2.14.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: 2015-02-
|
11
|
+
date: 2015-02-23 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: net-ssh
|