Move default configuration to the Hued module; add config_dir
This commit is contained in:
parent
ac83d469ee
commit
5eb6ddb307
2 changed files with 8 additions and 2 deletions
2
bin/hued
2
bin/hued
|
@ -13,7 +13,7 @@
|
|||
require "hued"
|
||||
|
||||
# Option parsing
|
||||
options = {blink: true}
|
||||
options = {}
|
||||
opt_parser = OptionParser.new do |opts|
|
||||
opts.banner = "Usage: hued [options]"
|
||||
opts.separator ""
|
||||
|
|
|
@ -25,8 +25,14 @@ module Hued
|
|||
# FIXME: load scenes as Hued::Scene classes
|
||||
Scenes = {}
|
||||
|
||||
DefaultConfig = { blink: true,
|
||||
config_dir: "config",
|
||||
hue_debug: false,
|
||||
debug: false }
|
||||
|
||||
|
||||
def configure(options)
|
||||
@config = options
|
||||
@config = DefaultConfig.merge(options)
|
||||
|
||||
# Set up the logger
|
||||
@log = Logger.new($stdout)
|
||||
|
|
Reference in a new issue