diff options
author | Tim Smith <tsmith@chef.io> | 2018-09-14 22:22:55 -0700 |
---|---|---|
committer | Tim Smith <tsmith@chef.io> | 2018-09-14 22:22:55 -0700 |
commit | 2ba7faa003167620b818975247f8c0401a74c405 (patch) | |
tree | 1947d6c382aec6c0c2fee51adec4fe5cb6da2495 /lib/chef/resource/scm.rb | |
parent | 97fc6a7e948c4982f0b62d9d9162b1679e26cde6 (diff) | |
download | chef-2ba7faa003167620b818975247f8c0401a74c405.tar.gz |
Move subversion properties out of scm and into subversionscm
This way we're not polluting the git resource with the subversion properties. Cleans up our docs generation a bit. I added some property descriptions while I was in there.
Signed-off-by: Tim Smith <tsmith@chef.io>
Diffstat (limited to 'lib/chef/resource/scm.rb')
-rw-r--r-- | lib/chef/resource/scm.rb | 56 |
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 |