lita-hue-lightswitch 1.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +7 -0
- data/.gitignore +22 -0
- data/Gemfile +3 -0
- data/README.md +19 -0
- data/Rakefile +6 -0
- data/examples/001-hue-demo.rb +62 -0
- data/examples/002-lita-demo.session +16 -0
- data/lib/lita-hue-lightswitch.rb +13 -0
- data/lib/lita/handlers/hue_lightswitch.rb +96 -0
- data/lib/lita/hue_colored_bulb.rb +123 -0
- data/lita-hue-lightswitch.gemspec +27 -0
- data/locales/en.yml +4 -0
- data/spec/lita/handlers/hue_colored_bulb_spec.rb +64 -0
- data/spec/lita/handlers/hue_lightswitch_spec.rb +59 -0
- data/spec/spec_helper.rb +6 -0
- data/templates/.gitkeep +0 -0
- metadata +161 -0
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: 7b3ca14ae52d62142c1a9454e6a2b9b608d238f316ef3502f5c2dba0d79bd571
|
4
|
+
data.tar.gz: b078b50df0c4094da457eb022a60a0eea78d3fd51c4bc2cc6fd0103092d138a1
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: e1fdf9d26770667c6f031eb492ddeb1ffb81ee12dc0290036e4e8aafdf376c1a9da001d60587a2b1ab9e20655513d88e75a61ba60bae5af743784dc4ae9694aa
|
7
|
+
data.tar.gz: b65978eed2c4153e5dc4c9d003d5bb15a55a1c96763669baf192fb9768aeef1500c9ab94bcd63f3360825412318c6535117d36ec5a961cb97338997b71e68ced
|
data/.gitignore
ADDED
data/Gemfile
ADDED
data/README.md
ADDED
@@ -0,0 +1,19 @@
|
|
1
|
+
# lita-hue-lightswitch
|
2
|
+
|
3
|
+
TODO: Add a description of the plugin.
|
4
|
+
|
5
|
+
## Installation
|
6
|
+
|
7
|
+
Add lita-hue-lightswitch to your Lita instance's Gemfile:
|
8
|
+
|
9
|
+
``` ruby
|
10
|
+
gem "lita-hue-lightswitch"
|
11
|
+
```
|
12
|
+
|
13
|
+
## Configuration
|
14
|
+
|
15
|
+
TODO: Describe any configuration attributes the plugin exposes.
|
16
|
+
|
17
|
+
## Usage
|
18
|
+
|
19
|
+
TODO: Describe the plugin's features and how to use them.
|
data/Rakefile
ADDED
@@ -0,0 +1,62 @@
|
|
1
|
+
# START:setup
|
2
|
+
[1] pry(main)> require 'hue'
|
3
|
+
=> true
|
4
|
+
|
5
|
+
[2] pry(main)> client = Hue::Client.new
|
6
|
+
=> #<Hue::Client:0x0000555b194f0b40
|
7
|
+
@bridges=
|
8
|
+
[#<Hue::Bridge:0x0000555b194f0140
|
9
|
+
@client=#<Hue::Client:0x0000555b194f0b40 ...>,
|
10
|
+
@id="001788fffe2c1ba4",
|
11
|
+
@ip="10.0.0.106">],
|
12
|
+
@username="redacted">
|
13
|
+
# END:setup
|
14
|
+
|
15
|
+
# START:lights
|
16
|
+
[3] pry(main)> client.lights.map(&:name)
|
17
|
+
=> ["Bottom lamp", "Middle lamp", "Top lamp", "Bloom"]
|
18
|
+
|
19
|
+
[4] pry(main)> bloom = client.lights.last
|
20
|
+
=> #<Hue::Light:0x0000555b1970a750
|
21
|
+
@alert="none",
|
22
|
+
@bridge=
|
23
|
+
#<Hue::Bridge:0x0000555b194f0140
|
24
|
+
@client=
|
25
|
+
#<Hue::Client:0x0000555b194f0b40
|
26
|
+
@bridges=[#<Hue::Bridge:0x0000555b194f0140 ...>],
|
27
|
+
@username="CSvQNKCBeyLj-FRitKTPUNRD4tEmphZIjUG1VGp1">,
|
28
|
+
@id="001788fffe2c1ba4",
|
29
|
+
@ip="10.0.0.106",
|
30
|
+
@lights=
|
31
|
+
# END:lights
|
32
|
+
# ... snipped for brevity ...
|
33
|
+
|
34
|
+
# START:commands
|
35
|
+
[6] pry(main)> ls bloom
|
36
|
+
Hue::TranslateKeys#methods: translate_keys unpack_hash
|
37
|
+
Hue::EditableState#methods:
|
38
|
+
alert= color_temperature= hue= on! on? set_xy
|
39
|
+
brightness= effect= off! on= saturation=
|
40
|
+
Hue::Light#methods:
|
41
|
+
alert color_mode hue name reachable?
|
42
|
+
bridge color_temperature id name= refresh
|
43
|
+
brightness effect model point_symbol saturation
|
44
|
+
instance variables:
|
45
|
+
@alert @client @hue @name @saturation
|
46
|
+
@bridge @color_mode @id @on @software_ver
|
47
|
+
@brightness @effect @model @reachable @state
|
48
|
+
# END:commands
|
49
|
+
|
50
|
+
# START:action
|
51
|
+
# Change my bulb to a blue color
|
52
|
+
[7] pry(main)> bloom.hue = 44444
|
53
|
+
=> 44444
|
54
|
+
|
55
|
+
# Turn off my bulb
|
56
|
+
[8] pry(main)> bloom.off!
|
57
|
+
=> false
|
58
|
+
|
59
|
+
# Turn on my bulb
|
60
|
+
[9] pry(main)> bloom.on!
|
61
|
+
=> true
|
62
|
+
# END:action
|
@@ -0,0 +1,16 @@
|
|
1
|
+
$ lita
|
2
|
+
Type "exit" or "quit" to end the session.
|
3
|
+
Lita > lita hue off
|
4
|
+
Turning off light!
|
5
|
+
|
6
|
+
Lita > lita hue on
|
7
|
+
Turning on light!
|
8
|
+
|
9
|
+
Lita > lita hue color red
|
10
|
+
Setting color to red
|
11
|
+
|
12
|
+
Lita > lita hue color green
|
13
|
+
Setting color to green
|
14
|
+
|
15
|
+
Lita > lita hue demo
|
16
|
+
Enjoy the light demo!
|
@@ -0,0 +1,13 @@
|
|
1
|
+
require "lita"
|
2
|
+
|
3
|
+
Lita.load_locales Dir[File.expand_path(
|
4
|
+
File.join("..", "..", "locales", "*.yml"), __FILE__
|
5
|
+
)]
|
6
|
+
|
7
|
+
require "lita/hue_colored_bulb"
|
8
|
+
require "lita/handlers/hue_lightswitch"
|
9
|
+
|
10
|
+
Lita::Handlers::HueLightswitch.template_root File.expand_path(
|
11
|
+
File.join("..", "..", "templates"),
|
12
|
+
__FILE__
|
13
|
+
)
|
@@ -0,0 +1,96 @@
|
|
1
|
+
# START:header
|
2
|
+
module Lita
|
3
|
+
module Handlers
|
4
|
+
class HueLightswitch < Handler
|
5
|
+
|
6
|
+
# Set these in your bot's lita_config.rb
|
7
|
+
config :hue_bulb_name, default: 'Bloom'
|
8
|
+
|
9
|
+
# Create a reusable instance variable handle to a bulb
|
10
|
+
# named 'Bloom' (or whatever your config value for
|
11
|
+
# :hue_bulb_name is set to.
|
12
|
+
def light
|
13
|
+
@_light ||= HueColoredBulb.new(config.hue_bulb_name)
|
14
|
+
end
|
15
|
+
# END:header
|
16
|
+
|
17
|
+
# START:handle
|
18
|
+
# Any command of the form 'lita hue ____' should be caught
|
19
|
+
# and passed to the :handle_hue method
|
20
|
+
route /^hue\s+(.+)/i, :handle_hue, command: true
|
21
|
+
|
22
|
+
# Split the captured hue command into a one-word command name
|
23
|
+
# and everything after that (if anything) and pass the results
|
24
|
+
# on to the :hue_execute mapping below.
|
25
|
+
def handle_hue(message)
|
26
|
+
command, *rest = message.matches.last.last.split
|
27
|
+
response = hue_execute(command, rest)
|
28
|
+
message.reply response
|
29
|
+
end
|
30
|
+
# END:handle
|
31
|
+
|
32
|
+
# START:mapping
|
33
|
+
# Given a one-word hue :command and a possibly-empty array of
|
34
|
+
# additional parameters :rest, step through this case
|
35
|
+
# statement and perform the first matching action.
|
36
|
+
def hue_execute(command, rest=[])
|
37
|
+
case command
|
38
|
+
when 'demo'
|
39
|
+
demo
|
40
|
+
'Enjoy the light demo!'
|
41
|
+
when 'list_colors'
|
42
|
+
list_colors
|
43
|
+
when 'color'
|
44
|
+
recolor rest
|
45
|
+
"Setting color to #{rest.join ' '}"
|
46
|
+
when 'off'
|
47
|
+
off!
|
48
|
+
"Turning off light!"
|
49
|
+
when 'on'
|
50
|
+
on!
|
51
|
+
"Turning on light!"
|
52
|
+
else
|
53
|
+
debug_message = [command, rest].flatten.join ' '
|
54
|
+
"I don't know how to [#{debug_message}] a hue bulb."
|
55
|
+
end
|
56
|
+
end
|
57
|
+
# END: mapping
|
58
|
+
|
59
|
+
# START:colors
|
60
|
+
# Simple help text in case someone forgets Lita's `hue` commands
|
61
|
+
def list_colors
|
62
|
+
light.colors.join ' '
|
63
|
+
end
|
64
|
+
|
65
|
+
# Set the bulb's color to one of the named colors it recognizes
|
66
|
+
# e.g. red, green, blue, etc.
|
67
|
+
def recolor(rest)
|
68
|
+
new_color = rest.first
|
69
|
+
light.set_color new_color
|
70
|
+
end
|
71
|
+
# END:colors
|
72
|
+
|
73
|
+
# START:basics
|
74
|
+
##################
|
75
|
+
#
|
76
|
+
# These three commands are pass-throughs to the HueColoredBulb wrapper.
|
77
|
+
#
|
78
|
+
##################
|
79
|
+
|
80
|
+
def off!
|
81
|
+
light.off!
|
82
|
+
end
|
83
|
+
|
84
|
+
def on!
|
85
|
+
light.on!
|
86
|
+
end
|
87
|
+
|
88
|
+
def demo
|
89
|
+
light.demo
|
90
|
+
end
|
91
|
+
# END:basics
|
92
|
+
|
93
|
+
Lita.register_handler(self)
|
94
|
+
end
|
95
|
+
end
|
96
|
+
end
|
@@ -0,0 +1,123 @@
|
|
1
|
+
# START:header
|
2
|
+
# The hue gem is doing all the heavy lifting here, you're simply
|
3
|
+
# wrapping it in some more beginner-friendly language.
|
4
|
+
require 'hue'
|
5
|
+
|
6
|
+
# Exposes basic on, off, and recolor commands for a single named Hue bulb
|
7
|
+
# on the local network.
|
8
|
+
class HueColoredBulb
|
9
|
+
# Note that the initializer only cares about a single named bulb
|
10
|
+
# and does not look around for other bulbs to care about.
|
11
|
+
def initialize(name='Bloom')
|
12
|
+
@client = Hue::Client.new
|
13
|
+
|
14
|
+
# Your client likely has multiple bulbs attached, but here you're only
|
15
|
+
# going to want to find a single bulb that matches the supplied name.
|
16
|
+
@light = @client.lights.select do |light|
|
17
|
+
light.name == name
|
18
|
+
end.first
|
19
|
+
|
20
|
+
# No point continuing if the bulb can't be found by name.
|
21
|
+
raise ArgumentError if @light.nil?
|
22
|
+
end
|
23
|
+
|
24
|
+
# The named light itself and the Hue client object are both worth reusing
|
25
|
+
# as instance variables
|
26
|
+
attr_reader :light, :client
|
27
|
+
# END:header
|
28
|
+
|
29
|
+
# START:basics
|
30
|
+
# on! and off! methods are passed right through this API. They're plenty
|
31
|
+
# simple for your purposes as is.
|
32
|
+
def on!
|
33
|
+
light.on!
|
34
|
+
end
|
35
|
+
|
36
|
+
def off!
|
37
|
+
light.off!
|
38
|
+
end
|
39
|
+
|
40
|
+
# Fun demo to spin through all named colors, one color every quarter second.
|
41
|
+
def demo(sleep_seconds=0.25)
|
42
|
+
colors.each do |color_name|
|
43
|
+
self.set_color color_name
|
44
|
+
sleep sleep_seconds
|
45
|
+
end
|
46
|
+
end
|
47
|
+
# END:basics
|
48
|
+
|
49
|
+
# START:color_names
|
50
|
+
# Hue's color coordinate system has about 64,000 distinct hues. For Lita
|
51
|
+
# purposes you're fine starting with these twelve familiar options.
|
52
|
+
#
|
53
|
+
# The colors are listed in ascending order of hue along the color wheel
|
54
|
+
# starting at red, moving clockwise up through green and blue,
|
55
|
+
# and looping back around to the starting point to end at the same
|
56
|
+
# red where they began.
|
57
|
+
|
58
|
+
# Each color's corresponding hue number is one-twelfth of the circle's
|
59
|
+
# circumference higher than the previous color. If red is 0 then orange is
|
60
|
+
# 65535 / 12 * 1, or 5461. Yellow is twice that at 10,922. Rose is 60,073.
|
61
|
+
|
62
|
+
# [R]ed
|
63
|
+
|
64
|
+
# rose orange
|
65
|
+
|
66
|
+
# magenta yellow
|
67
|
+
|
68
|
+
# violet chartreuse
|
69
|
+
|
70
|
+
# [B]lue [G]reen
|
71
|
+
|
72
|
+
# azure aquamarine
|
73
|
+
|
74
|
+
# cyan
|
75
|
+
|
76
|
+
#
|
77
|
+
def colors
|
78
|
+
[
|
79
|
+
'red', 'orange', 'yellow', # red is 0
|
80
|
+
'chartreuse', 'green', 'aquamarine', # green is 21,000
|
81
|
+
'cyan', 'azure', 'blue', # blue is 44,000
|
82
|
+
'violet', 'magenta', 'rose' # rose is about 60,000
|
83
|
+
]
|
84
|
+
end
|
85
|
+
|
86
|
+
# Take a color name like cyan, look up its hue on the 65000 point scale,
|
87
|
+
# and pass that number to the light's hue= method to recolor the light.
|
88
|
+
def set_color(name)
|
89
|
+
unless colors.include? name.downcase
|
90
|
+
raise ArgumentError.new("I don't know that color!")
|
91
|
+
end
|
92
|
+
|
93
|
+
light.hue = hue_for_color(name)
|
94
|
+
end
|
95
|
+
# END:color_names
|
96
|
+
|
97
|
+
# START:color_backend
|
98
|
+
# RGB color wheel from 0 to 65535:
|
99
|
+
# red is 0 (and 65535 because the wheel starts over at the end)
|
100
|
+
# green is ~21000
|
101
|
+
# blue is ~44000
|
102
|
+
def hue_for_color(name)
|
103
|
+
# green has an index of 4 in the colors array above
|
104
|
+
color_index = colors.find_index(name)
|
105
|
+
|
106
|
+
# each color is 65535 / 12 points "wide",
|
107
|
+
# which is 5461 points on this RGB color wheel.
|
108
|
+
color_width = (max_color / colors.count).to_i
|
109
|
+
|
110
|
+
# green's hue is thus 4 * 5461 = 21845.
|
111
|
+
color_index * color_width
|
112
|
+
end
|
113
|
+
|
114
|
+
private
|
115
|
+
# The hue gem has a built-in constant range to track the number of distinct
|
116
|
+
# color hues the system exposes for a given colored bulb, i.e. 2^16 or
|
117
|
+
# "16-bit" color.
|
118
|
+
def max_color
|
119
|
+
# 0..65535
|
120
|
+
Hue::Light::HUE_RANGE.last
|
121
|
+
end
|
122
|
+
# END:color_backend
|
123
|
+
end
|
@@ -0,0 +1,27 @@
|
|
1
|
+
Gem::Specification.new do |spec|
|
2
|
+
spec.name = "lita-hue-lightswitch"
|
3
|
+
spec.version = "1.0.0"
|
4
|
+
spec.authors = ["Daniel J. Pritchett"]
|
5
|
+
spec.email = ["daniel@gremlin.com"]
|
6
|
+
spec.description = "Control Hue lights with a Lita chatbot"
|
7
|
+
spec.summary = "Control Hue lights with a Lita chatbot"
|
8
|
+
spec.homepage = "https://github.com/dpritchett/lita-hue-lightswitch"
|
9
|
+
spec.license = "MIT"
|
10
|
+
spec.metadata = { "lita_plugin_type" => "handler" }
|
11
|
+
|
12
|
+
spec.files = `git ls-files`.split($/)
|
13
|
+
spec.executables = spec.files.grep(%r{^bin/}) { |f| File.basename(f) }
|
14
|
+
spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
|
15
|
+
spec.require_paths = ["lib"]
|
16
|
+
|
17
|
+
# START:runtime
|
18
|
+
spec.add_runtime_dependency "lita", ">= 4.7"
|
19
|
+
spec.add_runtime_dependency "hue", "~> 0.2.0"
|
20
|
+
# END:runtime
|
21
|
+
|
22
|
+
spec.add_development_dependency "bundler", "~> 1.3"
|
23
|
+
spec.add_development_dependency "pry-byebug"
|
24
|
+
spec.add_development_dependency "rake"
|
25
|
+
spec.add_development_dependency "rack-test"
|
26
|
+
spec.add_development_dependency "rspec", ">= 3.0.0"
|
27
|
+
end
|
data/locales/en.yml
ADDED
@@ -0,0 +1,64 @@
|
|
1
|
+
# START:header
|
2
|
+
require "spec_helper"
|
3
|
+
|
4
|
+
describe HueColoredBulb do
|
5
|
+
let(:bulb_name) { 'Bloom' }
|
6
|
+
subject { described_class.new(bulb_name) }
|
7
|
+
# END:header
|
8
|
+
|
9
|
+
# START:basics
|
10
|
+
it 'can turn on and off' do
|
11
|
+
subject.on!
|
12
|
+
subject.off!
|
13
|
+
end
|
14
|
+
|
15
|
+
it 'has a list of colors' do
|
16
|
+
actual = subject.colors
|
17
|
+
expect(actual.first).to eq('red')
|
18
|
+
expect(actual).to include('azure')
|
19
|
+
end
|
20
|
+
|
21
|
+
context 'setting a color' do
|
22
|
+
it 'can be colored cyan' do
|
23
|
+
expect{subject.set_color 'cyan'}.to_not raise_error
|
24
|
+
end
|
25
|
+
|
26
|
+
it 'cannot be colored burnt sienna' do
|
27
|
+
expect{subject.set_color 'burnt_sienna'}.to raise_error(ArgumentError)
|
28
|
+
end
|
29
|
+
end
|
30
|
+
# END:basics
|
31
|
+
|
32
|
+
# START:math
|
33
|
+
context 'color hue estimations' do
|
34
|
+
it 'has red at 0 hue' do
|
35
|
+
actual = subject.hue_for_color 'red'
|
36
|
+
expect(actual).to eq(0)
|
37
|
+
end
|
38
|
+
|
39
|
+
it 'has green at approximately 21k hue' do
|
40
|
+
actual = subject.hue_for_color 'green'
|
41
|
+
# absolute value of hue_for_color('green') should be within 1000
|
42
|
+
# of the 21,000 approximation specified here.
|
43
|
+
delta = (actual - 21000).abs
|
44
|
+
expect(delta < 1000).to be_truthy
|
45
|
+
end
|
46
|
+
|
47
|
+
it 'has blue at approximately 44k hue' do
|
48
|
+
actual = subject.hue_for_color 'blue'
|
49
|
+
delta = (actual - 44000).abs
|
50
|
+
expect(delta < 1000).to be_truthy
|
51
|
+
end
|
52
|
+
end
|
53
|
+
# END:math
|
54
|
+
|
55
|
+
# START:demo
|
56
|
+
context 'color wheel demo' do
|
57
|
+
it 'displays each color exactly once' do
|
58
|
+
n = subject.colors.count
|
59
|
+
expect(subject.light).to receive(:hue=).exactly(n).times
|
60
|
+
subject.demo(0.0001)
|
61
|
+
end
|
62
|
+
end
|
63
|
+
# END:demo
|
64
|
+
end
|
@@ -0,0 +1,59 @@
|
|
1
|
+
# START:header
|
2
|
+
require "spec_helper"
|
3
|
+
|
4
|
+
describe Lita::Handlers::HueLightswitch, lita_handler: true do
|
5
|
+
subject { described_class.new(robot) }
|
6
|
+
# END:header
|
7
|
+
|
8
|
+
# START:routes
|
9
|
+
it { is_expected.to route("Lita hue color green") }
|
10
|
+
it { is_expected.to route("Lita hue list_colors") }
|
11
|
+
it { is_expected.to route("Lita hue off") }
|
12
|
+
it { is_expected.to route("Lita hue on") }
|
13
|
+
# END:routes
|
14
|
+
|
15
|
+
# START:client
|
16
|
+
context 'using a dummy HueColoredBulb client' do
|
17
|
+
let(:bulb) { double(:bulb) }
|
18
|
+
before { subject.stub(:light).and_return bulb }
|
19
|
+
# Intentionally deviating from the color list of the actual
|
20
|
+
# HueColoredBulb class for two reasons:
|
21
|
+
# - three colors make for simpler testing than 12
|
22
|
+
# - violating some of the numeric assumptions of the linked
|
23
|
+
# class might give us a more robust integration by assuming
|
24
|
+
# as little as necessary from this calling class.
|
25
|
+
before { bulb.stub(:colors).and_return %w[red orange green] }
|
26
|
+
# END:client
|
27
|
+
|
28
|
+
# START:power
|
29
|
+
it 'can turn off the bulb' do
|
30
|
+
expect(bulb).to receive(:off!)
|
31
|
+
actual = subject.hue_execute 'off'
|
32
|
+
expect(actual).to match /Turning off/
|
33
|
+
end
|
34
|
+
|
35
|
+
it 'can turn off the bulb' do
|
36
|
+
expect(bulb).to receive(:on!)
|
37
|
+
actual = subject.hue_execute 'on'
|
38
|
+
expect(actual).to match /Turning on/
|
39
|
+
end
|
40
|
+
# END:power
|
41
|
+
|
42
|
+
# START:colors
|
43
|
+
it 'can list colors' do
|
44
|
+
actual = subject.list_colors
|
45
|
+
expect(actual).to include 'green'
|
46
|
+
expect(actual).to include 'red'
|
47
|
+
expect(actual).to include 'orange'
|
48
|
+
end
|
49
|
+
|
50
|
+
it 'can recolor the bulb' do
|
51
|
+
new_color = bulb.colors.sample
|
52
|
+
|
53
|
+
expect(bulb).to receive(:set_color)
|
54
|
+
actual = subject.hue_execute "color", [new_color]
|
55
|
+
expect(actual).to match /Setting color to #{new_color}/
|
56
|
+
end
|
57
|
+
# END:colors
|
58
|
+
end
|
59
|
+
end
|
data/spec/spec_helper.rb
ADDED
@@ -0,0 +1,6 @@
|
|
1
|
+
require "lita-hue-lightswitch"
|
2
|
+
require "lita/rspec"
|
3
|
+
|
4
|
+
# A compatibility mode is provided for older plugins upgrading from Lita 3. Since this plugin
|
5
|
+
# was generated with Lita 4, the compatibility mode should be left disabled.
|
6
|
+
Lita.version_3_compatibility_mode = false
|
data/templates/.gitkeep
ADDED
File without changes
|
metadata
ADDED
@@ -0,0 +1,161 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: lita-hue-lightswitch
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 1.0.0
|
5
|
+
platform: ruby
|
6
|
+
authors:
|
7
|
+
- Daniel J. Pritchett
|
8
|
+
autorequire:
|
9
|
+
bindir: bin
|
10
|
+
cert_chain: []
|
11
|
+
date: 2019-01-13 00:00:00.000000000 Z
|
12
|
+
dependencies:
|
13
|
+
- !ruby/object:Gem::Dependency
|
14
|
+
name: lita
|
15
|
+
requirement: !ruby/object:Gem::Requirement
|
16
|
+
requirements:
|
17
|
+
- - ">="
|
18
|
+
- !ruby/object:Gem::Version
|
19
|
+
version: '4.7'
|
20
|
+
type: :runtime
|
21
|
+
prerelease: false
|
22
|
+
version_requirements: !ruby/object:Gem::Requirement
|
23
|
+
requirements:
|
24
|
+
- - ">="
|
25
|
+
- !ruby/object:Gem::Version
|
26
|
+
version: '4.7'
|
27
|
+
- !ruby/object:Gem::Dependency
|
28
|
+
name: hue
|
29
|
+
requirement: !ruby/object:Gem::Requirement
|
30
|
+
requirements:
|
31
|
+
- - "~>"
|
32
|
+
- !ruby/object:Gem::Version
|
33
|
+
version: 0.2.0
|
34
|
+
type: :runtime
|
35
|
+
prerelease: false
|
36
|
+
version_requirements: !ruby/object:Gem::Requirement
|
37
|
+
requirements:
|
38
|
+
- - "~>"
|
39
|
+
- !ruby/object:Gem::Version
|
40
|
+
version: 0.2.0
|
41
|
+
- !ruby/object:Gem::Dependency
|
42
|
+
name: bundler
|
43
|
+
requirement: !ruby/object:Gem::Requirement
|
44
|
+
requirements:
|
45
|
+
- - "~>"
|
46
|
+
- !ruby/object:Gem::Version
|
47
|
+
version: '1.3'
|
48
|
+
type: :development
|
49
|
+
prerelease: false
|
50
|
+
version_requirements: !ruby/object:Gem::Requirement
|
51
|
+
requirements:
|
52
|
+
- - "~>"
|
53
|
+
- !ruby/object:Gem::Version
|
54
|
+
version: '1.3'
|
55
|
+
- !ruby/object:Gem::Dependency
|
56
|
+
name: pry-byebug
|
57
|
+
requirement: !ruby/object:Gem::Requirement
|
58
|
+
requirements:
|
59
|
+
- - ">="
|
60
|
+
- !ruby/object:Gem::Version
|
61
|
+
version: '0'
|
62
|
+
type: :development
|
63
|
+
prerelease: false
|
64
|
+
version_requirements: !ruby/object:Gem::Requirement
|
65
|
+
requirements:
|
66
|
+
- - ">="
|
67
|
+
- !ruby/object:Gem::Version
|
68
|
+
version: '0'
|
69
|
+
- !ruby/object:Gem::Dependency
|
70
|
+
name: rake
|
71
|
+
requirement: !ruby/object:Gem::Requirement
|
72
|
+
requirements:
|
73
|
+
- - ">="
|
74
|
+
- !ruby/object:Gem::Version
|
75
|
+
version: '0'
|
76
|
+
type: :development
|
77
|
+
prerelease: false
|
78
|
+
version_requirements: !ruby/object:Gem::Requirement
|
79
|
+
requirements:
|
80
|
+
- - ">="
|
81
|
+
- !ruby/object:Gem::Version
|
82
|
+
version: '0'
|
83
|
+
- !ruby/object:Gem::Dependency
|
84
|
+
name: rack-test
|
85
|
+
requirement: !ruby/object:Gem::Requirement
|
86
|
+
requirements:
|
87
|
+
- - ">="
|
88
|
+
- !ruby/object:Gem::Version
|
89
|
+
version: '0'
|
90
|
+
type: :development
|
91
|
+
prerelease: false
|
92
|
+
version_requirements: !ruby/object:Gem::Requirement
|
93
|
+
requirements:
|
94
|
+
- - ">="
|
95
|
+
- !ruby/object:Gem::Version
|
96
|
+
version: '0'
|
97
|
+
- !ruby/object:Gem::Dependency
|
98
|
+
name: rspec
|
99
|
+
requirement: !ruby/object:Gem::Requirement
|
100
|
+
requirements:
|
101
|
+
- - ">="
|
102
|
+
- !ruby/object:Gem::Version
|
103
|
+
version: 3.0.0
|
104
|
+
type: :development
|
105
|
+
prerelease: false
|
106
|
+
version_requirements: !ruby/object:Gem::Requirement
|
107
|
+
requirements:
|
108
|
+
- - ">="
|
109
|
+
- !ruby/object:Gem::Version
|
110
|
+
version: 3.0.0
|
111
|
+
description: Control Hue lights with a Lita chatbot
|
112
|
+
email:
|
113
|
+
- daniel@gremlin.com
|
114
|
+
executables: []
|
115
|
+
extensions: []
|
116
|
+
extra_rdoc_files: []
|
117
|
+
files:
|
118
|
+
- ".gitignore"
|
119
|
+
- Gemfile
|
120
|
+
- README.md
|
121
|
+
- Rakefile
|
122
|
+
- examples/001-hue-demo.rb
|
123
|
+
- examples/002-lita-demo.session
|
124
|
+
- lib/lita-hue-lightswitch.rb
|
125
|
+
- lib/lita/handlers/hue_lightswitch.rb
|
126
|
+
- lib/lita/hue_colored_bulb.rb
|
127
|
+
- lita-hue-lightswitch.gemspec
|
128
|
+
- locales/en.yml
|
129
|
+
- spec/lita/handlers/hue_colored_bulb_spec.rb
|
130
|
+
- spec/lita/handlers/hue_lightswitch_spec.rb
|
131
|
+
- spec/spec_helper.rb
|
132
|
+
- templates/.gitkeep
|
133
|
+
homepage: https://github.com/dpritchett/lita-hue-lightswitch
|
134
|
+
licenses:
|
135
|
+
- MIT
|
136
|
+
metadata:
|
137
|
+
lita_plugin_type: handler
|
138
|
+
post_install_message:
|
139
|
+
rdoc_options: []
|
140
|
+
require_paths:
|
141
|
+
- lib
|
142
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
143
|
+
requirements:
|
144
|
+
- - ">="
|
145
|
+
- !ruby/object:Gem::Version
|
146
|
+
version: '0'
|
147
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
148
|
+
requirements:
|
149
|
+
- - ">="
|
150
|
+
- !ruby/object:Gem::Version
|
151
|
+
version: '0'
|
152
|
+
requirements: []
|
153
|
+
rubyforge_project:
|
154
|
+
rubygems_version: 2.7.6
|
155
|
+
signing_key:
|
156
|
+
specification_version: 4
|
157
|
+
summary: Control Hue lights with a Lita chatbot
|
158
|
+
test_files:
|
159
|
+
- spec/lita/handlers/hue_colored_bulb_spec.rb
|
160
|
+
- spec/lita/handlers/hue_lightswitch_spec.rb
|
161
|
+
- spec/spec_helper.rb
|