alexa_remotectl 0.4.5 → 0.4.6

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: e6f8ae020909ff7e55ed461f0abd1d5be5030f4a0a33e59bca9d679d9d317cdb
4
- data.tar.gz: 2ca248fe25642502eb143de03d3ef64297b24618eea71b630fba347a040e6682
3
+ metadata.gz: 5b2029c701df7521e20261071499fcdd877858b75ef7c6257ada56fa0e83f390
4
+ data.tar.gz: 2cb5831f0c13db113c7991954940cef62e2a4ad90fd8ee66c50e17a028e3ae8a
5
5
  SHA512:
6
- metadata.gz: 3a6b48bedafcc463138aeb96b7eb1450a048f60a8f886494bcdb7b0b7abb658a658d707b2820d6586eb4c0a776704a650b79e728d06e3a7bcea917144852ea14
7
- data.tar.gz: 7370ca7ac96b4c72dddaa0967d24d78d0267b7746ec533a96c68062dc5b5cac487040230432bf298c85d60e316c65e26223a39bcdc1f5677011afbcf2aba4962
6
+ metadata.gz: 282e5aad4855e6a1aa67057d4f71ad786044c3c379ecfce3070c34770b396e5dca16de73d604d6a37b6713e29fbe854c44f0fcdf336276680cbaeab5fc2a91e9
7
+ data.tar.gz: 8af80f421ff7423c5bd729ea3bd9ef0c4b3f150e35cbb79eb28abfbd3771a223f939d31d904e665a09bf69187c75625e8256e66474182072e3b138327a2aa830
checksums.yaml.gz.sig CHANGED
Binary file
@@ -406,6 +406,25 @@ class AlexaDevices
406
406
  end
407
407
  end
408
408
 
409
+ def apply_cmd2(a, cmd, id, args)
410
+
411
+ if id then
412
+
413
+ alexa, _ = a.find {|_, label| label.to_sym == id.to_sym}
414
+ alexa.method(cmd).call(*args)
415
+
416
+ else
417
+
418
+ a.map do |alexa, label|
419
+
420
+ puts cmd.to_s + ' @' + label.inspect
421
+ alexa.method(cmd).call(*args)
422
+
423
+ end
424
+
425
+ end
426
+ end
427
+
409
428
  def invoke(cmd, id, *args)
410
429
  apply_cmd(@devices, cmd, id, args)
411
430
  end
@@ -413,7 +432,7 @@ class AlexaDevices
413
432
  # apply command to an Alexa device which is currently playing
414
433
  #
415
434
  def invoke2(cmd, id, *args)
416
- apply_cmd(playing(), cmd, id, args)
435
+ apply_cmd2(playing(), cmd, id, args)
417
436
  end
418
437
 
419
438
  end
data.tar.gz.sig CHANGED
Binary file
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: alexa_remotectl
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.5
4
+ version: 0.4.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - James Robertson
metadata.gz.sig CHANGED
Binary file