lifx 0.4.4 → 0.4.5

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: f5454b2eb54cd767b3967cf5a6846ec306522599
4
- data.tar.gz: 43f84ba663f3beece220825ca095d59417f6ab78
3
+ metadata.gz: e413317b0ac40abc57bdf3699b8373451b86614c
4
+ data.tar.gz: 39852a66321e7352078e56e4b8073c4cb98f067b
5
5
  SHA512:
6
- metadata.gz: 918213bcae91fd85b24f90b5db998b46e9064dbcecf8ac6929bfcd9a697c5511c8ca0efac5e87570274db43491a0b499584fa45fdf15e8b712b0b5a2272622ef
7
- data.tar.gz: a198a724a716d6444cdca5ba117d633ddc94c030dff4b3d31f49166740ec5009e6dda07dcda9760dcd5a5083426c48fee60515daaf582d90e9b6188aee112e71
6
+ metadata.gz: c75b51ea1267b7605c5bcaf74bc0daf4c298143aed8e7155f9969231fdc7658ed3ec018bcec9cea0a483fc0b327366db72ab7f2fe17a8ac1f45a7f49efc8eef7
7
+ data.tar.gz: 7b1b3274a505d44b2e793e1a616058bb4feb96054ea39ebbaf320c79e873f3550686c2a6c35ece2ec6cc0d99dd266fd96bf2b01fdf6e94c3b91b21b42dd03706
data/.travis.yml ADDED
@@ -0,0 +1,8 @@
1
+ language: ruby
2
+ bundler_args: --without development
3
+ notifications:
4
+ slack: lifx:z9PYWaIkFUpHw0aFu9mMQXDl
5
+ email: false
6
+ rvm:
7
+ - 2.0.0
8
+ - 2.1.1
data/CHANGES.md CHANGED
@@ -1,3 +1,10 @@
1
+ # 0.4.5
2
+
3
+ - Now supports Ruby 2.0
4
+ - Light#label can be nil
5
+ - Light#set_power and Light#set_power! now take :on and :off rather than magic number
6
+ - Use timers 1.x so no compilation is required
7
+
1
8
  # 0.4.4
2
9
 
3
10
  - Fix SO_REUSEPORT issue on older Linux kernels.
data/Gemfile CHANGED
@@ -10,5 +10,10 @@ group :development do
10
10
  gem 'yard'
11
11
  end
12
12
 
13
+ group :test do
14
+ gem 'rake', '~> 10.1'
15
+ gem 'rspec', '~> 2.14'
16
+ end
17
+
13
18
  # Specify your gem's dependencies in lifx.gemspec
14
19
  gemspec
data/README.md CHANGED
@@ -1,5 +1,7 @@
1
1
  # LIFX
2
2
 
3
+ [![Gem Version](https://badge.fury.io/rb/lifx.png)](https://rubygems.org/gems/lifx) [![Build Status](https://travis-ci.org/LIFX/lifx-gem.png)](https://travis-ci.org/LIFX/lifx-gem)
4
+
3
5
  This gem allows you to control your [LIFX](http://lifx.co) lights.
4
6
 
5
7
  It handles discovery, gateway connections, tags, and provides a object-based API
data/Rakefile CHANGED
@@ -1,4 +1,10 @@
1
1
  require "bundler/gem_tasks"
2
+ require "rspec/core/rake_task"
3
+
4
+ RSpec::Core::RakeTask.new(:spec) do |t|
5
+ t.rspec_opts = "--tag ~integration"
6
+ end
7
+ task :default => :spec
2
8
 
3
9
  task :console do
4
10
  require "lifx"
data/lib/lifx.rb CHANGED
@@ -2,6 +2,8 @@ require "lifx/version"
2
2
  require "bindata"
3
3
  require "bindata_ext/bool"
4
4
  require "bindata_ext/record"
5
+
6
+ require "lifx/required_keyword_arguments"
5
7
  require "lifx/utilities"
6
8
  require "lifx/logging"
7
9
 
@@ -66,7 +66,7 @@ module LIFX
66
66
  @tcp_attempts += 1
67
67
  logger.info("#{self}: Establishing connection to #{ip}:#{port}")
68
68
  @tcp_transport = Transport::TCP.new(ip, port)
69
- @tcp_transport.add_observer(self) do |message:, ip:, transport:|
69
+ @tcp_transport.add_observer(self) do |message: nil, ip: nil, transport: nil|
70
70
  notify_observers(message: message, ip: ip, transport: @tcp_transport)
71
71
  end
72
72
  @tcp_transport.listen
data/lib/lifx/light.rb CHANGED
@@ -11,6 +11,7 @@ module LIFX
11
11
  include LightTarget
12
12
  include Logging
13
13
  include Utilities
14
+ include RequiredKeywordArguments
14
15
 
15
16
  # @return [NetworkContext] NetworkContext the Light belongs to
16
17
  attr_reader :context
@@ -22,7 +23,7 @@ module LIFX
22
23
  # @param id: [String] Device ID of the Light
23
24
  # @param site_id: [String] Site ID of the Light. Avoid using when possible.
24
25
  # @param label: [String] Label of Light to prepopulate
25
- def initialize(context:, id:, site_id: nil, label: nil)
26
+ def initialize(context: required!(:context), id: id, site_id: nil, label: nil)
26
27
  @context = context
27
28
  @id = id
28
29
  @site_id = site_id
@@ -83,7 +84,7 @@ module LIFX
83
84
  # Returns the label of the light
84
85
  # @param refresh: [Boolean] If true, will request for current label
85
86
  # @param fetch: [Boolean] If false, it will not request current label if it's not cached
86
- # @return [String] Label
87
+ # @return [String, nil] Label
87
88
  def label(refresh: false, fetch: true)
88
89
  @label = nil if refresh
89
90
  send_message!(Protocol::Light::Get.new, wait_for: Protocol::Light::Get) if fetch && !@label
@@ -107,13 +108,20 @@ module LIFX
107
108
  self
108
109
  end
109
110
 
110
- # Set the power state to `level` synchronously.
111
- # This method cannot guarantee the message was received.
112
- # @param level [0, 1] 0 for off, 1 for on
111
+ # Set the power state to `state` synchronously.
112
+ # @param state [:on, :off]
113
113
  # @return [Light, LightCollection] self for chaining
114
- def set_power!(level)
114
+ def set_power!(state)
115
+ level = case state
116
+ when :on
117
+ 1
118
+ when :off
119
+ 0
120
+ else
121
+ raise ArgumentError.new("Must pass in either :on or :off")
122
+ end
115
123
  send_message!(Protocol::Device::SetPower.new(level: level), wait_for: Protocol::Device::StatePower) do |payload|
116
- if level.zero?
124
+ if level == 0
117
125
  payload.level == 0
118
126
  else
119
127
  payload.level > 0
@@ -125,13 +133,13 @@ module LIFX
125
133
  # Turns the light(s) on synchronously
126
134
  # @return [Light, LightCollection] self for chaining
127
135
  def turn_on!
128
- set_power!(1)
136
+ set_power!(:on)
129
137
  end
130
138
 
131
139
  # Turns the light(s) off synchronously
132
140
  # @return [Light, LightCollection]
133
141
  def turn_off!
134
- set_power!(0)
142
+ set_power!(:off)
135
143
  end
136
144
 
137
145
  # @see #power
@@ -356,7 +364,7 @@ module LIFX
356
364
  # @param block: [Proc] the block that is executed when the expected `wait_for` payload comes back. If the return value is false or nil, it will try to send the message again.
357
365
  # @return [Object] the truthy result of `block` is returned.
358
366
  # @raise [Timeout::Error]
359
- def send_message!(payload, wait_for:, wait_timeout: 3, timeout_exception: Timeout::Error, &block)
367
+ def send_message!(payload, wait_for: wait_for, wait_timeout: 3, timeout_exception: Timeout::Error, &block)
360
368
  if Thread.current[:sync_enabled]
361
369
  raise "Cannot use synchronous methods inside a sync block"
362
370
  end
@@ -385,7 +393,7 @@ module LIFX
385
393
  end
386
394
 
387
395
  add_hook(Protocol::Light::State) do |payload|
388
- @label = payload.label.to_s
396
+ @label = payload.label.snapshot
389
397
  @color = Color.from_struct(payload.color.snapshot)
390
398
  @power = payload.power.to_i
391
399
  @tags_field = payload.tags
@@ -6,6 +6,7 @@ module LIFX
6
6
  class LightCollection
7
7
  include LightTarget
8
8
  include Enumerable
9
+ include RequiredKeywordArguments
9
10
  extend Forwardable
10
11
 
11
12
  class TagNotFound < ArgumentError; end
@@ -22,7 +23,7 @@ module LIFX
22
23
  # @api private
23
24
  # @param context: [NetworkContext] NetworkContext this collection belongs to
24
25
  # @param tag: [String] Tag
25
- def initialize(context:, tag: nil)
26
+ def initialize(context: required!(:context), tag: nil)
26
27
  @context = context
27
28
  @tag = tag
28
29
  end
@@ -21,8 +21,8 @@ module LIFX
21
21
  # Attempts to apply a waveform to the light(s) asynchronously.
22
22
  # @note Don't use this directly.
23
23
  # @api private
24
- def set_waveform(color, waveform:,
25
- cycles:,
24
+ def set_waveform(color, waveform: required!(:waveform),
25
+ cycles: required!(:cycles),
26
26
  stream: 0,
27
27
  transient: true,
28
28
  period: 1.0,
@@ -138,12 +138,20 @@ module LIFX
138
138
  period: period)
139
139
  end
140
140
 
141
- # Attempts to set the power state to `value` asynchronously.
141
+ # Attempts to set the power state to `state` asynchronously.
142
142
  # This method cannot guarantee the message was received.
143
- # @param value [0, 1] 0 for off, 1 for on
143
+ # @param state [:on, :off]
144
144
  # @return [Light, LightCollection] self for chaining
145
- def set_power(value)
146
- send_message(Protocol::Device::SetPower.new(level: value))
145
+ def set_power(state)
146
+ level = case state
147
+ when :on
148
+ 1
149
+ when :off
150
+ 0
151
+ else
152
+ raise ArgumentError.new("Must pass in either :on or :off")
153
+ end
154
+ send_message(Protocol::Device::SetPower.new(level: level))
147
155
  self
148
156
  end
149
157
 
@@ -151,14 +159,14 @@ module LIFX
151
159
  # This method cannot guarantee the message was received.
152
160
  # @return [Light, LightCollection] self for chaining
153
161
  def turn_on
154
- set_power(1)
162
+ set_power(:on)
155
163
  end
156
164
 
157
165
  # Attempts to turn the light(s) off asynchronously.
158
166
  # This method cannot guarantee the message was received.
159
167
  # @return [Light, LightCollection] self for chaining
160
168
  def turn_off
161
- set_power(0)
169
+ set_power(:off)
162
170
  end
163
171
 
164
172
  # Requests light(s) to report their state
@@ -10,6 +10,7 @@ module LIFX
10
10
  include Timers
11
11
  include Logging
12
12
  include Utilities
13
+ include RequiredKeywordArguments
13
14
  extend Forwardable
14
15
 
15
16
  # NetworkContext stores lights and ties together TransportManager, TagManager and RoutingManager
@@ -24,7 +25,7 @@ module LIFX
24
25
  else
25
26
  raise ArgumentError.new("Unknown transport method: #{transport}")
26
27
  end
27
- @transport_manager.add_observer(self) do |message:, ip:, transport:|
28
+ @transport_manager.add_observer(self) do |message: nil, ip: nil, transport: nil|
28
29
  handle_message(message, ip, transport)
29
30
  end
30
31
 
@@ -60,7 +61,7 @@ module LIFX
60
61
  # @param target: [Target] Target of the message
61
62
  # @param payload: [Protocol::Payload] Message payload
62
63
  # @param acknowledge: [Boolean] If recipients must acknowledge with a response
63
- def send_message(target:, payload:, acknowledge: false)
64
+ def send_message(target: required!(:target), payload: required!(:payload), acknowledge: false)
64
65
  paths = @routing_manager.resolve_target(target)
65
66
 
66
67
  messages = paths.map do |path|
@@ -77,9 +78,10 @@ module LIFX
77
78
  end
78
79
  end
79
80
 
80
- protected def within_sync?
81
+ def within_sync?
81
82
  !!Thread.current[:sync_enabled]
82
83
  end
84
+ protected :within_sync?
83
85
 
84
86
  # Synchronize asynchronous set_color, set_waveform and set_power messages to multiple devices.
85
87
  # You cannot use synchronous methods in the block
@@ -0,0 +1,10 @@
1
+ module LIFX
2
+ module RequiredKeywordArguments
3
+ def required!(name)
4
+ backtrace = caller_locations(1).map { |c| c.to_s }
5
+ ex = ArgumentError.new("Missing required keyword argument '#{name}'")
6
+ ex.set_backtrace(backtrace)
7
+ raise ex
8
+ end
9
+ end
10
+ end
@@ -6,12 +6,14 @@ module LIFX
6
6
  # @private
7
7
  class RoutingManager
8
8
  include Utilities
9
+ include RequiredKeywordArguments
10
+
9
11
  # RoutingManager manages a routing table of site <-> device
10
12
  # It can resolve a target to ProtocolPaths and manages the TagTable
11
13
 
12
14
  attr_reader :context, :tag_table, :routing_table
13
15
 
14
- def initialize(context:)
16
+ def initialize(context: required!(:context))
15
17
  @context = context
16
18
  @routing_table = RoutingTable.new
17
19
  @tag_table = TagTable.new
@@ -7,7 +7,7 @@ module LIFX
7
7
  @device_site_mapping = entries
8
8
  end
9
9
 
10
- def update_table(site_id:, device_id:, tag_ids: nil)
10
+ def update_table(site_id: site_id, device_id: device_id, tag_ids: nil)
11
11
  device_mapping = @device_site_mapping[device_id] ||= Entry.new(site_id, device_id, [])
12
12
  device_mapping.site_id = site_id
13
13
  device_mapping.last_seen = Time.now
data/lib/lifx/site.rb CHANGED
@@ -10,10 +10,11 @@ module LIFX
10
10
  include Timers
11
11
  include Logging
12
12
  include Observable
13
+ include RequiredKeywordArguments
13
14
 
14
15
  attr_reader :id, :gateways, :tag_manager
15
16
 
16
- def initialize(id:)
17
+ def initialize(id: required!(:id))
17
18
  @id = id
18
19
  @gateways = {}
19
20
  @gateways_mutex = Mutex.new
@@ -8,17 +8,18 @@ module LIFX
8
8
  # Stores site <-> [tag_name, tag_id]
9
9
  include Utilities
10
10
  include Logging
11
+ include RequiredKeywordArguments
11
12
 
12
13
  attr_reader :context
13
14
 
14
15
  class TagLimitReached < StandardError; end
15
16
 
16
- def initialize(context:, tag_table:)
17
+ def initialize(context: required!(:context), tag_table: required!(:tag_table))
17
18
  @context = context
18
19
  @tag_table = tag_table
19
20
  end
20
21
 
21
- def create_tag(label:, site_id:)
22
+ def create_tag(label: required!(:label), site_id: required!(:site_id))
22
23
  id = next_unused_id_on_site_id(site_id)
23
24
  raise TagLimitReached if id.nil?
24
25
  # Add the entry for the tag we're about to create to prevent a case where
@@ -28,7 +29,7 @@ module LIFX
28
29
  payload: Protocol::Device::SetTagLabels.new(tags: id_to_tags_field(id), label: label))
29
30
  end
30
31
 
31
- def add_tag_to_device(tag:, device:)
32
+ def add_tag_to_device(tag: required!(:tag), device: required!(:device))
32
33
  tag_entry = entry_with(label: tag, site_id: device.site_id)
33
34
  if !tag_entry
34
35
  create_tag(label: tag, site_id: device.site_id)
@@ -42,7 +43,7 @@ module LIFX
42
43
  end
43
44
  end
44
45
 
45
- def remove_tag_from_device(tag:, device:)
46
+ def remove_tag_from_device(tag: required!(:tag), device: required!(:device))
46
47
  tag_entry = entry_with(label: tag, site_id: device.site_id)
47
48
  return if !tag_entry
48
49
 
@@ -24,7 +24,7 @@ module LIFX
24
24
  entries_with(**args).first
25
25
  end
26
26
 
27
- def update_table(tag_id:, label:, site_id:)
27
+ def update_table(tag_id: tag_id, label: label, site_id: site_id)
28
28
  entry = @entries[site_id][tag_id] ||= Entry.new(tag_id, label, site_id)
29
29
  entry.label = label
30
30
  end
@@ -32,7 +32,7 @@ module LIFX
32
32
  alias_method :inspect, :to_s
33
33
 
34
34
  def observer_callback_definition
35
- -> (message:, ip: nil, transport: nil) {}
35
+ -> (message: nil, ip: nil, transport: nil) {}
36
36
  end
37
37
  end
38
38
  end
@@ -71,7 +71,14 @@ module LIFX
71
71
  end
72
72
 
73
73
  def on_network?
74
- Socket.getifaddrs.any? { |ifaddr| ifaddr.broadaddr }
74
+ if Socket.respond_to?(:getifaddrs) # Ruby 2.1+
75
+ Socket.getifaddrs.any? { |ifaddr| ifaddr.broadaddr }
76
+ else # Ruby 2.0
77
+ Socket.ip_address_list.any? do |addrinfo|
78
+ # Not entirely sure how to check if on a LAN with IPv6
79
+ addrinfo.ipv4_private? || addrinfo.ipv6_unique_local?
80
+ end
81
+ end
75
82
  end
76
83
 
77
84
  def broadcast(message)
@@ -105,7 +112,7 @@ module LIFX
105
112
 
106
113
  def create_broadcast_transport
107
114
  @transport = Transport::UDP.new(@send_ip, @port)
108
- @transport.add_observer(self) do |message:, ip:, transport:|
115
+ @transport.add_observer(self) do |message: nil, ip: nil, transport: nil|
109
116
  handle_broadcast_message(message, ip, @transport)
110
117
  notify_observers(message: message, ip: ip, transport: transport)
111
118
  end
@@ -114,7 +121,7 @@ module LIFX
114
121
 
115
122
  def create_peer_transport
116
123
  @peer_transport = Transport::UDP.new('255.255.255.255', @peer_port)
117
- @peer_transport.add_observer(self) do |message:, ip:, transport:|
124
+ @peer_transport.add_observer(self) do |message: nil, ip: nil, transport: nil|
118
125
  notify_observers(message: message, ip: ip, transport: transport)
119
126
  end
120
127
  @peer_transport.listen(ip: @bind_ip)
data/lib/lifx/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module LIFX
2
- VERSION = "0.4.4"
2
+ VERSION = "0.4.5"
3
3
  end
data/lifx.gemspec CHANGED
@@ -7,7 +7,7 @@ Gem::Specification.new do |spec|
7
7
  spec.name = "lifx"
8
8
  spec.version = LIFX::VERSION
9
9
  spec.authors = ["Jack Chen (chendo)"]
10
- spec.email = ["chendo@lifx.co"]
10
+ spec.email = ["chendo+lifx-gem@lifx.co"]
11
11
  spec.description = %q{A Ruby gem that allows easy interaction with LIFX devices.}
12
12
  spec.summary = %q{A Ruby gem that allows easy interaction with LIFX devices. Handles discovery, rate limiting, tags, gateway connections and provides an object-based API for interacting with LIFX devices. }
13
13
  spec.homepage = "https://github.com/LIFX/lifx-gem"
@@ -17,13 +17,13 @@ Gem::Specification.new do |spec|
17
17
  spec.executables = spec.files.grep(%r{^bin/}) { |f| File.basename(f) }
18
18
  spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
19
19
  spec.require_paths = ["lib"]
20
- spec.required_ruby_version = ">= 2.1"
20
+ spec.required_ruby_version = ">= 2.0"
21
21
 
22
22
  spec.add_dependency "bindata", "~> 2.0"
23
23
  spec.add_dependency "yell", "~> 2.0"
24
- spec.add_dependency "timers", "~> 2.0"
24
+ spec.add_dependency "timers", "~> 1.0"
25
25
  spec.add_dependency "configatron", "~> 3.0"
26
26
  spec.add_development_dependency "bundler", "~> 1.3"
27
- spec.add_development_dependency "rake", '~> 10.1'
27
+ spec.add_development_dependency "rake", "~> 10.1"
28
28
  spec.add_development_dependency "rspec", "~> 2.14"
29
29
  end
@@ -19,7 +19,7 @@ module LIFX
19
19
  sleep 1
20
20
 
21
21
  msgs = []
22
- udp.add_observer(self) do |message:, ip:, transport:|
22
+ udp.add_observer(self) do |message: nil, ip: nil, transport: nil|
23
23
  msgs << message if message.payload.is_a?(Protocol::Light::SetWaveform)
24
24
  end
25
25
  udp.listen
@@ -4,18 +4,18 @@ module LIFX
4
4
  describe Light, integration: true do
5
5
  describe '#set_power' do
6
6
  it 'sets the power of the light asynchronously' do
7
- light.set_power(0)
7
+ light.set_power(:off)
8
8
  wait { expect(light).to be_off }
9
- light.set_power(1)
9
+ light.set_power(:on)
10
10
  wait { expect(light).to be_on }
11
11
  end
12
12
  end
13
13
 
14
14
  describe '#set_power!' do
15
15
  it 'sets the power of the light synchronously' do
16
- light.set_power!(0)
16
+ light.set_power!(:off)
17
17
  expect(light).to be_off
18
- light.set_power!(1)
18
+ light.set_power!(:on)
19
19
  expect(light).to be_on
20
20
  end
21
21
  end
data/spec/spec_helper.rb CHANGED
@@ -1,6 +1,9 @@
1
1
  require 'bundler'
2
2
  Bundler.require
3
- require 'pry'
3
+ begin
4
+ require 'pry'
5
+ rescue LoadError
6
+ end
4
7
 
5
8
  require 'lifx'
6
9
  require 'lifx/utilities'
@@ -24,6 +27,11 @@ shared_context 'integration', integration: true do
24
27
  lifx.flush
25
28
  end
26
29
 
30
+ let(:lights) { lifx.lights.with_tag('Test') }
31
+ let(:light) { lights.first }
32
+ end
33
+
34
+ module SpecHelpers
27
35
  def wait(timeout: 5, retry_wait: 0.1, &block)
28
36
  Timeout.timeout(timeout) do
29
37
  begin
@@ -36,14 +44,12 @@ shared_context 'integration', integration: true do
36
44
  rescue Timeout::Error
37
45
  block.call
38
46
  end
39
-
40
- let(:lights) { lifx.lights.with_tag('Test') }
41
- let(:light) { lights.first }
42
47
  end
43
48
 
44
49
  LIFX::Config.logger = Yell.new(STDERR) if ENV['DEBUG']
45
50
 
46
51
  RSpec.configure do |config|
52
+ config.include(SpecHelpers)
47
53
  config.formatter = 'documentation'
48
54
  config.color = true
49
55
  end
@@ -1,6 +1,6 @@
1
1
  require 'spec_helper'
2
2
 
3
- describe LIFX::Transport::UDP do
3
+ describe LIFX::Transport::UDP, integration: true do
4
4
  subject(:udp) { LIFX::Transport::UDP.new(host, port) }
5
5
 
6
6
  let(:host) { 'localhost' }
@@ -24,7 +24,7 @@ describe LIFX::Transport::UDP do
24
24
 
25
25
  it 'listens to the specified socket data, unpacks it and notifies observers' do
26
26
  messages = []
27
- udp.add_observer(self) do |message:, ip:, transport:|
27
+ udp.add_observer(self) do |message: nil, ip: nil, transport: nil|
28
28
  messages << message
29
29
  end
30
30
  udp.listen
@@ -33,8 +33,7 @@ describe LIFX::Transport::UDP do
33
33
  .with(raw_message)
34
34
  .and_return(message)
35
35
  socket.send(raw_message, 0, host, port)
36
- sleep 0.01
37
- expect(messages).to include(message)
36
+ wait { expect(messages).to include(message) }
38
37
  end
39
38
  end
40
39
  end
metadata CHANGED
@@ -1,123 +1,124 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: lifx
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.4
4
+ version: 0.4.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jack Chen (chendo)
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-03-25 00:00:00.000000000 Z
11
+ date: 2014-03-28 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bindata
15
15
  requirement: !ruby/object:Gem::Requirement
16
16
  requirements:
17
- - - "~>"
17
+ - - ~>
18
18
  - !ruby/object:Gem::Version
19
19
  version: '2.0'
20
20
  type: :runtime
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
- - - "~>"
24
+ - - ~>
25
25
  - !ruby/object:Gem::Version
26
26
  version: '2.0'
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: yell
29
29
  requirement: !ruby/object:Gem::Requirement
30
30
  requirements:
31
- - - "~>"
31
+ - - ~>
32
32
  - !ruby/object:Gem::Version
33
33
  version: '2.0'
34
34
  type: :runtime
35
35
  prerelease: false
36
36
  version_requirements: !ruby/object:Gem::Requirement
37
37
  requirements:
38
- - - "~>"
38
+ - - ~>
39
39
  - !ruby/object:Gem::Version
40
40
  version: '2.0'
41
41
  - !ruby/object:Gem::Dependency
42
42
  name: timers
43
43
  requirement: !ruby/object:Gem::Requirement
44
44
  requirements:
45
- - - "~>"
45
+ - - ~>
46
46
  - !ruby/object:Gem::Version
47
- version: '2.0'
47
+ version: '1.0'
48
48
  type: :runtime
49
49
  prerelease: false
50
50
  version_requirements: !ruby/object:Gem::Requirement
51
51
  requirements:
52
- - - "~>"
52
+ - - ~>
53
53
  - !ruby/object:Gem::Version
54
- version: '2.0'
54
+ version: '1.0'
55
55
  - !ruby/object:Gem::Dependency
56
56
  name: configatron
57
57
  requirement: !ruby/object:Gem::Requirement
58
58
  requirements:
59
- - - "~>"
59
+ - - ~>
60
60
  - !ruby/object:Gem::Version
61
61
  version: '3.0'
62
62
  type: :runtime
63
63
  prerelease: false
64
64
  version_requirements: !ruby/object:Gem::Requirement
65
65
  requirements:
66
- - - "~>"
66
+ - - ~>
67
67
  - !ruby/object:Gem::Version
68
68
  version: '3.0'
69
69
  - !ruby/object:Gem::Dependency
70
70
  name: bundler
71
71
  requirement: !ruby/object:Gem::Requirement
72
72
  requirements:
73
- - - "~>"
73
+ - - ~>
74
74
  - !ruby/object:Gem::Version
75
75
  version: '1.3'
76
76
  type: :development
77
77
  prerelease: false
78
78
  version_requirements: !ruby/object:Gem::Requirement
79
79
  requirements:
80
- - - "~>"
80
+ - - ~>
81
81
  - !ruby/object:Gem::Version
82
82
  version: '1.3'
83
83
  - !ruby/object:Gem::Dependency
84
84
  name: rake
85
85
  requirement: !ruby/object:Gem::Requirement
86
86
  requirements:
87
- - - "~>"
87
+ - - ~>
88
88
  - !ruby/object:Gem::Version
89
89
  version: '10.1'
90
90
  type: :development
91
91
  prerelease: false
92
92
  version_requirements: !ruby/object:Gem::Requirement
93
93
  requirements:
94
- - - "~>"
94
+ - - ~>
95
95
  - !ruby/object:Gem::Version
96
96
  version: '10.1'
97
97
  - !ruby/object:Gem::Dependency
98
98
  name: rspec
99
99
  requirement: !ruby/object:Gem::Requirement
100
100
  requirements:
101
- - - "~>"
101
+ - - ~>
102
102
  - !ruby/object:Gem::Version
103
103
  version: '2.14'
104
104
  type: :development
105
105
  prerelease: false
106
106
  version_requirements: !ruby/object:Gem::Requirement
107
107
  requirements:
108
- - - "~>"
108
+ - - ~>
109
109
  - !ruby/object:Gem::Version
110
110
  version: '2.14'
111
111
  description: A Ruby gem that allows easy interaction with LIFX devices.
112
112
  email:
113
- - chendo@lifx.co
113
+ - chendo+lifx-gem@lifx.co
114
114
  executables:
115
115
  - lifx-snoop
116
116
  extensions: []
117
117
  extra_rdoc_files: []
118
118
  files:
119
- - ".gitignore"
120
- - ".yardopts"
119
+ - .gitignore
120
+ - .travis.yml
121
+ - .yardopts
121
122
  - CHANGES.md
122
123
  - Gemfile
123
124
  - LICENSE.txt
@@ -157,6 +158,7 @@ files:
157
158
  - lib/lifx/protocol/wan.rb
158
159
  - lib/lifx/protocol/wifi.rb
159
160
  - lib/lifx/protocol_path.rb
161
+ - lib/lifx/required_keyword_arguments.rb
160
162
  - lib/lifx/routing_manager.rb
161
163
  - lib/lifx/routing_table.rb
162
164
  - lib/lifx/seen.rb
@@ -195,17 +197,17 @@ require_paths:
195
197
  - lib
196
198
  required_ruby_version: !ruby/object:Gem::Requirement
197
199
  requirements:
198
- - - ">="
200
+ - - '>='
199
201
  - !ruby/object:Gem::Version
200
- version: '2.1'
202
+ version: '2.0'
201
203
  required_rubygems_version: !ruby/object:Gem::Requirement
202
204
  requirements:
203
- - - ">="
205
+ - - '>='
204
206
  - !ruby/object:Gem::Version
205
207
  version: '0'
206
208
  requirements: []
207
209
  rubyforge_project:
208
- rubygems_version: 2.2.2
210
+ rubygems_version: 2.0.3
209
211
  signing_key:
210
212
  specification_version: 4
211
213
  summary: A Ruby gem that allows easy interaction with LIFX devices. Handles discovery,