blinky-tape-test-status 0.0.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: 3a2fcdcd66d4074f9242f0a309262ea66e8d82a1
4
+ data.tar.gz: 77bb359f3f88e26bcf398d654a3ad4f1d8c9e9f8
5
+ SHA512:
6
+ metadata.gz: 9fe710ab32b7c18939abc039fdb499eb94cfd45ff54e3c009550ec2d35081a25c42647d3fbad241f543c18fb2d5e733ca4bf74537b39c9cee6dba2fbfce22c00
7
+ data.tar.gz: 680fc86acce7599ace7e8935eea0bd686673c3ebc7981216d8c64a456421b643882fc4fd22e55affbc704ddce82fd0a65c3472dd992a3b472408ee025fe9a489
data/.gitignore ADDED
@@ -0,0 +1,18 @@
1
+ *.gem
2
+ *.rbc
3
+ .bundle
4
+ .config
5
+ coverage
6
+ InstalledFiles
7
+ lib/bundler/man
8
+ pkg
9
+ rdoc
10
+ spec/reports
11
+ test/tmp
12
+ test/version_tmp
13
+ tmp
14
+
15
+ # YARD artifacts
16
+ .yardoc
17
+ _yardoc
18
+ doc/
data/Gemfile ADDED
@@ -0,0 +1,4 @@
1
+ # A sample Gemfile
2
+ source "https://rubygems.org"
3
+
4
+ gem 'serialport'
data/LICENSE ADDED
@@ -0,0 +1,20 @@
1
+ The MIT License (MIT)
2
+
3
+ Copyright (c) 2013 Integrum
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy of
6
+ this software and associated documentation files (the "Software"), to deal in
7
+ the Software without restriction, including without limitation the rights to
8
+ use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
9
+ the Software, and to permit persons to whom the Software is furnished to do so,
10
+ 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, FITNESS
17
+ FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
18
+ COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
19
+ IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
20
+ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
data/README.md ADDED
@@ -0,0 +1,4 @@
1
+ blinky-tape-test-status-ruby
2
+ ============================
3
+
4
+ Ruby library for blinky-tape-test-status
@@ -0,0 +1,6 @@
1
+ #!/usr/bin/env ruby
2
+ require_relative "blinky-tape"
3
+
4
+ blinky_tape = BlinkyTape.new
5
+ blinky_tape.write! *ARGV
6
+ blinky_tape.quit!
@@ -0,0 +1,23 @@
1
+ $:.push File.expand_path("../lib", __FILE__)
2
+ require "blinky_tape_test_status/version"
3
+
4
+ Gem::Specification.new do |s|
5
+ s.name = 'blinky-tape-test-status'
6
+ s.version = BlinkyTapeTestStatus::VERSION
7
+ s.date = '2013-12-26'
8
+ s.summary = "blinky-tape-test-status"
9
+ s.description = "A Ruby interface for blinky-tape-test-status"
10
+ s.authors = ["Jade Meskill", "Roy van de Water"]
11
+ s.email = 'dev@integrumtech.com'
12
+
13
+ s.files = `git ls-files`.split("\n")
14
+ s.test_files = `git ls-files -- {test,spec,features}/*`.split("\n")
15
+ s.executables = `git ls-files -- bin/*`.split("\n").map{ |f| File.basename(f) }
16
+ s.require_paths = ["lib"]
17
+
18
+ s.add_runtime_dependency "serialport"
19
+
20
+ s.homepage =
21
+ 'http://rubygems.org/gems/blinky-tape-test-status'
22
+ s.license = 'MIT'
23
+ end
@@ -0,0 +1,56 @@
1
+ module BlinkyTapeTestStatus
2
+ class Base
3
+ def blue!
4
+ write! 'sb'
5
+ end
6
+
7
+ def color!(color)
8
+ write! color
9
+ end
10
+
11
+ def flash!
12
+ write! 'f'
13
+ end
14
+
15
+ def pulse!
16
+ write! 'p'
17
+ end
18
+
19
+ def quit!
20
+ serial_port.flush
21
+ serial_port.close
22
+ end
23
+
24
+ def rainbow!
25
+ write! 'x'
26
+ end
27
+
28
+ def shutdown!
29
+ blue!
30
+ quit!
31
+ end
32
+
33
+ def solid!
34
+ write! 's'
35
+ end
36
+
37
+ def test_sequence!
38
+ write! 't'
39
+ end
40
+
41
+ def write!(*commands)
42
+ commands.each do |command|
43
+ serial_port.puts command
44
+ end
45
+ end
46
+
47
+ protected
48
+ def serial_port
49
+ @serial_port ||= SerialPort.new '/dev/ttyACM0', 9600, 8, 1, SerialPort::NONE
50
+ end
51
+
52
+ def valid_port
53
+ return @valid_port if @valid_port
54
+ end
55
+ end
56
+ end
@@ -0,0 +1,3 @@
1
+ module BlinkyTapeTestStatus
2
+ VERSION = '0.0.1'
3
+ end
@@ -0,0 +1,4 @@
1
+ #!/usr/bin/env ruby
2
+ require "blinky_tape_test_status/base"
3
+ require "serialport"
4
+
metadata ADDED
@@ -0,0 +1,68 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: blinky-tape-test-status
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.0.1
5
+ platform: ruby
6
+ authors:
7
+ - Jade Meskill
8
+ - Roy van de Water
9
+ autorequire:
10
+ bindir: bin
11
+ cert_chain: []
12
+ date: 2013-12-26 00:00:00.000000000 Z
13
+ dependencies:
14
+ - !ruby/object:Gem::Dependency
15
+ name: serialport
16
+ requirement: !ruby/object:Gem::Requirement
17
+ requirements:
18
+ - - '>='
19
+ - !ruby/object:Gem::Version
20
+ version: '0'
21
+ type: :runtime
22
+ prerelease: false
23
+ version_requirements: !ruby/object:Gem::Requirement
24
+ requirements:
25
+ - - '>='
26
+ - !ruby/object:Gem::Version
27
+ version: '0'
28
+ description: A Ruby interface for blinky-tape-test-status
29
+ email: dev@integrumtech.com
30
+ executables:
31
+ - blinky-tape-test-tool
32
+ extensions: []
33
+ extra_rdoc_files: []
34
+ files:
35
+ - .gitignore
36
+ - Gemfile
37
+ - LICENSE
38
+ - README.md
39
+ - bin/blinky-tape-test-tool
40
+ - blinky-tape-test-status.gemspec
41
+ - lib/blinky_tape_test_status.rb
42
+ - lib/blinky_tape_test_status/base.rb
43
+ - lib/blinky_tape_test_status/version.rb
44
+ homepage: http://rubygems.org/gems/blinky-tape-test-status
45
+ licenses:
46
+ - MIT
47
+ metadata: {}
48
+ post_install_message:
49
+ rdoc_options: []
50
+ require_paths:
51
+ - lib
52
+ required_ruby_version: !ruby/object:Gem::Requirement
53
+ requirements:
54
+ - - '>='
55
+ - !ruby/object:Gem::Version
56
+ version: '0'
57
+ required_rubygems_version: !ruby/object:Gem::Requirement
58
+ requirements:
59
+ - - '>='
60
+ - !ruby/object:Gem::Version
61
+ version: '0'
62
+ requirements: []
63
+ rubyforge_project:
64
+ rubygems_version: 2.0.2
65
+ signing_key:
66
+ specification_version: 4
67
+ summary: blinky-tape-test-status
68
+ test_files: []