humble_rpi-plugin-led 0.1.3 → 0.2.0

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,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: d21fc8a0613afe70225bf9e7bcc9b24227bd457f
4
- data.tar.gz: 8795dc4e82abe8008e5871abb08d8e6aad7fcf2f
3
+ metadata.gz: e7c11bfdcebf86a9df185515a36aafc82ab77d3f
4
+ data.tar.gz: 4cd9021270a8100dbbe473669dc0a88f47296d18
5
5
  SHA512:
6
- metadata.gz: 919a6719425176681dbefdf71c1606e13ad926c77e2add830ff319e4cda7dc5b03523b18475c49da1e3b5e147900bae7073342311e96ae8b5e5b64567110ee3f
7
- data.tar.gz: 58e248a4403b2af65ef2ad7cc9abc975e443fdb8fcbd9ec43967e4a5831f02bfd5a13d99b03799f2fdd23aa5181eef31be3dd638047b84ecaee90b21a615deb2
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 'rpi'
5
+ require 'rpi_led'
6
6
 
7
7
 
8
8
  class HumbleRPiPluginLed
9
9
 
10
10
  def initialize(settings: {}, variables: {})
11
11
 
12
- @gpio_pins = settings[:pins]
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
- @led = RPi.new(@gpio_pins).pins if @gpio_pins.any?
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.1.3
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: 2015-09-26 00:00:00.000000000 Z
34
+ date: 2016-04-09 00:00:00.000000000 Z
35
35
  dependencies:
36
36
  - !ruby/object:Gem::Dependency
37
- name: rpi
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.2'
42
+ version: '0.1'
43
43
  - - ">="
44
44
  - !ruby/object:Gem::Version
45
- version: 0.2.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.2'
52
+ version: '0.1'
53
53
  - - ">="
54
54
  - !ruby/object:Gem::Version
55
- version: 0.2.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