serialbar 0.0.1 → 0.0.2

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: 00293fd411b0ce3c80444a09c28fa28795c017fd
4
- data.tar.gz: b8f93a2ea2cb6501426436f846630a867541bc24
3
+ metadata.gz: abde4227024039963fc23dd8dbf8742d97a96611
4
+ data.tar.gz: cff49a391760e46e0ccdec08ee131ca7a1397c5c
5
5
  SHA512:
6
- metadata.gz: a4304f21fad39ea00df12213924c91286dcf3151820df1cd1acf568cd279b5440e000b4258c56bb980073a22715ed368a03f81415ec4e5e4a0271db2c041d6cd
7
- data.tar.gz: a000a0095d0738b287562fad4bc7ce0f57ce5c38593db4357569854f4feb61f84fd94f2f693de0fea36441b9e2a2ff891bd86086f5c089e0d3b93b29385e7b2d
6
+ metadata.gz: ef1aab0faae116751677fb193fb8607ec0d0068cb13504839714aa69adfad6650ffdd1c14fccaddc464b4a3ca68416abb4a5b20d63ac6135481c8a023174dfc9
7
+ data.tar.gz: 5a53482255a9d5e16aad36545482986d32937e75bb63719b752a9894f39b6369817132419c3d42fcc4231b930d20d000d956bfcf20df49cf1be7a16024c057ec
data/README.rdoc CHANGED
@@ -1,4 +1,4 @@
1
- = \Serialbox
1
+ = \Serialbar
2
2
 
3
3
  * http://github.com/jonbramble/serialbar
4
4
 
@@ -28,7 +28,7 @@ Configuration file for projects
28
28
 
29
29
  == INSTALL
30
30
 
31
- * gem install serialbar (not available just yet)
31
+ * gem install serialbar (available but not working well due to timers)
32
32
 
33
33
 
34
34
  == LICENSE:
@@ -1,4 +1,5 @@
1
1
  require 'serialport'
2
+ require 'set'
2
3
  require 'timers'
3
4
 
4
5
  module Serialbar
@@ -70,7 +71,7 @@ module Serialbar
70
71
  # * +n+ - number of seconds between each poll of the device
71
72
  #
72
73
  def poll_every_n_seconds(send,lines=1,n=1)
73
- timer = Timers.new
74
+ timer = Timers::Group.new
74
75
  every_seconds = timer.every(n) { parse(poll(send,lines)) }
75
76
  loop { timers.wait }
76
77
  end
@@ -87,7 +88,7 @@ module Serialbar
87
88
  # * +n+ - number of minutes between each poll of the device
88
89
  #
89
90
  def poll_every_n_minutes(send,lines=1,n=1)
90
- timer = Timers.new
91
+ timer = Timers::Group.new
91
92
  every_seconds = timer.every(60*n) { parse(poll(send,lines)) }
92
93
  loop { timers.wait }
93
94
  end
@@ -1,3 +1,3 @@
1
1
  module Serialbar
2
- VERSION = "0.0.1"
2
+ VERSION = "0.0.2"
3
3
  end
@@ -459,7 +459,7 @@
459
459
  "translate_tabs_to_spaces": true
460
460
  },
461
461
  "translation.x": -0.0,
462
- "translation.y": 255.0,
462
+ "translation.y": 0.0,
463
463
  "zoom_level": 1.0
464
464
  },
465
465
  "stack_index": 0,
@@ -39,9 +39,9 @@ RSpec.describe Listener do
39
39
  end
40
40
 
41
41
  it 'should return a serialport object' do
42
- pending("No serialports on this computer")
43
- this_should_not_get_executed
42
+ #pending("No serialports on this computer")
43
+ #this_should_not_get_executed
44
44
  @obj.setup("/dev/ttyS0") # don't have serialports on this test computer
45
- expect (@obj.serial_port).to be_instance_of SerialPort
45
+ expect(@obj.serial_port).to be_instance_of SerialPort
46
46
  end
47
47
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: serialbar
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.1
4
+ version: 0.0.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jonathan Bramble