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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 11edbd7e4605f2e348428819ca7045156eca4b95a34161c6a38b0aef0a3e7846
4
- data.tar.gz: 854ee00429be13cc04ab99229dccdfc1a7055e106542d1e9c36c5f05a8d7b236
3
+ metadata.gz: 7ef89c74848c5fbf09675afeb914f52985512f780fdcdc086288cebf6cd245c1
4
+ data.tar.gz: db0228463ed3b7466c650d4f3882befa65deeebbdd7433692698321dcada9a4b
5
5
  SHA512:
6
- metadata.gz: 277765cd44b1086cda50dfb35393adaa25ff466e3c1cfb02ee2dd723471be68125b052b4741ab1178c6139c4c12571b31a95faa7d1fbc52058f075c676208fb2
7
- data.tar.gz: 62016708c1636bf81aaf39fcab683c241a472339d28285411716414bcc57dbf1238cf97d2c8eab2de103f6c6e5d23fccb8a6a66eb90865bec3b27ccb287473fd
6
+ metadata.gz: 3b57c2fc70a1514c5bd29741b5ec07f08f539105231ba0849f27e62d960e12d667a9e1dc22a089ddd250a85fef82497fc1ba0c3821060c651179bd8880d9ae9d
7
+ data.tar.gz: 056c703e7f951b0aeb92b41322d050627f3c354162d6dc8af985a3ae1ca649e100be6620d3cbe68e36090a8c7c64b00a98ff647394c5260918b2a01f7da9bc1c
@@ -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
 
@@ -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(*args)
46
- message = build_message(*args)
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
- # IO.select will block until the socket is writable or the timeout
34
- # is exceeded - whichever comes first.
35
- if IO.select(nil, [socket], nil, timeout)
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
- # IO.select returns nil when the socket is not ready before timeout
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
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Sip2
4
- VERSION = '0.2.3'
4
+ VERSION = '0.2.4'
5
5
  end
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.3
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: 2021-02-07 00:00:00.000000000 Z
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
- post_install_message:
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.4.0
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.0.6
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: []