dbrady-switchy 0.0.4 → 0.0.6

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.
Files changed (3) hide show
  1. data/bin/sparky +8 -7
  2. data/bin/switchy +11 -5
  3. metadata +1 -1
data/bin/sparky CHANGED
@@ -6,23 +6,23 @@
6
6
 
7
7
  def show_run
8
8
  # system "switchy 1 0 2 1 3 1 4 1"
9
- system "switchy 1 1 2 0 3 0 4 0"
9
+ system "switchy 1 1 2 0 3 0 4 0 5 0 6 0 7 0 8 0 9 0 10 1"
10
10
  end
11
11
 
12
- def show_pending
13
- system "switchy 1 0 2 1 3 0 4 0"
12
+ def show_fail
13
+ system "switchy 1 0 2 1 3 0 4 0 5 0 6 0 7 0 8 0 9 1 10 0"
14
14
  end
15
15
 
16
- def show_fail
17
- system "switchy 1 0 2 0 3 1 4 0"
16
+ def show_pending
17
+ system "switchy 1 0 2 0 3 1 4 0 5 0 6 0 7 0 8 1 9 0 10 0"
18
18
  end
19
19
 
20
20
  def show_pass
21
- system "switchy 1 0 2 0 3 0 4 1"
21
+ system "switchy 1 0 2 0 3 0 4 1 5 1 6 1 7 1 8 0 9 0 10 0"
22
22
  end
23
23
 
24
24
  def show_reset
25
- system "switchy 1 0 2 0 3 0 4 0"
25
+ system "switchy 1 0 2 0 3 0 4 0 5 0 6 0 7 0 8 0 9 0 10 0"
26
26
  end
27
27
 
28
28
  case ARGV[0].downcase
@@ -31,6 +31,7 @@ when "pending" then show_pending
31
31
  when "fail" then show_fail
32
32
  when "pass" then show_pass
33
33
  when "run" then show_run
34
+ when "test" then show_test
34
35
  else
35
36
  show_run
36
37
 
data/bin/switchy CHANGED
@@ -31,18 +31,24 @@ sleep 0.05
31
31
  lights = {
32
32
  0 => [nil, Switchy::PINS::D6 ],
33
33
  1 => [Switchy::PINS::C4, Switchy::PINS::C5 ],
34
- 2 => [Switchy::PINS::B7, Switchy::PINS::B6 ],
35
- 3 => [Switchy::PINS::B5, Switchy::PINS::B4 ],
36
- 4 => [Switchy::PINS::B3, Switchy::PINS::B2 ],
34
+ 2 => [Switchy::PINS::C6, Switchy::PINS::C7 ],
35
+ 3 => [Switchy::PINS::B7, Switchy::PINS::B6 ],
36
+ 4 => [Switchy::PINS::B5, Switchy::PINS::B4 ],
37
+ 5 => [Switchy::PINS::B3, Switchy::PINS::B2 ],
38
+ 6 => [Switchy::PINS::D7, Switchy::PINS::B0 ],
39
+ 7 => [Switchy::PINS::D5, Switchy::PINS::D6 ],
40
+ 8 => [Switchy::PINS::D3, Switchy::PINS::D4 ],
41
+ 9 => [Switchy::PINS::D1, Switchy::PINS::D2 ],
42
+ 10 => [Switchy::PINS::C2, Switchy::PINS::D0 ],
37
43
  }
38
44
 
39
45
  until args.empty?
40
46
  light = args.shift.to_i
41
47
  command = args.shift.to_i
42
48
 
43
- unless light >= 0 && light < 5
49
+ unless light >= 0 && light <= 10
44
50
  puts usage
45
- raise "ERROR: ARGV[1] must be between 0 and 4"
51
+ raise "ERROR: ARGV[1] must be between 0 and 10"
46
52
  end
47
53
 
48
54
  unless command >= 0 && command <= 1
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: dbrady-switchy
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.4
4
+ version: 0.0.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - David Brady