Commit Graph

26 Commits

Author SHA1 Message Date
Paul van Tilburg ac83d469ee Fix spacing in LICENSE 2014-11-16 11:28:50 +01:00
Paul van Tilburg 6c159866f1 Only ignore configuration files in the config directory 2014-11-16 11:27:12 +01:00
Paul van Tilburg e2921f9c2e Split up the code into separate files
* Rename the Hued class to Hued::Engine so that Hued can be the containing
  module
* Split off the version to lib/hued/version.rb
* Undo Rule being a nested class of Engine
2014-11-16 11:25:13 +01:00
Paul van Tilburg 7d6ae9c093 Move huec/hued to the bin directory 2014-11-16 11:13:18 +01:00
Paul van Tilburg e3394a9bcf Tweak/fix log messages about valid rules 2014-11-16 00:33:19 +01:00
Paul van Tilburg 6c78b621c4 Support negation of conditions by prefixing them with "^" 2014-11-16 00:32:42 +01:00
Paul van Tilburg 4abf514b90 Use a custom prompt
In the prompt, show a character per lights that is a green/red `o' for
on/off or a bright red `x' for unreachable.
2014-11-16 00:11:34 +01:00
Paul van Tilburg ddac8fc45e Rename 'refresh' to 'refresh!'; reorder commands 2014-11-16 00:11:00 +01:00
Paul van Tilburg 0e2b7f5d36 Add command 'commands' for listing the available commands 2014-11-16 00:09:52 +01:00
Paul van Tilburg c26d987000 Fixed typo leading to a syntax error when using alert 2014-11-16 00:09:14 +01:00
Paul van Tilburg 2d1899a935 Add missing file header 2014-11-16 00:07:46 +01:00
Paul van Tilburg 97e39f333f Improve logging of active rules
* Mention valid rules and active rules.
* Rename variables accordingly and refactor the trigger related methods.
* Log whether a trigger rule has already been triggered.
2014-11-15 22:37:13 +01:00
Paul van Tilburg e62df9bc36 Small reordering 2014-11-15 22:24:27 +01:00
Paul van Tilburg 1f0bf617f0 Reload event/scenes/rules before executing any rules 2014-11-15 22:24:11 +01:00
Paul van Tilburg 24c95f417a Implement events/scenes/rules reloading
* Store change time when loading
* On reload, check if a file exists and whether it is newer
* Fail if the rules file cannot be loaded
* Reload the rules file if the events/scenes file has been reloaded
  (This is needed because rules might depend on new or updated
  events/scenes)
2014-11-15 22:23:44 +01:00
Paul van Tilburg ee95693976 Improve log messages 2014-11-15 22:21:49 +01:00
Paul van Tilburg 963fdc84ef Handle INT and TERM signals gracefully; use new dummy shutdown method 2014-11-15 21:13:36 +01:00
Paul van Tilburg de6277601b Add file header; tweak comments 2014-11-15 21:13:09 +01:00
Paul van Tilburg a44fb819e6 Add decent option parsing and version 2014-11-15 21:12:51 +01:00
Paul van Tilburg bb71dee7b9 Rename hued.rb to hued 2014-11-15 20:48:21 +01:00
Paul van Tilburg 14a75409d2 Ignore .yml files in repository root (for now) 2014-11-15 20:46:51 +01:00
Paul van Tilburg efa4786114 Add REAMDE.md file 2014-11-15 20:44:45 +01:00
Paul van Tilburg 8f86d79c42 Add GPL v2 license file 2014-11-15 19:55:06 +01:00
Paul van Tilburg 78097af40f Add the pry-based command-line utility huec 2014-11-15 19:42:39 +01:00
Paul van Tilburg 0f4796ebbc Add a draft implementation of the hued daemon 2014-11-15 19:41:47 +01:00
Paul van Tilburg 132d7ede47 Add very basic, initial version 2014-01-11 22:33:15 +01:00