Class: VssGet
- Inherits:
-
Object
- Object
- VssGet
- Includes:
- Albacore::RunCommand, Albacore::Task
- Defined in:
- lib/albacore/vssget.rb
Constant Summary collapse
- TaskName =
:vssget
Instance Attribute Summary collapse
-
#password ⇒ Object
Returns the value of attribute password.
-
#path ⇒ Object
Returns the value of attribute path.
-
#project ⇒ Object
Returns the value of attribute project.
-
#quite ⇒ Object
Returns the value of attribute quite.
-
#readonly ⇒ Object
Returns the value of attribute readonly.
-
#recursive ⇒ Object
Returns the value of attribute recursive.
-
#repository ⇒ Object
Returns the value of attribute repository.
-
#username ⇒ Object
Returns the value of attribute username.
Attributes included from Albacore::RunCommand
Attributes included from Logging
Instance Method Summary collapse
- #execute ⇒ Object
- #get_command_parameters ⇒ Object
-
#initialize(command = nil) ⇒ VssGet
constructor
A new instance of VssGet.
Methods included from Albacore::RunCommand
Methods included from AttrMethods
Methods included from Albacore::Task
clean_dirname, create_rake_task, include_config, included
Methods included from UpdateAttributes
Methods included from YAMLConfig
#configure, #load_config_by_task_name
Methods included from Logging
#create_logger, #log_device=, #log_level, #log_level=
Methods included from Failure
Constructor Details
#initialize(command = nil) ⇒ VssGet
Returns a new instance of VssGet.
11 12 13 14 15 16 17 18 19 |
# File 'lib/albacore/vssget.rb', line 11 def initialize(command=nil) @options=[] @quite = true @readonly = true @recursive = true super() update_attributes Albacore.configuration.vss.to_hash @command = command unless command.nil? end |
Instance Attribute Details
#password ⇒ Object
Returns the value of attribute password.
8 9 10 |
# File 'lib/albacore/vssget.rb', line 8 def password @password end |
#path ⇒ Object
Returns the value of attribute path.
8 9 10 |
# File 'lib/albacore/vssget.rb', line 8 def path @path end |
#project ⇒ Object
Returns the value of attribute project.
8 9 10 |
# File 'lib/albacore/vssget.rb', line 8 def project @project end |
#quite ⇒ Object
Returns the value of attribute quite.
8 9 10 |
# File 'lib/albacore/vssget.rb', line 8 def quite @quite end |
#readonly ⇒ Object
Returns the value of attribute readonly.
8 9 10 |
# File 'lib/albacore/vssget.rb', line 8 def readonly @readonly end |
#recursive ⇒ Object
Returns the value of attribute recursive.
8 9 10 |
# File 'lib/albacore/vssget.rb', line 8 def recursive @recursive end |
#repository ⇒ Object
Returns the value of attribute repository.
8 9 10 |
# File 'lib/albacore/vssget.rb', line 8 def repository @repository end |
#username ⇒ Object
Returns the value of attribute username.
8 9 10 |
# File 'lib/albacore/vssget.rb', line 8 def username @username end |
Instance Method Details
#execute ⇒ Object
34 35 36 37 38 39 40 41 42 43 |
# File 'lib/albacore/vssget.rb', line 34 def execute() 'Repository should be provided.' if @repository.nil? ENV["SSDIR"] = @repository result = run_command "VssGet", get_command_parameters = 'Visual SourceSafe Failed. See Build Log For Detail' if !result end |
#get_command_parameters ⇒ Object
21 22 23 24 25 26 27 28 29 30 31 32 |
# File 'lib/albacore/vssget.rb', line 21 def get_command_parameters command_params = [] command_params << "get" command_params << @project || "$/" command_params << "-Q" if @quite command_params << "-R" if @recursive command_params << (@readonly ? "-W-" : "-W") command_params << "-Y#{@username},#{@password}" unless @username.nil? command_params << "\"-GL#{@path}\"" unless @path.nil? command_params << @options.join(" ") unless @options.nil? command_params end |