lifx 0.0.1 → 0.4.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (69) hide show
  1. checksums.yaml +4 -4
  2. data/.yardopts +1 -0
  3. data/Gemfile +10 -0
  4. data/LICENSE.txt +1 -1
  5. data/README.md +71 -13
  6. data/Rakefile +12 -0
  7. data/bin/lifx-console +15 -0
  8. data/bin/lifx-snoop +50 -0
  9. data/examples/auto-off/Gemfile +3 -0
  10. data/examples/auto-off/auto-off.rb +35 -0
  11. data/examples/identify/Gemfile +3 -0
  12. data/examples/identify/identify.rb +70 -0
  13. data/examples/travis-build-light/Gemfile +4 -0
  14. data/examples/travis-build-light/build-light.rb +57 -0
  15. data/lib/bindata_ext/bool.rb +29 -0
  16. data/lib/bindata_ext/record.rb +11 -0
  17. data/lib/lifx/client.rb +136 -0
  18. data/lib/lifx/color.rb +190 -0
  19. data/lib/lifx/config.rb +12 -0
  20. data/lib/lifx/firmware.rb +55 -0
  21. data/lib/lifx/gateway_connection.rb +177 -0
  22. data/lib/lifx/light.rb +406 -0
  23. data/lib/lifx/light_collection.rb +105 -0
  24. data/lib/lifx/light_target.rb +189 -0
  25. data/lib/lifx/logging.rb +11 -0
  26. data/lib/lifx/message.rb +166 -0
  27. data/lib/lifx/network_context.rb +200 -0
  28. data/lib/lifx/observable.rb +46 -0
  29. data/lib/lifx/protocol/address.rb +21 -0
  30. data/lib/lifx/protocol/device.rb +225 -0
  31. data/lib/lifx/protocol/header.rb +24 -0
  32. data/lib/lifx/protocol/light.rb +110 -0
  33. data/lib/lifx/protocol/message.rb +17 -0
  34. data/lib/lifx/protocol/metadata.rb +21 -0
  35. data/lib/lifx/protocol/payload.rb +7 -0
  36. data/lib/lifx/protocol/sensor.rb +29 -0
  37. data/lib/lifx/protocol/type.rb +134 -0
  38. data/lib/lifx/protocol/wan.rb +50 -0
  39. data/lib/lifx/protocol/wifi.rb +76 -0
  40. data/lib/lifx/protocol_path.rb +84 -0
  41. data/lib/lifx/routing_manager.rb +110 -0
  42. data/lib/lifx/routing_table.rb +33 -0
  43. data/lib/lifx/seen.rb +15 -0
  44. data/lib/lifx/site.rb +89 -0
  45. data/lib/lifx/tag_manager.rb +105 -0
  46. data/lib/lifx/tag_table.rb +47 -0
  47. data/lib/lifx/target.rb +23 -0
  48. data/lib/lifx/timers.rb +18 -0
  49. data/lib/lifx/transport/tcp.rb +81 -0
  50. data/lib/lifx/transport/udp.rb +67 -0
  51. data/lib/lifx/transport.rb +41 -0
  52. data/lib/lifx/transport_manager/lan.rb +140 -0
  53. data/lib/lifx/transport_manager.rb +34 -0
  54. data/lib/lifx/utilities.rb +33 -0
  55. data/lib/lifx/version.rb +1 -1
  56. data/lib/lifx.rb +15 -1
  57. data/lifx.gemspec +11 -7
  58. data/spec/color_spec.rb +45 -0
  59. data/spec/gateway_connection_spec.rb +32 -0
  60. data/spec/integration/client_spec.rb +40 -0
  61. data/spec/integration/light_spec.rb +43 -0
  62. data/spec/integration/tags_spec.rb +31 -0
  63. data/spec/message_spec.rb +163 -0
  64. data/spec/protocol_path_spec.rb +109 -0
  65. data/spec/routing_manager_spec.rb +22 -0
  66. data/spec/spec_helper.rb +52 -0
  67. data/spec/transport/udp_spec.rb +38 -0
  68. data/spec/transport_spec.rb +14 -0
  69. metadata +143 -26
metadata CHANGED
@@ -1,87 +1,191 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: lifx
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.1
4
+ version: 0.4.0
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: 2013-12-20 00:00:00.000000000 Z
11
+ date: 2014-03-23 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
- version: '0'
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
- version: '0'
26
+ version: '2.0'
27
+ - !ruby/object:Gem::Dependency
28
+ name: yell
29
+ requirement: !ruby/object:Gem::Requirement
30
+ requirements:
31
+ - - "~>"
32
+ - !ruby/object:Gem::Version
33
+ version: '2.0'
34
+ type: :runtime
35
+ prerelease: false
36
+ version_requirements: !ruby/object:Gem::Requirement
37
+ requirements:
38
+ - - "~>"
39
+ - !ruby/object:Gem::Version
40
+ version: '2.0'
41
+ - !ruby/object:Gem::Dependency
42
+ name: timers
43
+ requirement: !ruby/object:Gem::Requirement
44
+ requirements:
45
+ - - "~>"
46
+ - !ruby/object:Gem::Version
47
+ version: '2.0'
48
+ type: :runtime
49
+ prerelease: false
50
+ version_requirements: !ruby/object:Gem::Requirement
51
+ requirements:
52
+ - - "~>"
53
+ - !ruby/object:Gem::Version
54
+ version: '2.0'
55
+ - !ruby/object:Gem::Dependency
56
+ name: configatron
57
+ requirement: !ruby/object:Gem::Requirement
58
+ requirements:
59
+ - - "~>"
60
+ - !ruby/object:Gem::Version
61
+ version: '3.0'
62
+ type: :runtime
63
+ prerelease: false
64
+ version_requirements: !ruby/object:Gem::Requirement
65
+ requirements:
66
+ - - "~>"
67
+ - !ruby/object:Gem::Version
68
+ version: '3.0'
27
69
  - !ruby/object:Gem::Dependency
28
70
  name: bundler
29
71
  requirement: !ruby/object:Gem::Requirement
30
72
  requirements:
31
- - - ~>
73
+ - - "~>"
32
74
  - !ruby/object:Gem::Version
33
75
  version: '1.3'
34
76
  type: :development
35
77
  prerelease: false
36
78
  version_requirements: !ruby/object:Gem::Requirement
37
79
  requirements:
38
- - - ~>
80
+ - - "~>"
39
81
  - !ruby/object:Gem::Version
40
82
  version: '1.3'
41
83
  - !ruby/object:Gem::Dependency
42
84
  name: rake
43
85
  requirement: !ruby/object:Gem::Requirement
44
86
  requirements:
45
- - - '>='
87
+ - - "~>"
46
88
  - !ruby/object:Gem::Version
47
- version: '0'
89
+ version: '10.1'
48
90
  type: :development
49
91
  prerelease: false
50
92
  version_requirements: !ruby/object:Gem::Requirement
51
93
  requirements:
52
- - - '>='
94
+ - - "~>"
53
95
  - !ruby/object:Gem::Version
54
- version: '0'
96
+ version: '10.1'
55
97
  - !ruby/object:Gem::Dependency
56
98
  name: rspec
57
99
  requirement: !ruby/object:Gem::Requirement
58
100
  requirements:
59
- - - '>='
101
+ - - "~>"
60
102
  - !ruby/object:Gem::Version
61
- version: '0'
103
+ version: '2.14'
62
104
  type: :development
63
105
  prerelease: false
64
106
  version_requirements: !ruby/object:Gem::Requirement
65
107
  requirements:
66
- - - '>='
108
+ - - "~>"
67
109
  - !ruby/object:Gem::Version
68
- version: '0'
69
- description: Ruby client for LIFX
110
+ version: '2.14'
111
+ description: A Ruby gem that allows easy interaction with LIFX devices.
70
112
  email:
71
113
  - chendo@lifx.co
72
- executables: []
114
+ executables:
115
+ - lifx-console
116
+ - lifx-snoop
73
117
  extensions: []
74
118
  extra_rdoc_files: []
75
119
  files:
76
- - .gitignore
120
+ - ".gitignore"
121
+ - ".yardopts"
77
122
  - Gemfile
78
123
  - LICENSE.txt
79
124
  - README.md
80
125
  - Rakefile
126
+ - bin/lifx-console
127
+ - bin/lifx-snoop
128
+ - examples/auto-off/Gemfile
129
+ - examples/auto-off/auto-off.rb
130
+ - examples/identify/Gemfile
131
+ - examples/identify/identify.rb
132
+ - examples/travis-build-light/Gemfile
133
+ - examples/travis-build-light/build-light.rb
134
+ - lib/bindata_ext/bool.rb
135
+ - lib/bindata_ext/record.rb
81
136
  - lib/lifx.rb
137
+ - lib/lifx/client.rb
138
+ - lib/lifx/color.rb
139
+ - lib/lifx/config.rb
140
+ - lib/lifx/firmware.rb
141
+ - lib/lifx/gateway_connection.rb
142
+ - lib/lifx/light.rb
143
+ - lib/lifx/light_collection.rb
144
+ - lib/lifx/light_target.rb
145
+ - lib/lifx/logging.rb
146
+ - lib/lifx/message.rb
147
+ - lib/lifx/network_context.rb
148
+ - lib/lifx/observable.rb
149
+ - lib/lifx/protocol/address.rb
150
+ - lib/lifx/protocol/device.rb
151
+ - lib/lifx/protocol/header.rb
152
+ - lib/lifx/protocol/light.rb
153
+ - lib/lifx/protocol/message.rb
154
+ - lib/lifx/protocol/metadata.rb
155
+ - lib/lifx/protocol/payload.rb
156
+ - lib/lifx/protocol/sensor.rb
157
+ - lib/lifx/protocol/type.rb
158
+ - lib/lifx/protocol/wan.rb
159
+ - lib/lifx/protocol/wifi.rb
160
+ - lib/lifx/protocol_path.rb
161
+ - lib/lifx/routing_manager.rb
162
+ - lib/lifx/routing_table.rb
163
+ - lib/lifx/seen.rb
164
+ - lib/lifx/site.rb
165
+ - lib/lifx/tag_manager.rb
166
+ - lib/lifx/tag_table.rb
167
+ - lib/lifx/target.rb
168
+ - lib/lifx/timers.rb
169
+ - lib/lifx/transport.rb
170
+ - lib/lifx/transport/tcp.rb
171
+ - lib/lifx/transport/udp.rb
172
+ - lib/lifx/transport_manager.rb
173
+ - lib/lifx/transport_manager/lan.rb
174
+ - lib/lifx/utilities.rb
82
175
  - lib/lifx/version.rb
83
176
  - lifx.gemspec
84
- homepage: ''
177
+ - spec/color_spec.rb
178
+ - spec/gateway_connection_spec.rb
179
+ - spec/integration/client_spec.rb
180
+ - spec/integration/light_spec.rb
181
+ - spec/integration/tags_spec.rb
182
+ - spec/message_spec.rb
183
+ - spec/protocol_path_spec.rb
184
+ - spec/routing_manager_spec.rb
185
+ - spec/spec_helper.rb
186
+ - spec/transport/udp_spec.rb
187
+ - spec/transport_spec.rb
188
+ homepage: https://github.com/LIFX/lifx-gem
85
189
  licenses:
86
190
  - MIT
87
191
  metadata: {}
@@ -91,19 +195,32 @@ require_paths:
91
195
  - lib
92
196
  required_ruby_version: !ruby/object:Gem::Requirement
93
197
  requirements:
94
- - - '>='
198
+ - - ">="
95
199
  - !ruby/object:Gem::Version
96
- version: '0'
200
+ version: '2.1'
97
201
  required_rubygems_version: !ruby/object:Gem::Requirement
98
202
  requirements:
99
- - - '>='
203
+ - - ">="
100
204
  - !ruby/object:Gem::Version
101
205
  version: '0'
102
206
  requirements: []
103
207
  rubyforge_project:
104
- rubygems_version: 2.0.3
208
+ rubygems_version: 2.2.2
105
209
  signing_key:
106
210
  specification_version: 4
107
- summary: Ruby client for LIFX
108
- test_files: []
211
+ summary: A Ruby gem that allows easy interaction with LIFX devices. Handles discovery,
212
+ rate limiting, tags, gateway connections and provides an object-based API for interacting
213
+ with LIFX devices.
214
+ test_files:
215
+ - spec/color_spec.rb
216
+ - spec/gateway_connection_spec.rb
217
+ - spec/integration/client_spec.rb
218
+ - spec/integration/light_spec.rb
219
+ - spec/integration/tags_spec.rb
220
+ - spec/message_spec.rb
221
+ - spec/protocol_path_spec.rb
222
+ - spec/routing_manager_spec.rb
223
+ - spec/spec_helper.rb
224
+ - spec/transport/udp_spec.rb
225
+ - spec/transport_spec.rb
109
226
  has_rdoc: