Method: Svn#initialize
- Defined in:
- lib/version_control/svn.rb
#initialize(svn, params, options) ⇒ Svn
Initializes an instance of the class
Attributes
-
svn
- path to the svn executable -
params
- params hash -
options
- hash of options includes:… url - url for svn repository… base_path - path for the local repository… username - repository user username… password - repository user password… verbose - true for verbose output (default = false)… rebase - starting path for checkouts… simulate - simulate command - echo it (default = false)… prerun_lines - pass any text to run before svn (such as env variables)… command_options - options to pass on command line e.g. –non-interactive
23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 |
# File 'lib/version_control/svn.rb', line 23 def initialize(svn, params, ) self.extend Utilities @url = required_option(,"url") @base_path = required_option(,"base_path") user = get_option(,"username") @password = get_option(,"password") @verbose = get_option(,"verbose", false) @prerun = get_option(, "prerun_lines") @command_options = get_option(, "command_options") @command_options += " --non-interactive" unless @command_options.include?("non-interactive") @rebase = get_option(, "rebase") @rebase = @url.split("/")[-1] if @rebase == "" @simulate = get_option(,"simulate", false) make_credential(user, @password) @svn = svn end |