Class: Albacore::Sql::Config
- Inherits:
-
Object
- Object
- Albacore::Sql::Config
- Extended by:
- ConfigDSL
- Defined in:
- lib/albacore/task_types/sql_cmd.rb
Overview
The configuration class for SqlCmd. MSDN docs at: msdn.microsoft.com/en-us/library/ms162773.aspx
Instance Attribute Summary collapse
-
#database ⇒ Object
writeonly
this is the database for SqlCmd.
-
#password ⇒ Object
writeonly
this is the password for SqlCmd.
-
#scripts ⇒ Object
writeonly
this is the scripts for SqlCmd.
-
#server ⇒ Object
writeonly
this is the server for SqlCmd.
-
#username ⇒ Object
writeonly
this is the username for SqlCmd.
Instance Method Summary collapse
-
#initialize ⇒ Config
constructor
A new instance of Config.
-
#opts ⇒ Object
gets the options specified for the task, used from the task.
- #trusted_connection ⇒ Object
Methods included from ConfigDSL
Methods included from Logging
#debug, #err, #error, #fatal, #info, #puts, #trace, #warn
Methods included from CmdConfig
Constructor Details
#initialize ⇒ Config
Returns a new instance of Config.
45 46 47 48 49 50 51 52 53 54 |
# File 'lib/albacore/task_types/sql_cmd.rb', line 45 def initialize @parameters = Set.new w = lambda { |e| CrossPlatformCmd.which(e) ? e : nil } @exe = w.call( "SqlCmd" ) debug { "SqlCmd using '#{@exe}'" } end |
Instance Attribute Details
#database=(value) ⇒ Object (writeonly)
this is the database for SqlCmd
34 35 36 |
# File 'lib/albacore/task_types/sql_cmd.rb', line 34 def database=(value) @database = value end |
#password=(value) ⇒ Object (writeonly)
this is the password for SqlCmd
40 41 42 |
# File 'lib/albacore/task_types/sql_cmd.rb', line 40 def password=(value) @password = value end |
#scripts=(value) ⇒ Object (writeonly)
this is the scripts for SqlCmd
43 44 45 |
# File 'lib/albacore/task_types/sql_cmd.rb', line 43 def scripts=(value) @scripts = value end |
#server=(value) ⇒ Object (writeonly)
this is the server for SqlCmd
31 32 33 |
# File 'lib/albacore/task_types/sql_cmd.rb', line 31 def server=(value) @server = value end |
#username=(value) ⇒ Object (writeonly)
this is the username for SqlCmd
37 38 39 |
# File 'lib/albacore/task_types/sql_cmd.rb', line 37 def username=(value) @username = value end |
Instance Method Details
#opts ⇒ Object
gets the options specified for the task, used from the task
79 80 81 82 83 84 85 86 87 |
# File 'lib/albacore/task_types/sql_cmd.rb', line 79 def opts Map.new({ :exe => @exe, :parameters => @parameters, :scripts => @scripts, :original_path => FileUtils.pwd }) end |
#trusted_connection ⇒ Object
56 57 58 |
# File 'lib/albacore/task_types/sql_cmd.rb', line 56 def trusted_connection @parameters.add('-E') end |