sip2 0.0.5 → 0.0.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: f30333741cfdb2fc75e81550b393199858254d79
4
- data.tar.gz: 044c4c7d037b87b73039fcf146be85b900fc6cef
3
+ metadata.gz: 1aec0c0b09594004dbe8cd002b6e42cf7f3ff42a
4
+ data.tar.gz: cf5bb8f8dca71964796f19ba752c721185859f52
5
5
  SHA512:
6
- metadata.gz: f62f077c16df1637d9b72c9da68ef25d9c672bd9e0a1c89f63539e8f88bedd84e488425a4f2e092a0361a26aa5a574e3ca6e84419afa9a8f29d862366d0ba7dd
7
- data.tar.gz: 1653dc9dc58314b8e0973e4d5a1a1e4b74b261945186cb5a29f5e6f3dafb8135ca2c73bf8dda9e03484b04c45778ff756a1ae9576dbe0a6d43f64cc3c6788b35
6
+ metadata.gz: fb560f6189c6e1a25a941bf6a8dab2b8a18cc836a39816333f23fa14c4510d4f70bb9cd56d1754cecc7f2388eb88d18d61c10001b3dcf7517eb138d4eb5908dd
7
+ data.tar.gz: eebef1706a4ef7d8070d84004541b11d7a6f1a8026b0d5c7b663232819a6b63c4e614455a6705014ce63226f0a2cb8acf215f61654fc8f1bff916ba70c3ffbbb
data/lib/sip2/client.rb CHANGED
@@ -11,10 +11,7 @@ module Sip2
11
11
 
12
12
  def connect
13
13
  socket = NonBlockingSocket.connect @host, @port
14
- if block_given?
15
- connection = Connection.new(socket, @ignore_error_detection)
16
- yield connection
17
- end
14
+ yield Connection.new(socket, @ignore_error_detection) if block_given?
18
15
  ensure
19
16
  socket.close if socket
20
17
  end
@@ -40,6 +40,7 @@ module Sip2
40
40
  message = send "build_#{message_type}_message", *args
41
41
  message = with_checksum with_error_detection message
42
42
  response = send_message message
43
+ return if response.nil?
43
44
  send "handle_#{message_type}_response", response
44
45
  end
45
46
 
@@ -27,12 +27,13 @@ module Sip2
27
27
 
28
28
  def inspect
29
29
  format(
30
- '#<%s:0x%p @patron_valid="%s" @email="%s" @authenticated="%s">',
31
- self.class.name,
32
- object_id,
33
- patron_valid?,
34
- email,
35
- authenticated?
30
+ '#<%<class_name>s:0x%<object_id>p @patron_valid="%<patron_valid>s"' \
31
+ ' @email="%<email>s" @authenticated="%<authenticated>s">',
32
+ class_name: self.class.name,
33
+ object_id: object_id,
34
+ patron_valid: patron_valid?,
35
+ email: email,
36
+ authenticated: authenticated?
36
37
  )
37
38
  end
38
39
 
data/lib/sip2/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module Sip2
2
- VERSION = '0.0.5'.freeze
2
+ VERSION = '0.0.6'.freeze
3
3
  end
data/sip2.gemspec CHANGED
@@ -1,4 +1,4 @@
1
- lib = File.expand_path('../lib', __FILE__)
1
+ lib = File.expand_path('lib', __dir__)
2
2
  $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
3
3
 
4
4
  require 'sip2/version'
@@ -11,7 +11,7 @@ Gem::Specification.new do |spec|
11
11
 
12
12
  spec.summary = '3M™ Standard Interchange Protocol v2 client implementation in Ruby'
13
13
  spec.description = '3M™ Standard Interchange Protocol v2 client implementation in Ruby'
14
- spec.homepage = 'https://github.com/TutoringAustralasia/sip2-ruby'
14
+ spec.homepage = 'https://github.com/Studiosity/sip2-ruby'
15
15
  spec.license = 'MIT'
16
16
 
17
17
  spec.files = `git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(spec)/}) }
@@ -19,9 +19,9 @@ Gem::Specification.new do |spec|
19
19
 
20
20
  spec.required_ruby_version = '>= 2.1.0'
21
21
 
22
- spec.add_development_dependency 'bundler', '~> 1.11'
23
- spec.add_development_dependency 'rake', '~> 10.0'
22
+ spec.add_development_dependency 'bundler', '>= 1.11'
23
+ spec.add_development_dependency 'rake', '>= 10.0'
24
24
  spec.add_development_dependency 'rspec', '~> 3.0'
25
- spec.add_development_dependency 'rubocop', '~> 0.48.1'
25
+ spec.add_development_dependency 'rubocop'
26
26
  spec.add_development_dependency 'timecop', '~> 0'
27
27
  end
metadata CHANGED
@@ -1,41 +1,41 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: sip2
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.5
4
+ version: 0.0.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - abrom
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2018-02-13 00:00:00.000000000 Z
11
+ date: 2018-03-13 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
15
15
  requirement: !ruby/object:Gem::Requirement
16
16
  requirements:
17
- - - "~>"
17
+ - - ">="
18
18
  - !ruby/object:Gem::Version
19
19
  version: '1.11'
20
20
  type: :development
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
- - - "~>"
24
+ - - ">="
25
25
  - !ruby/object:Gem::Version
26
26
  version: '1.11'
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: rake
29
29
  requirement: !ruby/object:Gem::Requirement
30
30
  requirements:
31
- - - "~>"
31
+ - - ">="
32
32
  - !ruby/object:Gem::Version
33
33
  version: '10.0'
34
34
  type: :development
35
35
  prerelease: false
36
36
  version_requirements: !ruby/object:Gem::Requirement
37
37
  requirements:
38
- - - "~>"
38
+ - - ">="
39
39
  - !ruby/object:Gem::Version
40
40
  version: '10.0'
41
41
  - !ruby/object:Gem::Dependency
@@ -56,16 +56,16 @@ dependencies:
56
56
  name: rubocop
57
57
  requirement: !ruby/object:Gem::Requirement
58
58
  requirements:
59
- - - "~>"
59
+ - - ">="
60
60
  - !ruby/object:Gem::Version
61
- version: 0.48.1
61
+ version: '0'
62
62
  type: :development
63
63
  prerelease: false
64
64
  version_requirements: !ruby/object:Gem::Requirement
65
65
  requirements:
66
- - - "~>"
66
+ - - ">="
67
67
  - !ruby/object:Gem::Version
68
- version: 0.48.1
68
+ version: '0'
69
69
  - !ruby/object:Gem::Dependency
70
70
  name: timecop
71
71
  requirement: !ruby/object:Gem::Requirement
@@ -103,7 +103,7 @@ files:
103
103
  - lib/sip2/patron_information.rb
104
104
  - lib/sip2/version.rb
105
105
  - sip2.gemspec
106
- homepage: https://github.com/TutoringAustralasia/sip2-ruby
106
+ homepage: https://github.com/Studiosity/sip2-ruby
107
107
  licenses:
108
108
  - MIT
109
109
  metadata: {}