class Chef::Resource::Scm
Public Class Methods
new(name, run_context=nil)
click to toggle source
Calls superclass method
Chef::Resource.new
# File lib/chef/resource/scm.rb, line 30 def initialize(name, run_context=nil) super @destination = name @resource_name = :scm @enable_submodules = false @enable_checkout = true @revision = "HEAD" @remote = "origin" @ssh_wrapper = nil @depth = nil @allowed_actions.push(:checkout, :export, :sync, :diff, :log) @action = [:sync] @checkout_branch = "deploy" end
Public Instance Methods
checkout_branch(arg=nil)
click to toggle source
# File lib/chef/resource/scm.rb, line 167 def checkout_branch(arg=nil) set_or_return( :checkout_branch, arg, :kind_of => String ) end
depth(arg=nil)
click to toggle source
Capistrano and git-deploy use “shallow clone''
# File lib/chef/resource/scm.rb, line 119 def depth(arg=nil) set_or_return( :depth, arg, :kind_of => Integer ) end
destination(arg=nil)
click to toggle source
# File lib/chef/resource/scm.rb, line 45 def destination(arg=nil) set_or_return( :destination, arg, :kind_of => String ) end
enable_checkout(arg=nil)
click to toggle source
# File lib/chef/resource/scm.rb, line 135 def enable_checkout(arg=nil) set_or_return( :enable_checkout, arg, :kind_of => [TrueClass, FalseClass] ) end
enable_submodules(arg=nil)
click to toggle source
# File lib/chef/resource/scm.rb, line 127 def enable_submodules(arg=nil) set_or_return( :enable_submodules, arg, :kind_of => [TrueClass, FalseClass] ) end
group(arg=nil)
click to toggle source
# File lib/chef/resource/scm.rb, line 77 def group(arg=nil) set_or_return( :group, arg, :kind_of => [String, Integer] ) end
remote(arg=nil)
click to toggle source
# File lib/chef/resource/scm.rb, line 143 def remote(arg=nil) set_or_return( :remote, arg, :kind_of => String ) end
repository(arg=nil)
click to toggle source
# File lib/chef/resource/scm.rb, line 53 def repository(arg=nil) set_or_return( :repository, arg, :kind_of => String ) end
revision(arg=nil)
click to toggle source
# File lib/chef/resource/scm.rb, line 61 def revision(arg=nil) set_or_return( :revision, arg, :kind_of => String ) end
ssh_wrapper(arg=nil)
click to toggle source
# File lib/chef/resource/scm.rb, line 151 def ssh_wrapper(arg=nil) set_or_return( :ssh_wrapper, arg, :kind_of => String ) end
svn_arguments(arg=nil)
click to toggle source
# File lib/chef/resource/scm.rb, line 101 def svn_arguments(arg=nil) @svn_arguments, arg = nil, nil if arg == false set_or_return( :svn_arguments, arg, :kind_of => String ) end
svn_info_args(arg=nil)
click to toggle source
# File lib/chef/resource/scm.rb, line 110 def svn_info_args(arg=nil) @svn_info_args, arg = nil, nil if arg == false set_or_return( :svn_info_args, arg, :kind_of => String) end
svn_password(arg=nil)
click to toggle source
# File lib/chef/resource/scm.rb, line 93 def svn_password(arg=nil) set_or_return( :svn_password, arg, :kind_of => String ) end
svn_username(arg=nil)
click to toggle source
# File lib/chef/resource/scm.rb, line 85 def svn_username(arg=nil) set_or_return( :svn_username, arg, :kind_of => String ) end
timeout(arg=nil)
click to toggle source
# File lib/chef/resource/scm.rb, line 159 def timeout(arg=nil) set_or_return( :timeout, arg, :kind_of => Integer ) end
user(arg=nil)
click to toggle source
# File lib/chef/resource/scm.rb, line 69 def user(arg=nil) set_or_return( :user, arg, :kind_of => [String, Integer] ) end