itiscold 1.0.0 → 1.0.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/itiscold.rb +5 -1
- metadata +16 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: baeb51b5de66b8e9235bcb239504a9e30bb9dc41
|
4
|
+
data.tar.gz: 721c823a9712723ee5c50e6e40b45017ea3a16da
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 5819af1c525e6e2d646c0d4b5385751a134f00cf242365ea597bb1b3eddd23dee3462dcc592745101e9067da0a9666799ce44653a272283318be794e5c7cfe8e
|
7
|
+
data.tar.gz: 202c719103f2817e9044aa14f751293eb457c8b9c3092133be061ec01fec7c724efe1c901092b358676589029697e6e877c0491fbd4b0dd6139492e5847b1258
|
data/lib/itiscold.rb
CHANGED
@@ -4,7 +4,7 @@ require 'webrick'
|
|
4
4
|
require 'json'
|
5
5
|
|
6
6
|
class Itiscold
|
7
|
-
VERSION = '1.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.
|
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-
|
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
|