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