humble_rpi-plugin-led 0.1.3 → 0.2.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- checksums.yaml.gz.sig +0 -0
- data/lib/humble_rpi-plugin-led.rb +15 -4
- data.tar.gz.sig +0 -0
- metadata +7 -7
- metadata.gz.sig +0 -0
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: e7c11bfdcebf86a9df185515a36aafc82ab77d3f
|
4
|
+
data.tar.gz: 4cd9021270a8100dbbe473669dc0a88f47296d18
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 10ddfc1f19585567873457e2833a93b7c56e88985b23443d86c63db2bcec55311aebaa285c051165fab789ffd458c1edf3a969b14e16fe62b27c13d0c3267839
|
7
|
+
data.tar.gz: d6b351d165800b68aa3ab85f420c6d5098a48aeda5bc41fc52aa7c415d700bbfa3fdbbc6c3ffcab1c2cbbec281746d341ee40e96f82356c2822d47f85a379b0b
|
checksums.yaml.gz.sig
CHANGED
Binary file
|
@@ -2,14 +2,23 @@
|
|
2
2
|
|
3
3
|
# file: humble_rpi-plugin-led.rb
|
4
4
|
|
5
|
-
require '
|
5
|
+
require 'rpi_led'
|
6
6
|
|
7
7
|
|
8
8
|
class HumbleRPiPluginLed
|
9
9
|
|
10
10
|
def initialize(settings: {}, variables: {})
|
11
11
|
|
12
|
-
|
12
|
+
x = settings[:pins]
|
13
|
+
|
14
|
+
@gpio_pins = case x
|
15
|
+
when Fixnum
|
16
|
+
[x]
|
17
|
+
when String
|
18
|
+
[x]
|
19
|
+
when Array
|
20
|
+
x
|
21
|
+
end
|
13
22
|
|
14
23
|
end
|
15
24
|
|
@@ -39,8 +48,10 @@ class HumbleRPiPluginLed
|
|
39
48
|
end
|
40
49
|
|
41
50
|
def start()
|
42
|
-
|
43
|
-
|
51
|
+
|
52
|
+
if @gpio_pins.any? then
|
53
|
+
@led = @gpio_pins.map{|x| RPiLed.new x}
|
54
|
+
end
|
44
55
|
|
45
56
|
end
|
46
57
|
|
data.tar.gz.sig
CHANGED
Binary file
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: humble_rpi-plugin-led
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.2.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- James Robertson
|
@@ -31,28 +31,28 @@ cert_chain:
|
|
31
31
|
DWZU516n825c7yCIYUbK4paHe+EmHf7LUyqjhB21vyAtbAXVBo9wFxFUrv8ledMm
|
32
32
|
5HwpZH8LZVos/A==
|
33
33
|
-----END CERTIFICATE-----
|
34
|
-
date:
|
34
|
+
date: 2016-04-09 00:00:00.000000000 Z
|
35
35
|
dependencies:
|
36
36
|
- !ruby/object:Gem::Dependency
|
37
|
-
name:
|
37
|
+
name: rpi_led
|
38
38
|
requirement: !ruby/object:Gem::Requirement
|
39
39
|
requirements:
|
40
40
|
- - "~>"
|
41
41
|
- !ruby/object:Gem::Version
|
42
|
-
version: '0.
|
42
|
+
version: '0.1'
|
43
43
|
- - ">="
|
44
44
|
- !ruby/object:Gem::Version
|
45
|
-
version: 0.
|
45
|
+
version: 0.1.1
|
46
46
|
type: :runtime
|
47
47
|
prerelease: false
|
48
48
|
version_requirements: !ruby/object:Gem::Requirement
|
49
49
|
requirements:
|
50
50
|
- - "~>"
|
51
51
|
- !ruby/object:Gem::Version
|
52
|
-
version: '0.
|
52
|
+
version: '0.1'
|
53
53
|
- - ">="
|
54
54
|
- !ruby/object:Gem::Version
|
55
|
-
version: 0.
|
55
|
+
version: 0.1.1
|
56
56
|
description:
|
57
57
|
email: james@r0bertson.co.uk
|
58
58
|
executables: []
|
metadata.gz.sig
CHANGED
Binary file
|