itamae 1.2.12 → 1.2.13

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: 47fe6f419701b8d6ea5e8e83de69f6ec2a613b84
4
- data.tar.gz: 4575a36969617f23fa01d53f058b2061bef21b2f
3
+ metadata.gz: b1f6dd38921987f3da2602ed39ac6442380a2fa9
4
+ data.tar.gz: 096bcdc139c46100637114b230f1fd210b30330c
5
5
  SHA512:
6
- metadata.gz: 4903252764a33d19b67966d9b8b3243ae886b1b1e0e8dc61610afd35b93aa77f3cf62d8f72a270ec327344564bdf56b489efc3708d8975701ca50e8355057423
7
- data.tar.gz: a4977c7fd756974df71c798a7d4034f76026239f1a9baf5291c3d70ff2df0859b6be4133236ba8d0029dfb5088ad83d8827bec5c1ae36af126be9644f2f352e1
6
+ metadata.gz: a344becac6dd490ab6dd5ef564a5c0de644ec3e9ce8427560ec4e4e0f9a5a16dc20e6cd6c8705d98b1ad65fe301e5837b44f9e300bfb66462335b3857e593413
7
+ data.tar.gz: 91e48dc9ef2169ed3f97a6f3b3e37800d555037f4c03638433aec1f3163e921113ec9c56ca9733cc68e499e490980c37c930de37f755275ddc324acb3f19c3ca
data/CHANGELOG.md CHANGED
@@ -1,3 +1,9 @@
1
+ ## v1.2.13
2
+
3
+ Features
4
+
5
+ - [Add "shell" attribute to user resource (by @toritori0318)](https://github.com/itamae-kitchen/itamae/pull/120)
6
+
1
7
  ## v1.2.12
2
8
 
3
9
  Bugfixes
data/itamae.gemspec CHANGED
@@ -18,7 +18,7 @@ Gem::Specification.new do |spec|
18
18
  spec.require_paths = ["lib"]
19
19
 
20
20
  spec.add_runtime_dependency "thor"
21
- spec.add_runtime_dependency "specinfra", [">= 2.26.1", "< 3.0.0"]
21
+ spec.add_runtime_dependency "specinfra", [">= 2.29.0", "< 3.0.0"]
22
22
  spec.add_runtime_dependency "hashie"
23
23
  spec.add_runtime_dependency "ansi"
24
24
  spec.add_runtime_dependency "schash", "~> 0.1.0"
@@ -10,6 +10,7 @@ module Itamae
10
10
  define_attribute :password, type: String
11
11
  define_attribute :system_user, type: [TrueClass, FalseClass]
12
12
  define_attribute :uid, type: Integer
13
+ define_attribute :shell, type: String
13
14
 
14
15
  def pre_action
15
16
  case @current_action
@@ -25,6 +26,7 @@ module Itamae
25
26
  current.uid = run_specinfra(:get_user_uid, attributes.username).stdout.strip.to_i
26
27
  current.gid = run_specinfra(:get_user_gid, attributes.username).stdout.strip.to_i
27
28
  current.home = run_specinfra(:get_user_home_directory, attributes.username).stdout.strip
29
+ current.shell = run_specinfra(:get_user_login_shell, attributes.username).stdout.strip
28
30
  current.password = current_password
29
31
  end
30
32
  end
@@ -50,6 +52,11 @@ module Itamae
50
52
  run_specinfra(:update_user_home_directory, attributes.username, attributes.home)
51
53
  updated!
52
54
  end
55
+
56
+ if attributes.shell && attributes.shell != current.shell
57
+ run_specinfra(:update_user_login_shell, attributes.username, attributes.shell)
58
+ updated!
59
+ end
53
60
  else
54
61
  options = {
55
62
  gid: attributes.gid,
@@ -57,6 +64,7 @@ module Itamae
57
64
  password: attributes.password,
58
65
  system_user: attributes.system_user,
59
66
  uid: attributes.uid,
67
+ shell: attributes.shell,
60
68
  }
61
69
 
62
70
  run_specinfra(:add_user, attributes.username, options)
@@ -1 +1 @@
1
- 1.2.12
1
+ 1.2.13
@@ -4,6 +4,7 @@ describe user("itamae") do
4
4
  it { should exist }
5
5
  it { should have_uid 1234 }
6
6
  it { should have_home_directory '/home/itamae' }
7
+ it { should have_login_shell '/bin/dash' }
7
8
  end
8
9
 
9
10
  describe file('/tmp/included_recipe') do
@@ -12,6 +12,7 @@ user "create itamae user" do
12
12
  username "itamae"
13
13
  password "$1$ltOY8bZv$iZ57f1KAp8jwKViNm3pze."
14
14
  home '/home/foo'
15
+ shell '/bin/sh'
15
16
  end
16
17
 
17
18
  user "update itamae user" do
@@ -19,6 +20,7 @@ user "update itamae user" do
19
20
  username "itamae"
20
21
  password "$1$TQz9gPMl$nHYrsA5W2ZdZ0Yn021BQH1"
21
22
  home '/home/itamae'
23
+ shell '/bin/dash'
22
24
  end
23
25
 
24
26
  ######
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: itamae
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.2.12
4
+ version: 1.2.13
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ryota Arai
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-04-11 00:00:00.000000000 Z
11
+ date: 2015-04-20 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: thor
@@ -30,7 +30,7 @@ dependencies:
30
30
  requirements:
31
31
  - - ">="
32
32
  - !ruby/object:Gem::Version
33
- version: 2.26.1
33
+ version: 2.29.0
34
34
  - - "<"
35
35
  - !ruby/object:Gem::Version
36
36
  version: 3.0.0
@@ -40,7 +40,7 @@ dependencies:
40
40
  requirements:
41
41
  - - ">="
42
42
  - !ruby/object:Gem::Version
43
- version: 2.26.1
43
+ version: 2.29.0
44
44
  - - "<"
45
45
  - !ruby/object:Gem::Version
46
46
  version: 3.0.0
@@ -262,7 +262,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
262
262
  version: '0'
263
263
  requirements: []
264
264
  rubyforge_project:
265
- rubygems_version: 2.2.2
265
+ rubygems_version: 2.4.5
266
266
  signing_key:
267
267
  specification_version: 4
268
268
  summary: Simple Configuration Management Tool