sip2 0.2.3 → 0.2.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/sip2/connection.rb +2 -2
- data/lib/sip2/messages/base.rb +3 -3
- data/lib/sip2/non_blocking_socket.rb +4 -4
- data/lib/sip2/version.rb +1 -1
- metadata +9 -8
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 7ef89c74848c5fbf09675afeb914f52985512f780fdcdc086288cebf6cd245c1
|
4
|
+
data.tar.gz: db0228463ed3b7466c650d4f3882befa65deeebbdd7433692698321dcada9a4b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 3b57c2fc70a1514c5bd29741b5ec07f08f539105231ba0849f27e62d960e12d667a9e1dc22a089ddd250a85fef82497fc1ba0c3821060c651179bd8880d9ae9d
|
7
|
+
data.tar.gz: 056c703e7f951b0aeb92b41322d050627f3c354162d6dc8af985a3ae1ca649e100be6620d3cbe68e36090a8c7c64b00a98ff647394c5260918b2a01f7da9bc1c
|
data/lib/sip2/connection.rb
CHANGED
@@ -25,12 +25,12 @@ module Sip2
|
|
25
25
|
@sequence += 1
|
26
26
|
end
|
27
27
|
|
28
|
-
def method_missing(method_name, *args)
|
28
|
+
def method_missing(method_name, *args, **kwargs)
|
29
29
|
message_class = Messages::Base.message_class_for_method(method_name)
|
30
30
|
if message_class.nil?
|
31
31
|
super
|
32
32
|
else
|
33
|
-
message_class.new(self).action_message(*args)
|
33
|
+
message_class.new(self).action_message(*args, **kwargs)
|
34
34
|
end
|
35
35
|
end
|
36
36
|
|
data/lib/sip2/messages/base.rb
CHANGED
@@ -42,8 +42,8 @@ module Sip2
|
|
42
42
|
# @return returns `nil` if there was no valid message returned.
|
43
43
|
# Otherwise value will depend on the specific message. See the `handle_response`
|
44
44
|
# method in those classes for more information
|
45
|
-
def action_message(
|
46
|
-
message = build_message(
|
45
|
+
def action_message(**args)
|
46
|
+
message = build_message(**args)
|
47
47
|
response = @connection.send_message message
|
48
48
|
return if response.nil?
|
49
49
|
|
@@ -52,7 +52,7 @@ module Sip2
|
|
52
52
|
|
53
53
|
private
|
54
54
|
|
55
|
-
def build_message(
|
55
|
+
def build_message(**)
|
56
56
|
raise NotImplementedError, "#{self.class} must implement `build_message` method"
|
57
57
|
end
|
58
58
|
|
@@ -30,9 +30,9 @@ module Sip2
|
|
30
30
|
# indicating the connection is in progress.
|
31
31
|
socket.connect_nonblock(sockaddr)
|
32
32
|
rescue IO::WaitWritable
|
33
|
-
#
|
34
|
-
#
|
35
|
-
if
|
33
|
+
# wait_writable waits until the socket is writable without blocking,
|
34
|
+
# and returns self or `nil` when times out
|
35
|
+
if socket.wait_writable(timeout)
|
36
36
|
begin
|
37
37
|
# Verify there is now a good connection
|
38
38
|
socket.connect_nonblock(sockaddr)
|
@@ -44,7 +44,7 @@ module Sip2
|
|
44
44
|
raise
|
45
45
|
end
|
46
46
|
else
|
47
|
-
#
|
47
|
+
# wait_writable returns nil when the socket is not ready before timeout
|
48
48
|
# seconds have elapsed
|
49
49
|
socket.close
|
50
50
|
raise ConnectionTimeout
|
data/lib/sip2/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: sip2
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.
|
4
|
+
version: 0.2.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- abrom
|
8
|
-
autorequire:
|
8
|
+
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2022-01-13 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -146,8 +146,9 @@ files:
|
|
146
146
|
homepage: https://github.com/Studiosity/sip2-ruby
|
147
147
|
licenses:
|
148
148
|
- MIT
|
149
|
-
metadata:
|
150
|
-
|
149
|
+
metadata:
|
150
|
+
rubygems_mfa_required: 'true'
|
151
|
+
post_install_message:
|
151
152
|
rdoc_options: []
|
152
153
|
require_paths:
|
153
154
|
- lib
|
@@ -155,15 +156,15 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
155
156
|
requirements:
|
156
157
|
- - ">="
|
157
158
|
- !ruby/object:Gem::Version
|
158
|
-
version: 2.
|
159
|
+
version: 2.5.0
|
159
160
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
160
161
|
requirements:
|
161
162
|
- - ">="
|
162
163
|
- !ruby/object:Gem::Version
|
163
164
|
version: '0'
|
164
165
|
requirements: []
|
165
|
-
rubygems_version: 3.
|
166
|
-
signing_key:
|
166
|
+
rubygems_version: 3.2.32
|
167
|
+
signing_key:
|
167
168
|
specification_version: 4
|
168
169
|
summary: SIP2 Ruby client
|
169
170
|
test_files: []
|