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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 2098a5cf976c9a9b33184b9c2a139b9e39af4886
4
- data.tar.gz: f3e4cd68569fc4dcea5bfa716a7c17ed4a73f539
3
+ metadata.gz: 78e4cd20118f7da1c280111157c3553b3fc480db
4
+ data.tar.gz: 08355f950af76fbb57ee56091635e026c41146da
5
5
  SHA512:
6
- metadata.gz: 38cfb0422b7010f59d18e3f1c67bea88a3ffb02175e793b169866ce2416e0ccb2e5470af5623ac5991b17031c2f8660266c1263e7d7f24526612bd06c0a58a78
7
- data.tar.gz: 4552288bd5ab6fc2295541eccfbe0b13f6bb011e17fbda7cbedadbf8fa8e239b5be0ec75fa50e370bc978b9822060ed8fff695ff8e86357f069a220c83ddefc7
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 = check_contains_with_fixed_strings("-", expected_pattern)
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)
@@ -1,3 +1,3 @@
1
1
  module Specinfra
2
- VERSION = "2.14.3"
2
+ VERSION = "2.14.4"
3
3
  end
@@ -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.3
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-20 00:00:00.000000000 Z
11
+ date: 2015-02-23 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: net-ssh