summaryrefslogtreecommitdiff
path: root/lib/chef/resource/scm.rb
diff options
context:
space:
mode:
Diffstat (limited to 'lib/chef/resource/scm.rb')
-rw-r--r--lib/chef/resource/scm.rb56
1 files changed, 42 insertions, 14 deletions
diff --git a/lib/chef/resource/scm.rb b/lib/chef/resource/scm.rb
index d8b4dd304a..9346405e53 100644
--- a/lib/chef/resource/scm.rb
+++ b/lib/chef/resource/scm.rb
@@ -24,22 +24,50 @@ class Chef
default_action :sync
allowed_actions :checkout, :export, :sync, :diff, :log
- property :destination, String, name_property: true, identity: true
+ property :destination, String,
+ description: "The location path to which the source is to be cloned, checked out, or exported. Default value: the name of the resource block.",
+ name_property: true, identity: true
+
property :repository, String
- property :revision, String, default: "HEAD"
- property :user, [String, Integer]
- property :group, [String, Integer]
- property :svn_username, String
- property :svn_password, String, sensitive: true, desired_state: false
+
+ property :revision, String,
+ description: "The revision to checkout.",
+ default: "HEAD"
+
+ property :user, [String, Integer],
+ description: "The system user that is responsible for the checked-out code."
+
+ property :group, [String, Integer],
+ description: "The system group that is responsible for the checked-out code."
+
# Capistrano and git-deploy use ``shallow clone''
- property :depth, Integer
- property :enable_submodules, [TrueClass, FalseClass], default: false
- property :enable_checkout, [TrueClass, FalseClass], default: true
- property :remote, String, default: "origin"
- property :ssh_wrapper, String, desired_state: false
- property :timeout, Integer, desired_state: false
- property :checkout_branch, String, default: "deploy"
- property :environment, [Hash, nil], default: nil
+ property :depth, Integer,
+ description: "The number of past revisions to be included in the git shallow clone. Unless specified the default behavior will do a full clone."
+
+ property :enable_submodules, [TrueClass, FalseClass],
+ description: "Perform a sub-module initialization and update.",
+ default: false
+
+ property :enable_checkout, [TrueClass, FalseClass],
+ description: "Check out a repo from master. Set to false when using the checkout_branch attribute to prevent the git resource from attempting to check out master from master.",
+ default: true
+
+ property :remote, String,
+ default: "origin"
+
+ property :ssh_wrapper, String,
+ desired_state: false
+
+ property :timeout, Integer,
+ desired_state: false
+
+ property :checkout_branch, String,
+ description: "Do a one-time checkout **or** use when a branch in the upstream repository is named 'deploy'. To prevent the resource from attempting to check out master from master, set 'enable_checkout' to 'false' when using the 'checkout_branch' property.",
+ default: "deploy"
+
+ property :environment, [Hash, nil],
+ description: "A Hash of environment variables in the form of ({'ENV_VARIABLE' => 'VALUE'}). (These variables must exist for a command to be run successfully.)",
+ default: nil
alias :env :environment
end