sambal 0.1.3 → 0.1.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +1 -1
- data/lib/sambal/version.rb +1 -1
- data/lib/sambal.rb +2 -2
- data/spec/spec_helper.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 7b315fa4d349b1e6fc99fce348c825260afdec5e
|
4
|
+
data.tar.gz: e83a5ecd892da523b93b2db62e6e850113de682f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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.
|
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
|
|
data/lib/sambal/version.rb
CHANGED
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
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.
|
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-
|
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.
|
65
|
+
rubygems_version: 2.2.3
|
66
66
|
signing_key:
|
67
67
|
specification_version: 4
|
68
68
|
summary: Ruby Samba Client
|