lifx_http 0.2.0 → 0.2.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: c679e37e1d17aa75273acf54fd4b6d17d88482f1
4
- data.tar.gz: 341a096e166e266d0f2cc26f0fcea649cd17876a
3
+ metadata.gz: 9299bf84401f2d80472d5251cab1805bb8e843c0
4
+ data.tar.gz: 5c980d4955ed4c9ea59d6be2bd9eace0702bc5da
5
5
  SHA512:
6
- metadata.gz: 0d2964cea069f21eafa221fb0517b20b8ebf23382d969cd2244cc1cd711e12be5a26de18bbb76f78f50bde39afcc65da7bf998d05c36abf58fc57aa7cc11c9de
7
- data.tar.gz: 96f83f715583322f3d6f54009e324a0a5a0212da5f9ac646e2474805e1fe08085a3955a2877bc25fefa272a8e6ee3c493ee7289f946fbf973c1dd9d0fe9da0e4
6
+ metadata.gz: 9d71f0f10e00b945967057bcfb222008779ba06fd0d1fa184d8ef27be123443c9228d84b111629312619a7607606ca6987662bfa8d073ec223460c34ba19b297
7
+ data.tar.gz: b0c26bf5a004e804c5ef179fef7664c1972224cb8a7c15ca814d6b499e64813f1bc61ad55be29070d499e9d52cf198694c00ecec3181824dfc14b8a4bcc5160d
data/lib/lifx_http/api.rb CHANGED
@@ -11,20 +11,19 @@ module LifxHttp
11
11
 
12
12
  def set_color(selector, color, options = { duration: 2.0,
13
13
  power_on: true})
14
- HTTParty.put(color_url(selector),
14
+ response = HTTParty.put(color_url(selector),
15
15
  headers: authorization_headers,
16
16
  query: options.merge({
17
17
  color: color
18
- })).tap do |response|
19
- if response.success?
20
- puts "info: set #{selector} to #{color}" if ENV["DEBUG"]
21
- puts response.to_s if ENV["DEBUG"]
22
- nil
23
- else
24
- puts "warning: light status - #{response}"
25
- -1
26
- end
27
- end
18
+ }))
19
+ if response.success?
20
+ puts "info: set #{selector} to #{color}" if ENV["DEBUG"]
21
+ puts response.to_s if ENV["DEBUG"]
22
+ nil
23
+ else
24
+ puts "warning: light status - #{response}"
25
+ -1
26
+ end
28
27
  end
29
28
 
30
29
  def get_info(selector)
@@ -1,3 +1,3 @@
1
1
  module LifxHttp
2
- VERSION = "0.2.0"
2
+ VERSION = "0.2.1"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: lifx_http
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.0
4
+ version: 0.2.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Lucas Parry