sambala 0.8.7 → 0.8.8

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.
data/lib/sambala.rb CHANGED
@@ -99,7 +99,7 @@ class Sambala
99
99
  execute('del', opts[:mask], opts[:queue])[0]
100
100
  end
101
101
 
102
- # The exist? instance method is borrowed from Ruby File Class idiome.
102
+ # The maexist? instance method is borrowed from Ruby File Class idiome.
103
103
  # It is used to test the presence of files or directories on the server
104
104
  # === Parameters
105
105
  # * :mask = the mask matching the file or directory to look for.
@@ -45,7 +45,7 @@ class Sambala
45
45
  # result = exec_interactive('put','aFile.txt') # => [false, "aFile.txt does not exist\r\n"]
46
46
  def exec_interactive(command,data)
47
47
  id = @gardener.seed("#{command} #{data}")
48
- result = @gardener.harvest(id)
48
+ result = @gardener.harvest(:one,id)
49
49
  return result[:success], result[:message]
50
50
  end
51
51
 
@@ -0,0 +1,72 @@
1
+ #!/usr/bin/env ruby
2
+ $:.unshift File.join(File.dirname(__FILE__), "..", "lib")
3
+ # require 'test/unit'
4
+ # require 'rubygems'
5
+ require 'sambala'
6
+
7
+ puts "init"
8
+ begin
9
+ # b = Sambala.new( :domain => 'TCSMTLPROD',
10
+ # :host => 'modulagampc',
11
+ # :share => 'testBkp',
12
+ # :user => 'perronlo',
13
+ # :password => 'lpMOD1135',
14
+ # :threads => 4 )
15
+ # rescue Sambala::SmbInitError
16
+ # raise RuntimeError.exception("Couldn't initialise Sambala")
17
+ # end
18
+
19
+ b = Sambala.new( :domain => '',
20
+ :host => 'spiralgemini',
21
+ :share => 'geminishare',
22
+ :user => 'leelasheel',
23
+ :password => 'goLEELAubu',
24
+ :threads => 2 )
25
+ rescue Sambala::SmbInitError
26
+ raise RuntimeError.exception("Couldn't initialise Sambala")
27
+ end
28
+
29
+ puts "init Sambala done"
30
+ puts "sambala object: #{b.inspect}"
31
+ b.lowercase
32
+ puts "done lowercase"
33
+ # l = b.ls
34
+ l = b.ls(:mask => 'gen*')
35
+ puts "progress is: #{b.progress}"
36
+ puts "ls: #{l.inspect}"
37
+ # pu = b.put(:from => 'shoe.rb')
38
+ # puts "progress is: #{b.progress}"
39
+ # puts "put: #{pu.inspect}"
40
+
41
+ # g = b.get(:from => 'inin.rb')
42
+ # puts "get: #{g.inspect}"
43
+ v = b.volume
44
+ puts "progress is: #{b.progress}"
45
+ puts "volume: #{v.inspect}"
46
+
47
+ b.recurse
48
+ d = b.du
49
+ puts "progress is: #{b.progress}"
50
+ puts "du: #{d.inspect}"
51
+ # c = b.close
52
+ # puts "CCCCCCCCCC is: #{c.inspect}"
53
+
54
+ lsqueue = b.ls(:queue => true)
55
+ puts "lsqueue: #{lsqueue.inspect} #{lsqueue.class}"
56
+ # b.put(:from => 'ore.rb', :queue => true)
57
+ puts "progress is: #{b.progress}"
58
+ # b.get(:from => 'TEST.rb', :queue => true)
59
+ b.volume(:queue => true)
60
+ puts "progress is: #{b.progress}"
61
+ b.du(:queue => true)
62
+ puts "progress is: #{b.progress}"
63
+
64
+ res = b.queue_results
65
+ puts "results is: #{res.inspect}"
66
+ # sleep 1
67
+ # b.recurse
68
+ # l = b.ls
69
+ # puts "ls: #{l.inspect}"
70
+
71
+ c = b.close
72
+ puts "CCCCCCCCCC is: #{c.inspect}"
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: sambala
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.8.7
4
+ version: 0.8.8
5
5
  platform: ruby
6
6
  authors:
7
7
  - Louis-Philippe Perron
@@ -9,7 +9,7 @@ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
11
 
12
- date: 2009-01-13 00:00:00 -05:00
12
+ date: 2009-01-18 00:00:00 -05:00
13
13
  default_executable:
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
@@ -20,7 +20,7 @@ dependencies:
20
20
  requirements:
21
21
  - - ">="
22
22
  - !ruby/object:Gem::Version
23
- version: 1.1.1
23
+ version: 1.2.6
24
24
  version:
25
25
  description:
26
26
  email: lp@spiralix.org
@@ -33,6 +33,7 @@ extra_rdoc_files: []
33
33
  files:
34
34
  - lib/sambala.rb
35
35
  - lib/sambala_gardener.rb
36
+ - lib/test_sambala2.rb
36
37
  has_rdoc: true
37
38
  homepage: http://sambala.rubyforge.org/
38
39
  post_install_message: