smb-client 0.1.0 → 0.1.1

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
  SHA1:
3
- metadata.gz: 9611e08df4c60e4278781668b7ab2fc373432592
4
- data.tar.gz: 184445b65f712ad037d2473e71abb2695859c743
3
+ metadata.gz: 74e4c55cf1373694b5add4df963fdd2724e4530f
4
+ data.tar.gz: 261879d622d0e1f3e07d7e61f010dcf21d22e81e
5
5
  SHA512:
6
- metadata.gz: 6d351cb503ff2aaa09c95345860bc0847ab4a0d8dc969d41ef6524cd129fe7969d534bd4f56f0c9232accb5114fcc512623d7bbcffc8372b0f8d9e64cda7efce
7
- data.tar.gz: 91c220e9cfa602d920f0deeb2de33201d0dd8529aed86b94bf7b328cab10f4859a69c894c814150db319cf133d7b8b4ea2376e13f96a37fb78b4e5ff6c97adbb
6
+ metadata.gz: 237d79a37f9ec4ae6ea87a7bd4c35c2928937139b8543695e1e22373819df74e10c019415bf5ea03ae5bda77aaf05bc886e44b267b484df57dd627e57136554c
7
+ data.tar.gz: 242f5cfffd62044a694f516e17c1aa72bf2fbd6ef5a95f28a414e0d5f31fbbc42123fb1f38f76be2317ecb25d399c55576cb018fefad4205f3d697b0b6a18b74
data/.gitignore CHANGED
@@ -6,4 +6,5 @@
6
6
  /pkg/
7
7
  /spec/reports/
8
8
  /tmp/
9
- .idea/
9
+ .idea/
10
+ *.gem
data/README.md CHANGED
@@ -27,11 +27,14 @@ Or install it yourself as:
27
27
  ### Setup
28
28
 
29
29
  ```ruby
30
+ require 'smb/client'
31
+
30
32
  options = {
31
33
  host: 'Your host',
32
34
  user: 'username',
33
35
  share: 'share',
34
36
  password: 'password',
37
+ workgroup: 'WORKGROUP',
35
38
  version: 2
36
39
  }
37
40
  @smb_client = SMB::Client.new options
@@ -74,7 +77,7 @@ To install this gem onto your local machine, run `bundle exec rake install`. To
74
77
 
75
78
  ## Contributing
76
79
 
77
- Bug reports and pull requests are welcome on GitHub at https://github.com/RalfHerzog/smb-client. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the [Contributor Covenant](http://contributor-covenant.org) code of conduct.
80
+ Bug reports and pull requests are welcome on GitHub at https://github.com/NetcomKassel/smb-client. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the [Contributor Covenant](http://contributor-covenant.org) code of conduct.
78
81
 
79
82
  ## License
80
83
 
@@ -37,9 +37,11 @@ module SMB
37
37
  @first_message = true
38
38
 
39
39
  @connection_established = false
40
+ @shutdown_in_progress = false
40
41
  end
41
42
 
42
43
  def close
44
+ @shutdown_in_progress = true
43
45
  Process.kill('QUIT', @pid) == 1
44
46
  end
45
47
 
@@ -89,10 +91,12 @@ module SMB
89
91
  end
90
92
  end
91
93
  rescue Errno::EIO => e
92
- if @connection_established
93
- raise StandardError, "Unexpected error: [#{e.message}]"
94
- else
95
- raise Client::ConnectionError, 'Cannot connect to SMB server'
94
+ unless @shutdown_in_progress
95
+ if @connection_established
96
+ raise StandardError, "Unexpected error: [#{e.message}]"
97
+ else
98
+ raise Client::ConnectionError, 'Cannot connect to SMB server'
99
+ end
96
100
  end
97
101
  end
98
102
  end
@@ -1,5 +1,5 @@
1
1
  module SMB
2
2
  class Client
3
- VERSION = '0.1.0'.freeze
3
+ VERSION = '0.1.1'.freeze
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: smb-client
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ralf Herzog