lp / sambala

Ruby wrapper around the smbclient command line utility, allowing access to Samba (SMB, CIFS) shares from Ruby.

This URL has Read+Write access

name age message
file README Wed Apr 08 06:29:07 -0700 2009 close the example [lp]
file Rakefile Fri Mar 13 08:56:53 -0700 2009 Rakefile to v0.9.8 [lp]
directory lib/ Fri May 29 10:56:47 -0700 2009 docs for updated ls [lp]
directory test/ Wed May 06 06:27:12 -0700 2009 testing all new recurse methods [lp]
README
  .|'''.|                     '||              '||          
  ||..  '   ....   .. .. ..    || ...   ....    ||   ....   
   ''|||.  '' .||   || || ||   ||'  || '' .||   ||  '' .||  
 .     '|| .|' ||   || || ||   ||    | .|' ||   ||  .|' ||  
 |'....|'  '|..'|' .|| || ||.  '|...'  '|..'|' .||. '|..'|' 


////////////////////////////////////////////////////////////////////////////////////////

 This class acts as a Ruby wrapper around the smbclient command line utility, allowing access to Samba (SMB, CIFS) 
 shares from Ruby.
 What's special about Sambala's implementation, is that it allows for both both queue
 and interactive commands operations.  While interactive mode is invoked in a blocking manner, the queue mode behaves as 
 a non-blocking, multi-threaded, background process.

 Sambala works on Unix derivatives operating systems (Linux, BSD, OSX, else), as long as the operating system has the 
 smbclient utility installed somewhere in the environment's PATH.
 
 Sambala supports most, but not all, smbclient features.  I didn't to this point implement commands relying on posix 
 server support, because I wanted Sambala to be server agnostic.  If some commands or interfaces you would like to use 
 is not supported by Sambala, email me and I may answer with a quick feature update when feasible.

///////////////////////////////////////////////////////////////////////////////////////

Example:

  samba = Sambala.new(  :domain   =>  'NTDOMAIN', 
                      :host     =>  'sambaserver',
                      :share    =>  'sambashare',
                      :user     =>  'walrus', 
                      :password =>  'eggman')
                      
  samba.cd('myfolder')   # =>  true
  samba.put(:from => 'aLocalFile.txt')    # =>  [false, "aLocalFile.txt does not exist\r\n"]
  samba.close

For detailed documentation refer to the online ruby-doc:
http://sambala.rubyforge.org/ruby-doc/

///////////////////////////////////////////////////////////////////////////////////////

Copyright (c) 2008 Louis-Philippe Perron

Permission is hereby granted, free of charge, to any person
obtaining a copy of this software and associated documentation
files (the "Software"), to deal in the Software without
restriction, including without limitation the rights to use,
copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the
Software is furnished to do so, subject to the following
conditions:

The above copyright notice and this permission notice shall be
included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
OTHER DEALINGS IN THE SOFTWARE.