class Slacker::Configuration
Attributes
azure[RW]
base_dir[RW]
console_enabled[RW]
db_driver[RW]
db_name[RW]
db_password[RW]
db_port[RW]
db_server[RW]
db_user[RW]
error_stream[RW]
formatter[RW]
output_stream[RW]
Public Class Methods
new()
click to toggle source
# File lib/slacker/configuration.rb, line 16 def initialize @base_dir = Dir.pwd @error_stream = nil @output_stream = nil @rspec_args = nil @formatter = nil @db_server = nil @db_name = nil @db_user = nil @db_password = nil @db_port = 1433 @db_driver = 'odbc' @azure = false @console_enabled = true end
Public Instance Methods
console_enabled=(value)
click to toggle source
# File lib/slacker/configuration.rb, line 40 def console_enabled=(value) @console_enabled = value @error_stream = $stderr @output_stream = $stdout @rspec_args = ARGV end
db_config()
click to toggle source
# File lib/slacker/configuration.rb, line 63 def db_config {:adapter => 'sqlserver', :mode => 'odbc', :dsn => dsn_string} end
dsn_string()
click to toggle source
# File lib/slacker/configuration.rb, line 59 def dsn_string "Driver={SQL Server};Server=#{@db_server};Database=#{@db_name};Uid=#{@db_user};Pwd=#{@db_password}" end
expand_path(path)
click to toggle source
# File lib/slacker/configuration.rb, line 32 def expand_path(path) File.expand_path("#{@base_dir}/#{path}") end
rspec_args()
click to toggle source
# File lib/slacker/configuration.rb, line 47 def rspec_args if @rspec_args.nil? || @rspec_args.empty? Dir.glob(expand_path("spec/**/*.rb")) else @rspec_args end end
rspec_args=(value)
click to toggle source
# File lib/slacker/configuration.rb, line 55 def rspec_args=(value) @rspec_args = value end