ruboty-pi_gpio 0.1.0 → 0.1.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 456dc6bcc3362889dd2a91251a4217f09acd2d15
4
- data.tar.gz: 0541ab66806548ddb6fc78117008d45b97d2475c
3
+ metadata.gz: a68e20e290191e0a9e4878a368741085ee20b685
4
+ data.tar.gz: 53cef26f3e49f0fa467a6d60db2ab888b12eef3b
5
5
  SHA512:
6
- metadata.gz: bbc76f7b82b1c7115f1f273706a0a0748bd5e217fdfb8c44dce28753ff21bc5ca3a0d7df5297d07e62462ce93579c985291d5661450c5bed875711ff669bb771
7
- data.tar.gz: 5d568a1a6e34081ec8ba23cc13bb07cfca9d430f3ce79b1fe7ce5a675089ec1404d26a89d2ffc0dbd09465b3b6531e24f47d48391de04e839b097fe5150d82bf
6
+ metadata.gz: 7ba01c18625e2e3b520530004cab16a89da83580a38693c2f213981b20b360e2fb683ad92742876fc71a40e10a2bc9505e6c64d7380c5aae6f041db68baa191d
7
+ data.tar.gz: 2ce1cf2162cd6298512a4a58e671af76c3beb6413fd9cd1b860ba3f22cdc8ff310703d096ae0e14596740dd1fe3c05d8f3ec6df80c78a7ca3348ef4562b024e5
@@ -10,15 +10,15 @@ module Ruboty
10
10
  Ruboty::PiGpio::Actions::Mode.new(message).call
11
11
  end
12
12
 
13
- def write
13
+ def write(message)
14
14
  Ruboty::PiGpio::Actions::Write.new(message).call
15
15
  end
16
16
 
17
- def read
17
+ def read(message)
18
18
  Ruboty::PiGpio::Actions::Read.new(message).call
19
19
  end
20
20
 
21
- def unexport
21
+ def unexport(message)
22
22
  Ruboty::PiGpio::Actions::Unexport.new(message).call
23
23
  end
24
24
  end
@@ -1,5 +1,5 @@
1
1
  module Ruboty
2
2
  module PiGpio
3
- VERSION = "0.1.0"
3
+ VERSION = "0.1.1"
4
4
  end
5
5
  end
@@ -8,6 +8,8 @@ require "ruboty/pi_gpio/actions/unexport"
8
8
 
9
9
  END {
10
10
  Dir.glob('/sys/class/gpio/gpio*').each do |gpio|
11
- open('/sys/classs/gpio/unexport', 'w') { |f| f.write(gpio) }
11
+ if /gpio(?<pin>\d{,2})$/ =~ gpio
12
+ open('/sys/class/gpio/unexport', 'w') { |f| f.write(pin) }
13
+ end
12
14
  end
13
15
  }
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ruboty-pi_gpio
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - izumin5210