itiscold 1.0.0 → 1.0.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (3) hide show
  1. checksums.yaml +4 -4
  2. data/lib/itiscold.rb +5 -1
  3. metadata +16 -2
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 80b7a340af5d1b8a90b096f0f6484a566d3a75c7
4
- data.tar.gz: 139a60181371e9e20fc7bcb1dbb5372982505e3f
3
+ metadata.gz: baeb51b5de66b8e9235bcb239504a9e30bb9dc41
4
+ data.tar.gz: 721c823a9712723ee5c50e6e40b45017ea3a16da
5
5
  SHA512:
6
- metadata.gz: bdd0edbd38a6a30703c6350e2bad504481cf7f589045c3c37c0ebd9b7e31663003f9ccb543c9183292bf45d076e3bd67f3c6e8036b2b1e8b4fa2507d8d8b4750
7
- data.tar.gz: b55e71a1b272bc680840c0cf540c85e7675067942db869d212df2a4bb3e818a575945d17e2daeaddd5eef6ecf020bc756aad198c10b0a4cd8ee883ed0b8ab88f
6
+ metadata.gz: 5819af1c525e6e2d646c0d4b5385751a134f00cf242365ea597bb1b3eddd23dee3462dcc592745101e9067da0a9666799ce44653a272283318be794e5c7cfe8e
7
+ data.tar.gz: 202c719103f2817e9044aa14f751293eb457c8b9c3092133be061ec01fec7c724efe1c901092b358676589029697e6e877c0491fbd4b0dd6139492e5847b1258
@@ -4,7 +4,7 @@ require 'webrick'
4
4
  require 'json'
5
5
 
6
6
  class Itiscold
7
- VERSION = '1.0.0'
7
+ VERSION = '1.0.1'
8
8
 
9
9
  class TTY
10
10
  include Termios
@@ -73,12 +73,16 @@ class Itiscold
73
73
 
74
74
  def self.open filename, speed = 115200
75
75
  f = File.open filename, File::RDWR|Fcntl::O_NOCTTY|Fcntl::O_NDELAY
76
+ f.binmode
76
77
  f.sync = true
77
78
 
78
79
  # enable blocking reads, otherwise read timeout won't work
79
80
  f.fcntl Fcntl::F_SETFL, f.fcntl(Fcntl::F_GETFL, 0) & ~Fcntl::O_NONBLOCK
80
81
 
81
82
  t = Termios.tcgetattr f
83
+ t.iflag = 0
84
+ t.oflag = 0
85
+ t.lflag = 0
82
86
  t = TTY.data_bits t, 8
83
87
  t = TTY.stop_bits t, 1
84
88
  t = TTY.parity t, :none
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: itiscold
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.0
4
+ version: 1.0.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Aaron Patterson
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2017-01-04 00:00:00.000000000 Z
11
+ date: 2017-01-06 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: ruby-termios
@@ -24,6 +24,20 @@ dependencies:
24
24
  - - "~>"
25
25
  - !ruby/object:Gem::Version
26
26
  version: '1'
27
+ - !ruby/object:Gem::Dependency
28
+ name: minitest
29
+ requirement: !ruby/object:Gem::Requirement
30
+ requirements:
31
+ - - "~>"
32
+ - !ruby/object:Gem::Version
33
+ version: '5.9'
34
+ type: :development
35
+ prerelease: false
36
+ version_requirements: !ruby/object:Gem::Requirement
37
+ requirements:
38
+ - - "~>"
39
+ - !ruby/object:Gem::Version
40
+ version: '5.9'
27
41
  - !ruby/object:Gem::Dependency
28
42
  name: rdoc
29
43
  requirement: !ruby/object:Gem::Requirement