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, options)
  self.extend Utilities
  @url = required_option(options,"url")
  @base_path = required_option(options,"base_path")
  user = get_option(options,"username")
  @password = get_option(options,"password")
  @verbose = get_option(options,"verbose", false)
  @prerun = get_option(options, "prerun_lines")
  @command_options = get_option(options, "command_options")
  @command_options += " --non-interactive" unless @command_options.include?("non-interactive")
  @rebase = get_option(options, "rebase")
  @rebase =  @url.split("/")[-1] if @rebase == ""
  @simulate = get_option(options,"simulate", false)
  make_credential(user, @password)
  @svn = svn
end