Manage run control file path in Env
This commit is contained in:
parent
6cafd2ea37
commit
e9de59b37b
@ -1,6 +1,8 @@
|
|||||||
module Uh
|
module Uh
|
||||||
module WM
|
module WM
|
||||||
class Env
|
class Env
|
||||||
|
RC_PATH = '~/.uhwmrc.rb'.freeze
|
||||||
|
|
||||||
LOGGER_LEVEL = Logger::WARN
|
LOGGER_LEVEL = Logger::WARN
|
||||||
LOGGER_LEVEL_VERBOSE = Logger::INFO
|
LOGGER_LEVEL_VERBOSE = Logger::INFO
|
||||||
LOGGER_LEVEL_DEBUG = Logger::DEBUG
|
LOGGER_LEVEL_DEBUG = Logger::DEBUG
|
||||||
@ -12,10 +14,11 @@ module Uh
|
|||||||
def_delegator :@output, :print
|
def_delegator :@output, :print
|
||||||
|
|
||||||
attr_reader :output
|
attr_reader :output
|
||||||
attr_accessor :verbose, :debug, :layout_class
|
attr_accessor :verbose, :debug, :rc_path, :layout_class
|
||||||
|
|
||||||
def initialize output
|
def initialize output
|
||||||
@output = output
|
@output = output
|
||||||
|
@rc_path = RC_PATH
|
||||||
end
|
end
|
||||||
|
|
||||||
def verbose?
|
def verbose?
|
||||||
|
@ -13,6 +13,10 @@ module Uh
|
|||||||
expect(env).not_to be_debug
|
expect(env).not_to be_debug
|
||||||
end
|
end
|
||||||
|
|
||||||
|
it 'has the default rc path set' do
|
||||||
|
expect(env.rc_path).to eq '~/.uhwmrc.rb'
|
||||||
|
end
|
||||||
|
|
||||||
it 'has no layout_class set' do
|
it 'has no layout_class set' do
|
||||||
expect(env.layout_class).not_to be
|
expect(env.layout_class).not_to be
|
||||||
end
|
end
|
||||||
|
Loading…
x
Reference in New Issue
Block a user