blinky-cloud 1.0.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/.build/environment.pickle +12 -0
- data/.gitignore +34 -0
- data/Gemfile +3 -0
- data/Gemfile.lock +26 -0
- data/LICENSE +21 -0
- data/README.md +4 -0
- data/bin/blinky-cloud-broadcast +8 -0
- data/bin/blinky-cloud-listen +9 -0
- data/blinky-cloud.gemspec +23 -0
- data/lib/blinky_cloud/base.rb +13 -0
- data/lib/blinky_cloud/broadcaster.rb +9 -0
- data/lib/blinky_cloud/listener.rb +23 -0
- data/lib/blinky_cloud/version.rb +3 -0
- data/lib/blinky_cloud.rb +2 -0
- data/pre-push +3 -0
- metadata +90 -0
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA1:
|
3
|
+
metadata.gz: 3815abd6e5f56f931584461a97d0c20ebaf95f39
|
4
|
+
data.tar.gz: f8e28737cccd2d41c23a2d75e89491bcabe700ef
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: 54abbd5aab93d284217f391589dab0c30da8d45280c4f94e03250bb708a5765938623837f18ac630ab9d79fe43cfb432b7fb6cab780f375eed953cd4a1bc292f
|
7
|
+
data.tar.gz: 1ef2cea7071c61794a1a608ba7140a6df3509ba78d7c6e0c7ed220da54f4be1e6022fb5ed4f5a2e28a7cbed1598bfc9c0d80de2e5879e98ca59a18568578c0f0
|
data/.gitignore
ADDED
@@ -0,0 +1,34 @@
|
|
1
|
+
*.gem
|
2
|
+
*.rbc
|
3
|
+
/.config
|
4
|
+
/coverage/
|
5
|
+
/InstalledFiles
|
6
|
+
/pkg/
|
7
|
+
/spec/reports/
|
8
|
+
/test/tmp/
|
9
|
+
/test/version_tmp/
|
10
|
+
/tmp/
|
11
|
+
|
12
|
+
## Specific to RubyMotion:
|
13
|
+
.dat*
|
14
|
+
.repl_history
|
15
|
+
build/
|
16
|
+
|
17
|
+
## Documentation cache and generated files:
|
18
|
+
/.yardoc/
|
19
|
+
/_yardoc/
|
20
|
+
/doc/
|
21
|
+
/rdoc/
|
22
|
+
|
23
|
+
## Environment normalisation:
|
24
|
+
/.bundle/
|
25
|
+
/lib/bundler/man/
|
26
|
+
|
27
|
+
# for a library or gem, you might want to ignore these files since the code is
|
28
|
+
# intended to run in multiple environments; otherwise, check them in:
|
29
|
+
# Gemfile.lock
|
30
|
+
# .ruby-version
|
31
|
+
# .ruby-gemset
|
32
|
+
|
33
|
+
# unless supporting rvm < 1.11.0 or doing something fancy, ignore this:
|
34
|
+
.rvmrc
|
data/Gemfile
ADDED
data/Gemfile.lock
ADDED
@@ -0,0 +1,26 @@
|
|
1
|
+
PATH
|
2
|
+
remote: .
|
3
|
+
specs:
|
4
|
+
blinky-cloud (1.0.0)
|
5
|
+
blinky-tape-test-status
|
6
|
+
celluloid-io
|
7
|
+
|
8
|
+
GEM
|
9
|
+
remote: https://rubygems.org/
|
10
|
+
specs:
|
11
|
+
blinky-tape-test-status (1.1.0)
|
12
|
+
serialport
|
13
|
+
celluloid (0.15.2)
|
14
|
+
timers (~> 1.1.0)
|
15
|
+
celluloid-io (0.15.0)
|
16
|
+
celluloid (>= 0.15.0)
|
17
|
+
nio4r (>= 0.5.0)
|
18
|
+
nio4r (1.0.0)
|
19
|
+
serialport (1.3.0)
|
20
|
+
timers (1.1.0)
|
21
|
+
|
22
|
+
PLATFORMS
|
23
|
+
ruby
|
24
|
+
|
25
|
+
DEPENDENCIES
|
26
|
+
blinky-cloud!
|
data/LICENSE
ADDED
@@ -0,0 +1,21 @@
|
|
1
|
+
The MIT License (MIT)
|
2
|
+
|
3
|
+
Copyright (c) 2014 Resellers
|
4
|
+
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
7
|
+
in the Software without restriction, including without limitation the rights
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
10
|
+
furnished to do so, subject to the following conditions:
|
11
|
+
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
13
|
+
copies or substantial portions of the Software.
|
14
|
+
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
21
|
+
SOFTWARE.
|
data/README.md
ADDED
@@ -0,0 +1,9 @@
|
|
1
|
+
#!/usr/bin/env ruby
|
2
|
+
require 'rubygems'
|
3
|
+
require 'bundler/setup'
|
4
|
+
require 'blinky_cloud/listener'
|
5
|
+
require 'blinky_tape_test_status'
|
6
|
+
|
7
|
+
blinky = BlinkyTapeTestStatus::Base.new
|
8
|
+
listener = BlinkyCloud::Listener.new
|
9
|
+
listener.listen(lambda {|data| blinky.write! data})
|
@@ -0,0 +1,23 @@
|
|
1
|
+
$:.push File.expand_path("../lib", __FILE__)
|
2
|
+
require "blinky_cloud/version"
|
3
|
+
|
4
|
+
Gem::Specification.new do |s|
|
5
|
+
s.name = 'blinky-cloud'
|
6
|
+
s.version = BlinkyCloud::VERSION
|
7
|
+
s.summary = "blinky-cloud"
|
8
|
+
s.description = "A Ruby interface for blinky-cloud"
|
9
|
+
s.authors = ["Jade Meskill", "Roy van de Water", "Clayton Lengel-Zigich"]
|
10
|
+
s.email = 'dev@integrumtech.com'
|
11
|
+
|
12
|
+
s.files = `git ls-files`.split("\n")
|
13
|
+
s.test_files = `git ls-files -- {test,spec,features}/*`.split("\n")
|
14
|
+
s.executables = `git ls-files -- bin/*`.split("\n").map{ |f| File.basename(f) }
|
15
|
+
s.require_paths = ["lib"]
|
16
|
+
|
17
|
+
s.add_runtime_dependency "blinky-tape-test-status"
|
18
|
+
s.add_runtime_dependency 'celluloid-io'
|
19
|
+
|
20
|
+
s.homepage =
|
21
|
+
'http://rubygems.org/gems/blinky-cloud'
|
22
|
+
s.license = 'MIT'
|
23
|
+
end
|
@@ -0,0 +1,23 @@
|
|
1
|
+
require "ipaddr"
|
2
|
+
require 'blinky_cloud/base'
|
3
|
+
|
4
|
+
module BlinkyCloud
|
5
|
+
class Listener < BlinkyCloud::Base
|
6
|
+
BIND_ADDR = "0.0.0.0"
|
7
|
+
|
8
|
+
def listen(callback)
|
9
|
+
socket = UDPSocket.new
|
10
|
+
membership = IPAddr.new(MULTICAST_ADDR).hton + IPAddr.new(BIND_ADDR).hton
|
11
|
+
|
12
|
+
socket.setsockopt(:IPPROTO_IP, :IP_ADD_MEMBERSHIP, membership)
|
13
|
+
socket.setsockopt(:SOL_SOCKET, :SO_REUSEPORT, 1)
|
14
|
+
|
15
|
+
socket.bind(BIND_ADDR, PORT)
|
16
|
+
|
17
|
+
loop do
|
18
|
+
message, _ = socket.recvfrom(255)
|
19
|
+
callback.call(message)
|
20
|
+
end
|
21
|
+
end
|
22
|
+
end
|
23
|
+
end
|
data/lib/blinky_cloud.rb
ADDED
data/pre-push
ADDED
metadata
ADDED
@@ -0,0 +1,90 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: blinky-cloud
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 1.0.0
|
5
|
+
platform: ruby
|
6
|
+
authors:
|
7
|
+
- Jade Meskill
|
8
|
+
- Roy van de Water
|
9
|
+
- Clayton Lengel-Zigich
|
10
|
+
autorequire:
|
11
|
+
bindir: bin
|
12
|
+
cert_chain: []
|
13
|
+
date: 2014-04-08 00:00:00.000000000 Z
|
14
|
+
dependencies:
|
15
|
+
- !ruby/object:Gem::Dependency
|
16
|
+
name: blinky-tape-test-status
|
17
|
+
requirement: !ruby/object:Gem::Requirement
|
18
|
+
requirements:
|
19
|
+
- - ">="
|
20
|
+
- !ruby/object:Gem::Version
|
21
|
+
version: '0'
|
22
|
+
type: :runtime
|
23
|
+
prerelease: false
|
24
|
+
version_requirements: !ruby/object:Gem::Requirement
|
25
|
+
requirements:
|
26
|
+
- - ">="
|
27
|
+
- !ruby/object:Gem::Version
|
28
|
+
version: '0'
|
29
|
+
- !ruby/object:Gem::Dependency
|
30
|
+
name: celluloid-io
|
31
|
+
requirement: !ruby/object:Gem::Requirement
|
32
|
+
requirements:
|
33
|
+
- - ">="
|
34
|
+
- !ruby/object:Gem::Version
|
35
|
+
version: '0'
|
36
|
+
type: :runtime
|
37
|
+
prerelease: false
|
38
|
+
version_requirements: !ruby/object:Gem::Requirement
|
39
|
+
requirements:
|
40
|
+
- - ">="
|
41
|
+
- !ruby/object:Gem::Version
|
42
|
+
version: '0'
|
43
|
+
description: A Ruby interface for blinky-cloud
|
44
|
+
email: dev@integrumtech.com
|
45
|
+
executables:
|
46
|
+
- blinky-cloud-broadcast
|
47
|
+
- blinky-cloud-listen
|
48
|
+
extensions: []
|
49
|
+
extra_rdoc_files: []
|
50
|
+
files:
|
51
|
+
- ".build/environment.pickle"
|
52
|
+
- ".gitignore"
|
53
|
+
- Gemfile
|
54
|
+
- Gemfile.lock
|
55
|
+
- LICENSE
|
56
|
+
- README.md
|
57
|
+
- bin/blinky-cloud-broadcast
|
58
|
+
- bin/blinky-cloud-listen
|
59
|
+
- blinky-cloud.gemspec
|
60
|
+
- lib/blinky_cloud.rb
|
61
|
+
- lib/blinky_cloud/base.rb
|
62
|
+
- lib/blinky_cloud/broadcaster.rb
|
63
|
+
- lib/blinky_cloud/listener.rb
|
64
|
+
- lib/blinky_cloud/version.rb
|
65
|
+
- pre-push
|
66
|
+
homepage: http://rubygems.org/gems/blinky-cloud
|
67
|
+
licenses:
|
68
|
+
- MIT
|
69
|
+
metadata: {}
|
70
|
+
post_install_message:
|
71
|
+
rdoc_options: []
|
72
|
+
require_paths:
|
73
|
+
- lib
|
74
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
75
|
+
requirements:
|
76
|
+
- - ">="
|
77
|
+
- !ruby/object:Gem::Version
|
78
|
+
version: '0'
|
79
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
80
|
+
requirements:
|
81
|
+
- - ">="
|
82
|
+
- !ruby/object:Gem::Version
|
83
|
+
version: '0'
|
84
|
+
requirements: []
|
85
|
+
rubyforge_project:
|
86
|
+
rubygems_version: 2.0.14
|
87
|
+
signing_key:
|
88
|
+
specification_version: 4
|
89
|
+
summary: blinky-cloud
|
90
|
+
test_files: []
|