xilight 0.1.7 → 0.1.8
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/exe/yee +12 -7
- data/lib/xilight/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 8bb65d34b1363b82bfaf5fbca8927b0de1d610aedf7b03e4d2d11ee4485c74c4
|
4
|
+
data.tar.gz: 196803f1a0a8a25faaf676f46a7d9f26ffec3381e255242b149bb95d9c630900
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 20b243d508aedca52d92db7ba0c7ef9acdbcd760fde640f7c9fa1f4dfb8ad2a810ba506f6a4f9c9cd1b32cf60876efa42c1fde6e726c4b6b516b27d2da911c76
|
7
|
+
data.tar.gz: 4647b5b21fd425fd926d7ebb6ea75eb565049e63e7421755f79134a220e762b0d34c044c12900aaf685de9433cd2f4cea79f164de6752120505c2600276d35fe
|
data/exe/yee
CHANGED
@@ -2,7 +2,7 @@
|
|
2
2
|
|
3
3
|
require "xilight"
|
4
4
|
require "dry/cli"
|
5
|
-
|
5
|
+
require 'pry-byebug'
|
6
6
|
module Xilight
|
7
7
|
module CLI
|
8
8
|
|
@@ -51,10 +51,19 @@ module Xilight
|
|
51
51
|
|
52
52
|
def self.discover
|
53
53
|
::Xilight::CLI.config = {
|
54
|
-
'yeelights' => ::Xilight::Yeelight.discover.
|
54
|
+
'yeelights' => ::Xilight::Yeelight.discover.map do |light|
|
55
55
|
light.instance_variables.map{|v| [v.to_s[1..-1], light.instance_variable_get(v)] }.to_h
|
56
56
|
end
|
57
57
|
}
|
58
|
+
self.list
|
59
|
+
end
|
60
|
+
|
61
|
+
def self.list
|
62
|
+
current_config = ::Xilight::CLI.config
|
63
|
+
current_lights = current_config.fetch('yeelights', [])
|
64
|
+
current_lights.each_with_index do |light, index|
|
65
|
+
puts "Light ##{index} => #{(light['name'] || light['id'])}@#{light['host']}"
|
66
|
+
end
|
58
67
|
end
|
59
68
|
|
60
69
|
module Commands
|
@@ -92,11 +101,7 @@ module Xilight
|
|
92
101
|
]
|
93
102
|
|
94
103
|
def call(**)
|
95
|
-
|
96
|
-
current_lights = current_config.fetch('yeelights', [])
|
97
|
-
current_lights.each_with_index do |light, index|
|
98
|
-
puts "Light ##{index} => #{(light['name'] || light['id'])}@#{light['host']}"
|
99
|
-
end
|
104
|
+
::Xilight::CLI.list
|
100
105
|
end
|
101
106
|
end
|
102
107
|
|
data/lib/xilight/version.rb
CHANGED