limitless-led 0.1.2 → 0.1.3

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
  SHA1:
3
- metadata.gz: 48c2cd7a441fa6090aac967fb2ba78b13d381e9a
4
- data.tar.gz: 9e91be40af43bf636abecf70ea66d1fec72ae876
3
+ metadata.gz: 901d84dcf4e4266d3e24ee4950c04bab3bf4389f
4
+ data.tar.gz: a1df28ae5787020c6ba8140f8d64051b059eb959
5
5
  SHA512:
6
- metadata.gz: 3774e30806e61ee63d81082697c728ba0e91c2accd3f5897b30a8d87825c4b9b3b7cb4b3ae2d40c66fc71948edaee37f523bc61052f1153b1ca26a7e6cc07fcc
7
- data.tar.gz: facbe2ab87bb30d3545171ee1f444f21134765a4aa822960435fa255753f9bc9931a8b2da44da8918b1aadd72ce435ffb11c382197ed40081f1001f70e199889
6
+ metadata.gz: fad09f649db90300f7e37a6f2d83835e63b705b90e97eeb9d67608b3e47b53b09b7924c94a853a788d9fd353bde48b6914fcb8046a068290682c740dbbffd8d7
7
+ data.tar.gz: 44ab3440c26c8e0875c1ec3c600957d1210e33d207f820cc4740faa5ec61ed95b1ab7a70ba31a1f3430151d4d5da607505037762f10259879b772ccee780e610
data/README.md CHANGED
@@ -3,6 +3,7 @@
3
3
  [![Build Status](https://travis-ci.org/jpsilvashy/limitless-led.png?branch=master)](https://travis-ci.org/jpsilvashy/limitless-led)
4
4
  [![Dependency Status](https://gemnasium.com/jpsilvashy/limitless-led.png)](https://gemnasium.com/jpsilvashy/limitless-led)
5
5
  [![Code Climate](https://codeclimate.com/github/jpsilvashy/limitless-led.png)](https://codeclimate.com/github/jpsilvashy/limitless-led)
6
+ [![Coverage Status](https://coveralls.io/repos/jpsilvashy/limitless-led/badge.png)](https://coveralls.io/r/jpsilvashy/limitless-led)
6
7
 
7
8
  A Ruby gem for controlling the [LimitlessLED v3.0 RGBW color-changing light bulbs](http://www.limitlessled.com/), based on the official [LimitlessLED API documentation](http://www.limitlessled.com/dev/).
8
9
 
@@ -4,7 +4,7 @@ require 'limitless_led'
4
4
 
5
5
  # If you don't have a LimitlessLED handy you can start the development
6
6
  # server by running bin/server, it logs to stdout
7
- bridge = LimitlessLed::Bridge.new(host: 'localhost', port: 8899)
7
+ bridge = LimitlessLed::Bridge.new(host: "107.3.148.126", port: 8899)
8
8
 
9
9
  # Send in hex like this:
10
10
  bridge.color "#ff0000"
@@ -1,9 +1,9 @@
1
1
  #!/usr/bin/ruby
2
- require "limitless_led/version"
2
+ require "./lib/limitless_led/version"
3
3
 
4
- require "limitless_led/logger"
5
- require "limitless_led/bridge"
6
- require "limitless_led/server"
4
+ require "./lib/limitless_led/logger"
5
+ require "./lib/limitless_led/bridge"
6
+ require "./lib/limitless_led/server"
7
7
 
8
8
  module LimitlessLed
9
9
  class CommandNotImplemented < StandardError; end
@@ -59,13 +59,13 @@ module LimitlessLed
59
59
 
60
60
  # receive color as string like #ff0000 or a triplet
61
61
  # transform to HSL color
62
- color = Color::RGB.from_html(color).to_hsl
62
+ # color = Color::RGB.from_html(color).to_hsl
63
63
 
64
64
  # Transform color into value out of 255
65
- hue = color.hue / 360.0 * 255.0
65
+ # hue = ((-(color.to_hsl.hue - 240) % 360) / 360.0 * 255.0).to_i
66
66
 
67
67
  # send command
68
- send_packet "\x40#{ hue.to_i.chr }\x55"
68
+ send_packet "\x40#{ color.to_i.chr }\x55"
69
69
  end
70
70
 
71
71
  end
@@ -1,5 +1,5 @@
1
1
  #!/usr/bin/ruby
2
2
 
3
3
  module LimitlessLed
4
- VERSION = "0.1.2"
4
+ VERSION = "0.1.3"
5
5
  end
@@ -4,6 +4,7 @@ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
4
4
  require 'limitless_led/version'
5
5
 
6
6
  Gem::Specification.new do |spec|
7
+
7
8
  spec.name = "limitless-led"
8
9
  spec.version = LimitlessLed::VERSION
9
10
  spec.authors = ["Joseph Silvashy"]
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: limitless-led
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.2
4
+ version: 0.1.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Joseph Silvashy
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2013-12-03 00:00:00.000000000 Z
11
+ date: 2014-01-15 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rake
@@ -139,3 +139,4 @@ test_files:
139
139
  - spec/logger_spec.rb
140
140
  - spec/server_spec.rb
141
141
  - spec/spec_helper.rb
142
+ has_rdoc: