sambal 0.1.3 → 0.1.4

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: d09cf481cbaa004f81aa0d1e0a63a05f31c6254a
4
- data.tar.gz: 54a959308a5cddfd4505ea64711d6fa1bc49f8c5
3
+ metadata.gz: 7b315fa4d349b1e6fc99fce348c825260afdec5e
4
+ data.tar.gz: e83a5ecd892da523b93b2db62e6e850113de682f
5
5
  SHA512:
6
- metadata.gz: 88a88d87a5a1e103fb74f175bc20c07da0cc11ec229813aa0dd558fa777ef9318e8803fe5e9cbd106db05dadd931f75ee6c5562f2402c4f10b3c67d7113cc1c3
7
- data.tar.gz: e0c4b0595bc531661140661cbda95c5d87518eb5103e7cd0cb7ff4f1d22c6bcb4ad004c0902282783f08ecdd50054125a8219a61fce0b8366ea0920028a9d0fd
6
+ metadata.gz: 4c3dbced2ab1574ab38a4e6a0ac23f9c762cd6372a4bcd5f8e901a4276e8f7b04d49ef55a8ac8208ce2a7c36ce82becc03bfc43370ea64d880774935928be178
7
+ data.tar.gz: a238eac084d85cda8d13384660769033cb4c669f6e7e3ed37634bb8fa4f4bdf4cf1f56e80c7af1f1b0139ead241f13a570295c39025f3ad35fd0965eadb04c4f
data/README.md CHANGED
@@ -40,7 +40,7 @@ It should be available in a similar way on all major Linux distributions.
40
40
  client.put("local_file.txt","remote_file.txt") # uploads file to server
41
41
  client.put_content("My content here", "remote_file") # uploads content to a file on server
42
42
  client.get("remote_file.txt", "local_file.txt") # downloads file from server
43
- client.delete("remote_file.txt") # deletes files from server
43
+ client.del("remote_file.txt") # deletes files from server
44
44
  client.cd("some_directory") # changes directory on server
45
45
  client.close # closes connection
46
46
 
@@ -1,5 +1,5 @@
1
1
  # coding: UTF-8
2
2
 
3
3
  module Sambal
4
- VERSION = "0.1.3"
4
+ VERSION = "0.1.4"
5
5
  end
data/lib/sambal.rb CHANGED
@@ -45,7 +45,7 @@ module Sambal
45
45
  def initialize(options={})
46
46
  begin
47
47
  options = {domain: 'WORKGROUP', host: '127.0.0.1', share: '', user: 'guest', password: '--no-pass', port: 445}.merge(options)
48
- @o, @i, @pid = PTY.spawn("smbclient //#{options[:host]}/#{options[:share]} #{options[:password]} -W #{options[:domain]} -U #{options[:user]} -p #{options[:port]}")
48
+ @o, @i, @pid = PTY.spawn("smbclient \"//#{options[:host]}/#{options[:share]}\" \"#{options[:password]}\" -W \"#{options[:domain]}\" -U \"#{options[:user]}\" -p #{options[:port]}")
49
49
  #@o.set_encoding('UTF-8:UTF-8') ## don't know didn't work, we only have this problem when the files are named using non-english characters
50
50
  #@i.set_encoding('UTF-8:UTF-8')
51
51
  res = @o.expect(/(.*\n)?smb:.*\\>/, 10)[0] rescue nil
@@ -226,9 +226,9 @@ module Sambal
226
226
  end
227
227
 
228
228
  def close
229
- @i.printf("quit\n")
230
229
  @i.close
231
230
  @o.close
231
+ Process.wait(@pid)
232
232
  @connected = false
233
233
  end
234
234
 
data/spec/spec_helper.rb CHANGED
@@ -34,7 +34,7 @@ RSpec.configure do |config|
34
34
 
35
35
  ## perhaps this should be removed as well
36
36
  ## and done in Rakefile?
37
- config.color_enabled = true
37
+ config.color = true
38
38
  ## dont do this, do it in Rakefile instead
39
39
  #config.formatter = 'd'
40
40
 
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: sambal
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.3
4
+ version: 0.1.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - John Axel Eriksson
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-05-20 00:00:00.000000000 Z
11
+ date: 2015-06-10 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rspec
@@ -62,7 +62,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
62
62
  version: '0'
63
63
  requirements: []
64
64
  rubyforge_project:
65
- rubygems_version: 2.2.2
65
+ rubygems_version: 2.2.3
66
66
  signing_key:
67
67
  specification_version: 4
68
68
  summary: Ruby Samba Client