nmspec 1.5.1.pre → 1.6.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/nmspec/ruby.rb +16 -0
- data/lib/nmspec/version.rb +1 -1
- metadata +4 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 623cc9040100821d82188aed5fab9a5ccfc979f05f20fc2499a6398e43655ac6
|
4
|
+
data.tar.gz: bc96d3e68527f8719b0d8490398a53e864d8ab2a6f158519c0c80b57c0923fb5
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 58e1ad610dcd31b97c2ed18d4a6073ddba15968c76b81392255c967a2cdc8277d75759c8868d7c1b5928d00f1c85ee643c914b2d2391e42058742278622b816d
|
7
|
+
data.tar.gz: de31f669d6fa2325a5ae64956fdc82cef7310926f7f404ec34382fb7ed66f36a9aea9406c3864658a303390c1dee14e12c07fa2c7bc9fe543d9462a753b6d2c5
|
data/lib/nmspec/ruby.rb
CHANGED
@@ -27,6 +27,8 @@ module Nmspec
|
|
27
27
|
|
28
28
|
code << _initialize
|
29
29
|
code << ''
|
30
|
+
code << _open?
|
31
|
+
code << ''
|
30
32
|
code << _close
|
31
33
|
code << ''
|
32
34
|
code << _bool_type
|
@@ -77,18 +79,32 @@ module Nmspec
|
|
77
79
|
|
78
80
|
code << ' def initialize(socket, no_delay=false)'
|
79
81
|
code << ' @socket = socket'
|
82
|
+
code << ' @open = true'
|
80
83
|
code << ' @socket.setsockopt(Socket::IPPROTO_TCP, Socket::TCP_NODELAY, 1) if no_delay'
|
81
84
|
code << ' end'
|
82
85
|
|
83
86
|
code
|
84
87
|
end
|
85
88
|
|
89
|
+
def _open?
|
90
|
+
code = []
|
91
|
+
|
92
|
+
code << ' ##'
|
93
|
+
code << ' # closes the socket inside this object'
|
94
|
+
code << ' def open?'
|
95
|
+
code << ' !!(@socket && @open)'
|
96
|
+
code << ' end'
|
97
|
+
|
98
|
+
code
|
99
|
+
end
|
100
|
+
|
86
101
|
def _close
|
87
102
|
code = []
|
88
103
|
|
89
104
|
code << ' ##'
|
90
105
|
code << ' # closes the socket inside this object'
|
91
106
|
code << ' def close'
|
107
|
+
code << ' @open = false'
|
92
108
|
code << ' @socket&.close'
|
93
109
|
code << ' end'
|
94
110
|
|
data/lib/nmspec/version.rb
CHANGED
@@ -1 +1 @@
|
|
1
|
-
NMSPEC_GEM_VERSION = '1.
|
1
|
+
NMSPEC_GEM_VERSION = '1.6.0'
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: nmspec
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 1.6.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Jeff Lunt
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2022-
|
11
|
+
date: 2022-06-11 00:00:00.000000000 Z
|
12
12
|
dependencies: []
|
13
13
|
description: nmspec makes it easier to describe binary messages between two network
|
14
14
|
peers via a config file, generate their network code in a number of languages, and
|
@@ -43,9 +43,9 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
43
43
|
version: '0'
|
44
44
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
45
45
|
requirements:
|
46
|
-
- - "
|
46
|
+
- - ">="
|
47
47
|
- !ruby/object:Gem::Version
|
48
|
-
version:
|
48
|
+
version: '0'
|
49
49
|
requirements: []
|
50
50
|
rubygems_version: 3.2.32
|
51
51
|
signing_key:
|