route_c 0.1.2 → 0.1.3

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.
checksums.yaml CHANGED
@@ -1,15 +1,15 @@
1
1
  ---
2
2
  !binary "U0hBMQ==":
3
3
  metadata.gz: !binary |-
4
- MTY2NmVkZjQ0ZjEyOGE1MmJjYTU3OWExMDhhM2UxNzg0ZjQzZmI3NQ==
4
+ Y2I5ZjBmZjIyNDVkZTU0NjViNDI0MjFlOTY1YTc1M2VkNDQzZWM5MQ==
5
5
  data.tar.gz: !binary |-
6
- ZjczMjdhMWJkYjE5MWU3MDkzYzFkYzVhZjcyMDNjOTk0MmIwNTg3Mg==
6
+ YmU3MTljMDk2MGZkZTg2Y2Q4Nzc1MjljMTE2YmEzZTE1NTNkZGIwZA==
7
7
  SHA512:
8
8
  metadata.gz: !binary |-
9
- YzM5MzExYzk4NTZhMzA3OTkxNzEyNjRkMTc3ZjAxZmUwOWQzZGUyNmY0ZWJk
10
- OTM4ZmM4YWIxM2I5ZTIzMDA4ODc2MjdkMGU3OWVmNTZjODRmZDQ3NDdhYmFj
11
- M2UzOGY5YWM1OWE1MWE0MmYzNDkwMmFiY2M4YmEzNjg0NjEzNzI=
9
+ ODNiNDQxOGY0MjgyMDNlNWI4YmQ2MmJkYmE0ZDFhODc3NTdkZjdjMGI1Mjgz
10
+ YTdlMTljZjY1YWIxYWM5MjJmODM4OGQyNTRhOTI3MWRmYzEwNjEyMTIzYjdk
11
+ NDViYTc2OTU0NDgwOWE5YWVlN2NiODQ2ZTRhMTk3NjQ0YzJhZjg=
12
12
  data.tar.gz: !binary |-
13
- NGMxMTQ1MTE1MjE3ZDAzZjIyMzM4ZDBlY2E2M2JmZmM5ZDI2YWNjN2I1NWM3
14
- YTg0MTNmNjc1MGRiY2FlMzE5YWJjNGI1NjliNjEzMDcxNDcyZTc3ZjcyY2Mx
15
- MzJlNzUyYTVhNTBiNWQwM2U4NGI5MjQ3YjUyYTczYjkyYWQ1Zjg=
13
+ ZTJkODg1NjY3ZmRlYzVkZTQ1OGJmMTgxOTQ1YTcxZDE4N2VlOThhOGIyZGI3
14
+ YjE5NzdjNTJmN2VjMmZlNjgyZjRmNDllYWU0ZmJhMDYzOWYwMThhODcwNjlk
15
+ Zjk4MjhhMDAzOTA1YWE5MjExMzBmNzA3MDFjMzVhN2I2NzBlYjQ=
data/config/pins.yaml CHANGED
@@ -1,8 +1,11 @@
1
- - 15
2
- - 18
3
- - 23
4
- - 24
5
- - 25
6
- - 8
7
- - 7
8
- - 12
1
+ lights:
2
+ - 15
3
+ - 18
4
+ - 23
5
+ - 24
6
+ - 25
7
+ - 8
8
+ - 7
9
+ - 12
10
+
11
+ button: 21
data/lib/route_c/cli.rb CHANGED
@@ -43,15 +43,14 @@ module RouteC
43
43
  end
44
44
 
45
45
  print 'Waiting for you to push the button... '
46
- PiPiper.watch pin: 21 do
47
- watching
46
+ PiPiper.watch pin: Lights.button do
47
+ RouteC::CLI.new.watching
48
48
  end
49
49
 
50
50
  PiPiper.wait
51
51
  end
52
52
 
53
- private
54
-
53
+ no_tasks do
55
54
  def watching
56
55
  puts 'done'
57
56
  print 'Getting data... '
@@ -68,5 +67,6 @@ module RouteC
68
67
 
69
68
  print 'Waiting for you to push the button... '
70
69
  end
70
+ end
71
71
  end
72
72
  end
@@ -25,8 +25,11 @@ module RouteC
25
25
  end
26
26
 
27
27
  def self.pins
28
- YAML.load_file 'config/pins.yaml'
28
+ YAML.load_file('config/pins.yaml')['lights']
29
29
  end
30
30
 
31
+ def self.button
32
+ YAML.load_file('config/pins.yaml')['button']
33
+ end
31
34
  end
32
35
  end
@@ -1,3 +1,3 @@
1
1
  module RouteC
2
- VERSION = "0.1.2"
2
+ VERSION = "0.1.3"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: route_c
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.2
4
+ version: 0.1.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - pikesley
@@ -182,7 +182,6 @@ files:
182
182
  - Rakefile
183
183
  - bin/console
184
184
  - bin/setup
185
- - buttons.rb
186
185
  - config/config.yaml
187
186
  - config/pins.yaml
188
187
  - exe/routec
data/buttons.rb DELETED
@@ -1,8 +0,0 @@
1
- require 'pi_piper'
2
- include PiPiper
3
-
4
- after :pin => 21, :goes => :high do
5
- puts "Button pressed"
6
- end
7
-
8
- PiPiper.wait