birdbrain 0.9.5 → 0.9.6

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
  SHA256:
3
- metadata.gz: 3c97dbbf10c8bd37e84d77c71759400feaba7bac5212e299e55d0eae6f8a1350
4
- data.tar.gz: 2b56534b9f49f1126b25c3d8c9833e980ec160e613a0df6a0f910ac953a72404
3
+ metadata.gz: c19db414d18dc4c867da7c20996eac4776988a6d2cec9f647b0421331f497533
4
+ data.tar.gz: b1a327063e601aa60b6d52d14ac9839763a77605e8a8b026e73e413864247293
5
5
  SHA512:
6
- metadata.gz: 613d57a819451c0b50ef06ee7f2931a572b1df62b8e3e8b8ab26f00de58b566064f721a7b6229be6b58d867061b194a61dbe4bce9bcf92ea3eec6b684e32393b
7
- data.tar.gz: ff072dc975075212f67565716b343022fbaf6ad20394a35312d1a14560dd5df8f4332812bf876537849843157eaee241e5cada879bfc7ea18b264d3ef8f61317
6
+ metadata.gz: caf7ad0fd88ed312cef45ad0c57e5cf2dd1fa475a5fcb9af17c4ff548b6f56107333202246509cfdcd8658128566a433c8bd38333aaca81b1835be89b120b040
7
+ data.tar.gz: a7da2556c64c151423cc04fa108a3d6fc9cb5dc72aef2998c86c04bb94f0cb595c4b97132bd5ef491bf3b2c71763e8e0bc3f1116811acc2b8b28e3a780365041
@@ -18,16 +18,16 @@ class BirdbrainDevice
18
18
  end
19
19
 
20
20
  def self.connect(device = DEFAULT_DEVICE, raise_exception_if_no_connection = false)
21
+ device_object = new(device)
22
+
21
23
  raise(BirdbrainException, 'Missing device name') if device.nil?
22
24
  raise(BirdbrainException, "Invalid device name: #{device}") unless VALID_DEVICES.include?(device)
23
25
 
24
- device = new(device)
25
-
26
- device.connect
26
+ device_object.connect
27
27
 
28
- raise(BirdbrainException, 'No connection') if raise_exception_if_no_connection && !device.connected?
28
+ raise(BirdbrainException, 'No connection') if raise_exception_if_no_connection && !device_object.connected?
29
29
 
30
- device
30
+ device_object
31
31
  end
32
32
 
33
33
  def remap_device(device = DEFAULT_DEVICE)
@@ -4,5 +4,5 @@
4
4
  # frozen_string_literal: true
5
5
 
6
6
  module Birdbrain
7
- VERSION = '0.9.5'
7
+ VERSION = '0.9.6'
8
8
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: birdbrain
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.9.5
4
+ version: 0.9.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - fmorton
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2021-02-15 00:00:00.000000000 Z
11
+ date: 2021-02-16 00:00:00.000000000 Z
12
12
  dependencies: []
13
13
  description: This Ruby library allows students to use Ruby to read sensors and set
14
14
  motors and LEDs with the Birdbrain Technologies Hummingbird Bit and Finch 2. To