chef 11.8.4.ohai7.0-x86-mingw32 → 11.10.0.alpha.1-x86-mingw32

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.
Files changed (134) hide show
  1. checksums.yaml +7 -0
  2. data/distro/common/html/chef-client.8.html +3 -3
  3. data/distro/common/html/chef-expander.8.html +3 -3
  4. data/distro/common/html/chef-expanderctl.8.html +3 -3
  5. data/distro/common/html/chef-server-webui.8.html +3 -3
  6. data/distro/common/html/chef-server.8.html +3 -3
  7. data/distro/common/html/chef-shell.1.html +3 -3
  8. data/distro/common/html/chef-solo.8.html +3 -3
  9. data/distro/common/html/chef-solr.8.html +4 -4
  10. data/distro/common/html/knife-bootstrap.1.html +3 -3
  11. data/distro/common/html/knife-client.1.html +3 -3
  12. data/distro/common/html/knife-configure.1.html +3 -3
  13. data/distro/common/html/knife-cookbook-site.1.html +3 -3
  14. data/distro/common/html/knife-cookbook.1.html +3 -3
  15. data/distro/common/html/knife-data-bag.1.html +3 -3
  16. data/distro/common/html/knife-environment.1.html +3 -3
  17. data/distro/common/html/knife-exec.1.html +3 -3
  18. data/distro/common/html/knife-index.1.html +3 -3
  19. data/distro/common/html/knife-node.1.html +3 -3
  20. data/distro/common/html/knife-role.1.html +3 -3
  21. data/distro/common/html/knife-search.1.html +3 -3
  22. data/distro/common/html/knife-ssh.1.html +3 -3
  23. data/distro/common/html/knife-status.1.html +3 -3
  24. data/distro/common/html/knife-tag.1.html +3 -3
  25. data/distro/common/html/knife.1.html +3 -3
  26. data/distro/common/man/man8/chef-client.8 +3 -3
  27. data/distro/common/man/man8/chef-solo.8 +5 -2
  28. data/lib/chef.rb +2 -0
  29. data/lib/chef/application.rb +7 -2
  30. data/lib/chef/application/apply.rb +6 -0
  31. data/lib/chef/application/client.rb +3 -1
  32. data/lib/chef/application/knife.rb +2 -0
  33. data/lib/chef/application/solo.rb +1 -1
  34. data/lib/chef/client.rb +14 -11
  35. data/lib/chef/config.rb +4 -1
  36. data/lib/chef/cookbook_uploader.rb +14 -7
  37. data/lib/chef/encrypted_data_bag_item.rb +6 -303
  38. data/lib/chef/encrypted_data_bag_item/decryption_failure.rb +22 -0
  39. data/lib/chef/encrypted_data_bag_item/decryptor.rb +201 -0
  40. data/lib/chef/encrypted_data_bag_item/encryptor.rb +142 -0
  41. data/lib/chef/encrypted_data_bag_item/unacceptable_encrypted_data_bag_item_format.rb +22 -0
  42. data/lib/chef/encrypted_data_bag_item/unsupported_cipher.rb +22 -0
  43. data/lib/chef/encrypted_data_bag_item/unsupported_encrypted_data_bag_item_format.rb +22 -0
  44. data/lib/chef/exceptions.rb +1 -0
  45. data/lib/chef/formatters/doc.rb +19 -3
  46. data/lib/chef/http/basic_client.rb +1 -1
  47. data/lib/chef/http/http_request.rb +7 -0
  48. data/lib/chef/knife.rb +8 -1
  49. data/lib/chef/knife/bootstrap.rb +1 -1
  50. data/lib/chef/knife/cookbook_site_share.rb +2 -2
  51. data/lib/chef/knife/cookbook_upload.rb +7 -1
  52. data/lib/chef/knife/core/subcommand_loader.rb +2 -2
  53. data/lib/chef/knife/data_bag_create.rb +7 -0
  54. data/lib/chef/knife/environment_compare.rb +127 -0
  55. data/lib/chef/mixin/command.rb +11 -12
  56. data/lib/chef/mixin/deep_merge.rb +4 -4
  57. data/lib/chef/monkey_patches/net_http.rb +34 -0
  58. data/lib/chef/monkey_patches/uri.rb +70 -0
  59. data/lib/chef/platform/provider_mapping.rb +1 -0
  60. data/lib/chef/provider/cookbook_file.rb +8 -0
  61. data/lib/chef/provider/cron.rb +1 -1
  62. data/lib/chef/provider/directory.rb +7 -0
  63. data/lib/chef/provider/file.rb +17 -4
  64. data/lib/chef/provider/git.rb +23 -5
  65. data/lib/chef/provider/group.rb +30 -11
  66. data/lib/chef/provider/group/dscl.rb +26 -4
  67. data/lib/chef/provider/group/gpasswd.rb +14 -19
  68. data/lib/chef/provider/group/groupadd.rb +41 -1
  69. data/lib/chef/provider/group/groupmod.rb +46 -36
  70. data/lib/chef/provider/group/pw.rb +59 -16
  71. data/lib/chef/provider/group/suse.rb +16 -13
  72. data/lib/chef/provider/group/usermod.rb +38 -15
  73. data/lib/chef/provider/group/windows.rb +13 -6
  74. data/lib/chef/provider/ohai.rb +5 -6
  75. data/lib/chef/provider/remote_file.rb +8 -0
  76. data/lib/chef/provider/template.rb +8 -0
  77. data/lib/chef/provider/user.rb +5 -1
  78. data/lib/chef/provider/user/useradd.rb +7 -0
  79. data/lib/chef/provider/whyrun_safe_ruby_block.rb +30 -0
  80. data/lib/chef/providers.rb +1 -0
  81. data/lib/chef/resource/deploy.rb +18 -0
  82. data/lib/chef/resource/group.rb +11 -0
  83. data/lib/chef/resource/scm.rb +18 -0
  84. data/lib/chef/resource/whyrun_safe_ruby_block.rb +31 -0
  85. data/lib/chef/resources.rb +1 -0
  86. data/lib/chef/run_context.rb +11 -0
  87. data/lib/chef/shell/ext.rb +1 -1
  88. data/lib/chef/util/windows/net_group.rb +5 -1
  89. data/lib/chef/version.rb +1 -1
  90. data/spec/functional/resource/base.rb +3 -1
  91. data/spec/functional/resource/deploy_revision_spec.rb +1 -1
  92. data/spec/functional/resource/git_spec.rb +1 -1
  93. data/spec/functional/resource/group_spec.rb +257 -118
  94. data/spec/integration/client/client_spec.rb +82 -8
  95. data/spec/integration/client/ipv6_spec.rb +133 -0
  96. data/spec/integration/knife/cookbook_api_ipv6_spec.rb +111 -0
  97. data/spec/scripts/ssl-serve.rb +52 -0
  98. data/spec/spec_helper.rb +7 -6
  99. data/spec/support/platform_helpers.rb +21 -0
  100. data/spec/support/shared/functional/windows_script.rb +2 -1
  101. data/spec/support/shared/unit/provider/file.rb +181 -43
  102. data/spec/support/shared/unit/provider/useradd_based_user_provider.rb +18 -0
  103. data/spec/unit/application/client_spec.rb +1 -0
  104. data/spec/unit/client_spec.rb +14 -1
  105. data/spec/unit/config_spec.rb +20 -0
  106. data/spec/unit/encrypted_data_bag_item_spec.rb +32 -18
  107. data/spec/unit/knife/cookbook_upload_spec.rb +14 -0
  108. data/spec/unit/knife/core/subcommand_loader_spec.rb +2 -2
  109. data/spec/unit/knife/data_bag_create_spec.rb +7 -0
  110. data/spec/unit/knife/environment_compare_spec.rb +112 -0
  111. data/spec/unit/knife_spec.rb +6 -1
  112. data/spec/unit/monkey_patches/uri_spec.rb +34 -0
  113. data/spec/unit/provider/cookbook_file_spec.rb +2 -1
  114. data/spec/unit/provider/cron_spec.rb +6 -0
  115. data/spec/unit/provider/file_spec.rb +3 -1
  116. data/spec/unit/provider/git_spec.rb +28 -4
  117. data/spec/unit/provider/group/dscl_spec.rb +1 -0
  118. data/spec/unit/provider/group/gpasswd_spec.rb +16 -9
  119. data/spec/unit/provider/group/groupadd_spec.rb +3 -4
  120. data/spec/unit/provider/group/groupmod_spec.rb +0 -1
  121. data/spec/unit/provider/group/pw_spec.rb +11 -14
  122. data/spec/unit/provider/group/usermod_spec.rb +19 -4
  123. data/spec/unit/provider/group/windows_spec.rb +0 -8
  124. data/spec/unit/provider/group_spec.rb +26 -4
  125. data/spec/unit/provider/ohai_spec.rb +1 -0
  126. data/spec/unit/provider/remote_file_spec.rb +4 -3
  127. data/spec/unit/provider/template_spec.rb +5 -3
  128. data/spec/unit/provider/user_spec.rb +6 -0
  129. data/spec/unit/provider/whyrun_safe_ruby_block_spec.rb +47 -0
  130. data/spec/unit/resource/scm_spec.rb +10 -0
  131. data/spec/unit/rest/auth_credentials_spec.rb +4 -1
  132. data/spec/unit/rest_spec.rb +12 -3
  133. metadata +69 -121
  134. data/spec/functional/resource/ohai_spec.rb +0 -65
@@ -39,16 +39,28 @@ class Chef
39
39
  def create_group
40
40
  command = "pw groupadd"
41
41
  command << set_options
42
- command << set_members_option
43
- run_command(:command => command)
42
+ member_options = set_members_options
43
+ if member_options.empty?
44
+ run_command(:command => command)
45
+ else
46
+ member_options.each do |option|
47
+ run_command(:command => command + option)
48
+ end
49
+ end
44
50
  end
45
51
 
46
52
  # Manage the group when it already exists
47
53
  def manage_group
48
54
  command = "pw groupmod"
49
55
  command << set_options
50
- command << set_members_option
51
- run_command(:command => command)
56
+ member_options = set_members_options
57
+ if member_options.empty?
58
+ run_command(:command => command)
59
+ else
60
+ member_options.each do |option|
61
+ run_command(:command => command + option)
62
+ end
63
+ end
52
64
  end
53
65
 
54
66
  # Remove the group
@@ -70,21 +82,52 @@ class Chef
70
82
  end
71
83
 
72
84
  # Set the membership option depending on the current resource states
73
- def set_members_option
74
- opt = ""
75
- unless @new_resource.members.empty?
76
- opt << " -M #{@new_resource.members.join(',')}"
77
- Chef::Log.debug("#{@new_resource} setting group members to #{@new_resource.members.join(', ')}")
85
+ def set_members_options
86
+ opts = [ ]
87
+ members_to_be_added = [ ]
88
+ members_to_be_removed = [ ]
89
+
90
+ if @new_resource.append
91
+ # Append is set so we will only add members given in the
92
+ # members list and remove members given in the
93
+ # excluded_members list.
94
+ if @new_resource.members && !@new_resource.members.empty?
95
+ @new_resource.members.each do |member|
96
+ members_to_be_added << member if !@current_resource.members.include?(member)
97
+ end
98
+ end
99
+
100
+ if @new_resource.excluded_members && !@new_resource.excluded_members.empty?
101
+ @new_resource.excluded_members.each do |member|
102
+ members_to_be_removed << member if @current_resource.members.include?(member)
103
+ end
104
+ end
78
105
  else
79
- # New member list is empty so we should delete any old group members
80
- unless @current_resource.members.empty?
81
- opt << " -d #{@current_resource.members.join(',')}"
82
- Chef::Log.debug("#{@new_resource} removing group members #{@current_resource.members.join(', ')}")
83
- else
84
- Chef::Log.debug("#{@new_resource} not changing group members, the group has no members")
106
+ # Append is not set so we're resetting the membership of
107
+ # the group to the given members.
108
+ members_to_be_added = @new_resource.members
109
+ @current_resource.members.each do |member|
110
+ # No need to re-add a member if it's present in the new
111
+ # list of members
112
+ if members_to_be_added.include? member
113
+ members_to_be_added.delete member
114
+ else
115
+ members_to_be_removed << member
116
+ end
85
117
  end
86
118
  end
87
- opt
119
+
120
+ unless members_to_be_added.empty?
121
+ Chef::Log.debug("#{@new_resource} adding group members: #{members_to_be_added.join(',')}")
122
+ opts << " -m #{members_to_be_added.join(',')}"
123
+ end
124
+
125
+ unless members_to_be_removed.empty?
126
+ Chef::Log.debug("#{@new_resource} removing group members: #{members_to_be_removed.join(',')}")
127
+ opts << " -d #{members_to_be_removed.join(',')}"
128
+ end
129
+
130
+ opts
88
131
  end
89
132
 
90
133
  end
@@ -39,21 +39,24 @@ class Chef
39
39
  end
40
40
  end
41
41
 
42
- def modify_group_members
43
- unless @new_resource.members.empty?
44
- if(@new_resource.append)
45
- @new_resource.members.each do |member|
46
- Chef::Log.debug("#{@new_resource} appending member #{member} to group #{@new_resource.group_name}")
47
- shell_out!("groupmod -A #{member} #{@new_resource.group_name}")
48
- end
49
- else
50
- Chef::Log.debug("#{@new_resource} setting group members to #{@new_resource.members.join(', ')}")
51
- shell_out!("groupmod -A #{@new_resource.members.join(',')} #{@new_resource.group_name}")
52
- end
53
- else
54
- Chef::Log.debug("#{@new_resource} not changing group members, the group has no members")
42
+ def set_members(members)
43
+ unless @current_resource.members.empty?
44
+ shell_out!("groupmod -R #{@current_resource.members.join(',')} #{@new_resource.group_name}")
55
45
  end
46
+
47
+ unless members.empty?
48
+ shell_out!("groupmod -A #{members.join(',')} #{@new_resource.group_name}")
49
+ end
50
+ end
51
+
52
+ def add_member(member)
53
+ shell_out!("groupmod -A #{member} #{@new_resource.group_name}")
56
54
  end
55
+
56
+ def remove_member(member)
57
+ shell_out!("groupmod -R #{member} #{@new_resource.group_name}")
58
+ end
59
+
57
60
  end
58
61
  end
59
62
  end
@@ -17,12 +17,15 @@
17
17
  #
18
18
 
19
19
  require 'chef/provider/group/groupadd'
20
+ require 'chef/mixin/shell_out'
20
21
 
21
22
  class Chef
22
23
  class Provider
23
24
  class Group
24
25
  class Usermod < Chef::Provider::Group::Groupadd
25
26
 
27
+ include Chef::Mixin::ShellOut
28
+
26
29
  def load_current_resource
27
30
  super
28
31
  end
@@ -36,32 +39,52 @@ class Chef
36
39
  # No whyrun alternative: this component should be available in the base install of any given system that uses it
37
40
  end
38
41
 
39
- requirements.assert(:modify, :create) do |a|
42
+ requirements.assert(:modify, :manage) do |a|
40
43
  a.assertion { @new_resource.members.empty? || @new_resource.append }
41
44
  a.failure_message Chef::Exceptions::Group, "setting group members directly is not supported by #{self.to_s}, must set append true in group"
42
45
  # No whyrun alternative - this action is simply not supported.
43
46
  end
44
- end
45
47
 
46
- def modify_group_members
47
- case node[:platform]
48
- when "openbsd", "netbsd", "aix", "solaris2", "smartos"
49
- append_flags = "-G"
50
- when "solaris", "suse", "opensuse"
51
- append_flags = "-a -G"
48
+ requirements.assert(:all_actions) do |a|
49
+ a.assertion { @new_resource.excluded_members.empty? }
50
+ a.failure_message Chef::Exceptions::Group, "excluded_members is not supported by #{self.to_s}"
51
+ # No whyrun alternative - this action is simply not supported.
52
52
  end
53
+ end
53
54
 
54
- unless @new_resource.members.empty?
55
- if(@new_resource.append)
56
- @new_resource.members.each do |member|
57
- Chef::Log.debug("#{@new_resource} appending member #{member} to group #{@new_resource.group_name}")
58
- run_command(:command => "usermod #{append_flags} #{@new_resource.group_name} #{member}" )
59
- end
55
+ def set_members(members)
56
+ return if members.empty?
57
+ # This provider only supports adding members with
58
+ # append. Only if the action is create we will go
59
+ # ahead and add members.
60
+ if @new_resource.action == :create
61
+ members.each do |member|
62
+ add_member(member)
60
63
  end
61
64
  else
62
- Chef::Log.debug("#{@new_resource} not changing group members, the group has no members")
65
+ raise Chef::Exceptions::UnsupportedAction, "Setting members directly is not supported by #{self.to_s}"
63
66
  end
64
67
  end
68
+
69
+ def add_member(member)
70
+ shell_out!("usermod #{append_flags} #{@new_resource.group_name} #{member}")
71
+ end
72
+
73
+ def remove_member(member)
74
+ # This provider only supports adding members with
75
+ # append. This function should never be called.
76
+ raise Chef::Exceptions::UnsupportedAction, "Removing members members is not supported by #{self.to_s}"
77
+ end
78
+
79
+ def append_flags
80
+ case node[:platform]
81
+ when "openbsd", "netbsd", "aix", "solaris2", "smartos"
82
+ "-G"
83
+ when "solaris", "suse", "opensuse"
84
+ "-a -G"
85
+ end
86
+ end
87
+
65
88
  end
66
89
  end
67
90
  end
@@ -57,13 +57,20 @@ class Chef
57
57
 
58
58
  def manage_group
59
59
  if @new_resource.append
60
- begin
61
- #ERROR_MEMBER_IN_ALIAS if a member already exists in the group
62
- @net_group.local_add_members(@new_resource.members)
63
- rescue
64
- members = @new_resource.members + @current_resource.members
65
- @net_group.local_set_members(members.uniq)
60
+ members_to_be_added = [ ]
61
+ @new_resource.members.each do |member|
62
+ members_to_be_added << member if !@current_resource.members.include?(member)
66
63
  end
64
+
65
+ # local_add_members will raise ERROR_MEMBER_IN_ALIAS if a
66
+ # member already exists in the group.
67
+ @net_group.local_add_members(members_to_be_added) unless members_to_be_added.empty?
68
+
69
+ members_to_be_removed = [ ]
70
+ @new_resource.excluded_members.each do |member|
71
+ members_to_be_removed << member if @current_resource.members.include?(member)
72
+ end
73
+ @net_group.local_delete_members(members_to_be_removed) unless members_to_be_removed.empty?
67
74
  else
68
75
  @net_group.local_set_members(@new_resource.members)
69
76
  end
@@ -33,12 +33,11 @@ class Chef
33
33
  def action_reload
34
34
  converge_by("re-run ohai and merge results into node attributes") do
35
35
  ohai = ::Ohai::System.new
36
-
37
- # If @new_resource.plugin is nil, ohai will reload all the plugins
38
- # Otherwise it will only reload the specified plugin
39
- # Note that any changes to plugins, or new plugins placed on
40
- # the path are picked up by ohai.
41
- ohai.all_plugins @new_resource.plugin
36
+ if @new_resource.plugin
37
+ ohai.require_plugin @new_resource.plugin
38
+ else
39
+ ohai.all_plugins
40
+ end
42
41
  node.automatic_attrs.merge! ohai.data
43
42
  Chef::Log.info("#{@new_resource} reloaded")
44
43
  end
@@ -39,6 +39,14 @@ class Chef
39
39
  super
40
40
  end
41
41
 
42
+ private
43
+
44
+ def managing_content?
45
+ return true if @new_resource.checksum
46
+ return true if !@new_resource.source.nil? && @action != :create_if_missing
47
+ false
48
+ end
49
+
42
50
  end
43
51
  end
44
52
  end
@@ -52,6 +52,14 @@ class Chef
52
52
  end
53
53
  end
54
54
 
55
+ private
56
+
57
+ def managing_content?
58
+ return true if @new_resource.checksum
59
+ return true if !@new_resource.source.nil? && @action != :create_if_missing
60
+ false
61
+ end
62
+
55
63
  end
56
64
  end
57
65
  end
@@ -63,11 +63,15 @@ class Chef
63
63
  if user_info
64
64
  @current_resource.uid(user_info.uid)
65
65
  @current_resource.gid(user_info.gid)
66
- @current_resource.comment(user_info.gecos)
67
66
  @current_resource.home(user_info.dir)
68
67
  @current_resource.shell(user_info.shell)
69
68
  @current_resource.password(user_info.passwd)
70
69
 
70
+ if @new_resource.comment && user_info.gecos.respond_to?(:force_encoding)
71
+ user_info.gecos.force_encoding(@new_resource.comment.encoding)
72
+ end
73
+ @current_resource.comment(user_info.gecos)
74
+
71
75
  if @new_resource.password && @current_resource.password == 'x'
72
76
  begin
73
77
  require 'shadow'
@@ -57,6 +57,13 @@ class Chef
57
57
  # we can get an exit code of 1 even when it's successful on
58
58
  # rhel/centos (redhat bug 578534). See additional error checks below.
59
59
  passwd_s = shell_out!("passwd", "-S", new_resource.username, :returns => [0,1])
60
+ if whyrun_mode? && passwd_s.stdout.empty? && passwd_s.stderr.match(/does not exist/)
61
+ # if we're in whyrun mode and the user is not yet created we assume it would be
62
+ return false
63
+ end
64
+
65
+ raise Chef::Exceptions::User, "Cannot determine if #{@new_resource} is locked!" if passwd_s.stdout.empty?
66
+
60
67
  status_line = passwd_s.stdout.split(' ')
61
68
  case status_line[1]
62
69
  when /^P/
@@ -0,0 +1,30 @@
1
+ #
2
+ # Author:: Phil Dibowitz (<phild@fb.com>)
3
+ # Copyright:: Copyright (c) 2013 Facebook
4
+ # License:: Apache License, Version 2.0
5
+ #
6
+ # Licensed under the Apache License, Version 2.0 (the "License");
7
+ # you may not use this file except in compliance with the License.
8
+ # You may obtain a copy of the License at
9
+ #
10
+ # http://www.apache.org/licenses/LICENSE-2.0
11
+ #
12
+ # Unless required by applicable law or agreed to in writing, software
13
+ # distributed under the License is distributed on an "AS IS" BASIS,
14
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15
+ # See the License for the specific language governing permissions and
16
+ # limitations under the License.
17
+ #
18
+
19
+ class Chef
20
+ class Provider
21
+ class WhyrunSafeRubyBlock < Chef::Provider::RubyBlock
22
+ def action_create
23
+ @new_resource.block.call
24
+ @new_resource.updated_by_last_action(true)
25
+ @run_context.events.resource_update_applied(@new_resource, :create, "execute the whyrun_safe_ruby_block #{@new_resource.name}")
26
+ Chef::Log.info("#{@new_resource} called")
27
+ end
28
+ end
29
+ end
30
+ end
@@ -48,6 +48,7 @@ require 'chef/provider/service'
48
48
  require 'chef/provider/subversion'
49
49
  require 'chef/provider/template'
50
50
  require 'chef/provider/user'
51
+ require 'chef/provider/whyrun_safe_ruby_block'
51
52
 
52
53
  require 'chef/provider/env/windows'
53
54
 
@@ -81,6 +81,8 @@ class Chef
81
81
  @allowed_actions.push(:force_deploy, :deploy, :rollback)
82
82
  @additional_remotes = Hash[]
83
83
  @keep_releases = 5
84
+ @enable_checkout = true
85
+ @checkout_branch = "deploy"
84
86
  end
85
87
 
86
88
  # where the checked out/cloned code goes
@@ -398,6 +400,22 @@ class Chef
398
400
  )
399
401
  end
400
402
 
403
+ def enable_checkout(arg=nil)
404
+ set_or_return(
405
+ :enable_checkout,
406
+ arg,
407
+ :kind_of => [TrueClass, FalseClass]
408
+ )
409
+ end
410
+
411
+ def checkout_branch(arg=nil)
412
+ set_or_return(
413
+ :checkout_branch,
414
+ arg,
415
+ :kind_of => String
416
+ )
417
+ end
418
+
401
419
  # FIXME The Deploy resource may be passed to an SCM provider as its
402
420
  # resource. The SCM provider knows that SCM resources can specify a
403
421
  # timeout for SCM operations. The deploy resource must therefore support
@@ -31,6 +31,7 @@ class Chef
31
31
  @group_name = name
32
32
  @gid = nil
33
33
  @members = []
34
+ @excluded_members = []
34
35
  @action = :create
35
36
  @append = false
36
37
  @non_unique = false
@@ -64,6 +65,16 @@ class Chef
64
65
 
65
66
  alias_method :users, :members
66
67
 
68
+ def excluded_members(arg=nil)
69
+ converted_members = arg.is_a?(String) ? [].push(arg) : arg
70
+ set_or_return(
71
+ :excluded_members,
72
+ converted_members,
73
+ :kind_of => [ Array ]
74
+ )
75
+ end
76
+
77
+
67
78
  def append(arg=nil)
68
79
  set_or_return(
69
80
  :append,
@@ -32,12 +32,14 @@ class Chef
32
32
  @destination = name
33
33
  @resource_name = :scm
34
34
  @enable_submodules = false
35
+ @enable_checkout = true
35
36
  @revision = "HEAD"
36
37
  @remote = "origin"
37
38
  @ssh_wrapper = nil
38
39
  @depth = nil
39
40
  @allowed_actions.push(:checkout, :export, :sync, :diff, :log)
40
41
  @action = [:sync]
42
+ @checkout_branch = "deploy"
41
43
  end
42
44
 
43
45
  def destination(arg=nil)
@@ -130,6 +132,14 @@ class Chef
130
132
  )
131
133
  end
132
134
 
135
+ def enable_checkout(arg=nil)
136
+ set_or_return(
137
+ :enable_checkout,
138
+ arg,
139
+ :kind_of => [TrueClass, FalseClass]
140
+ )
141
+ end
142
+
133
143
  def remote(arg=nil)
134
144
  set_or_return(
135
145
  :remote,
@@ -154,6 +164,14 @@ class Chef
154
164
  )
155
165
  end
156
166
 
167
+ def checkout_branch(arg=nil)
168
+ set_or_return(
169
+ :checkout_branch,
170
+ arg,
171
+ :kind_of => String
172
+ )
173
+ end
174
+
157
175
  end
158
176
  end
159
177
  end