smb-client 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 +4 -4
 - data/lib/smb/client/client_helper.rb +6 -6
 - data/lib/smb/client/version.rb +1 -1
 - metadata +1 -1
 
    
        checksums.yaml
    CHANGED
    
    | 
         @@ -1,7 +1,7 @@ 
     | 
|
| 
       1 
1 
     | 
    
         
             
            ---
         
     | 
| 
       2 
2 
     | 
    
         
             
            SHA1:
         
     | 
| 
       3 
     | 
    
         
            -
              metadata.gz:  
     | 
| 
       4 
     | 
    
         
            -
              data.tar.gz:  
     | 
| 
      
 3 
     | 
    
         
            +
              metadata.gz: 96eea71fecefba2f3a5973df2a979475216e9e86
         
     | 
| 
      
 4 
     | 
    
         
            +
              data.tar.gz: 6c7bed837a020bcd672cdbd8267c4007209ee4ea
         
     | 
| 
       5 
5 
     | 
    
         
             
            SHA512:
         
     | 
| 
       6 
     | 
    
         
            -
              metadata.gz:  
     | 
| 
       7 
     | 
    
         
            -
              data.tar.gz:  
     | 
| 
      
 6 
     | 
    
         
            +
              metadata.gz: 9d41f96f0214cc1dbbb88a92b73afd3c6d0d5e76a8c8aa1e65d2cc539041252bfc6227beef75ceb5d5f92604583cc9837e378fe3154f0dad00edb17fdcfde5af
         
     | 
| 
      
 7 
     | 
    
         
            +
              data.tar.gz: b7d09e9d216e2676ff630779e543b4f2ed08fa78605269cf82e36427f170fb32a5ad7bf7ea78c4bc80f085608188f8ce76208cb251e279135471b658ce78257d
         
     | 
| 
         @@ -33,7 +33,7 @@ module SMB 
     | 
|
| 
       33 
33 
     | 
    
         
             
                # @param [Boolean] raise raise Error or just return +false+
         
     | 
| 
       34 
34 
     | 
    
         
             
                # @return [Boolean] true on success
         
     | 
| 
       35 
35 
     | 
    
         
             
                def mkdir(path, raise = true)
         
     | 
| 
       36 
     | 
    
         
            -
                  path = '"' + path + '"' if  
     | 
| 
      
 36 
     | 
    
         
            +
                  path = '"' + path + '"' if path.include? ' '
         
     | 
| 
       37 
37 
     | 
    
         
             
                  exec 'mkdir ' + path
         
     | 
| 
       38 
38 
     | 
    
         
             
                  true
         
     | 
| 
       39 
39 
     | 
    
         
             
                rescue Client::RuntimeError => e
         
     | 
| 
         @@ -46,7 +46,7 @@ module SMB 
     | 
|
| 
       46 
46 
     | 
    
         
             
                # @param [TrueClass/FalseClass] raise raise Error or just return +false+
         
     | 
| 
       47 
47 
     | 
    
         
             
                # @return [Boolean] true on success
         
     | 
| 
       48 
48 
     | 
    
         
             
                def rmdir(path, raise = true)
         
     | 
| 
       49 
     | 
    
         
            -
                  path = '"' + path + '"' if  
     | 
| 
      
 49 
     | 
    
         
            +
                  path = '"' + path + '"' if path.include? ' '
         
     | 
| 
       50 
50 
     | 
    
         
             
                  exec 'rmdir ' + path
         
     | 
| 
       51 
51 
     | 
    
         
             
                  true
         
     | 
| 
       52 
52 
     | 
    
         
             
                rescue Client::RuntimeError => e
         
     | 
| 
         @@ -65,8 +65,8 @@ module SMB 
     | 
|
| 
       65 
65 
     | 
    
         
             
                  if !overwrite && !ls_items.empty?
         
     | 
| 
       66 
66 
     | 
    
         
             
                    raise Client::RuntimeError, "File [#{to}] already exist"
         
     | 
| 
       67 
67 
     | 
    
         
             
                  end
         
     | 
| 
       68 
     | 
    
         
            -
                  from = '"' + from + '"' if  
     | 
| 
       69 
     | 
    
         
            -
                  to = '"' + to + '"' if  
     | 
| 
      
 68 
     | 
    
         
            +
                  from = '"' + from + '"' if from.include? ' '
         
     | 
| 
      
 69 
     | 
    
         
            +
                  to = '"' + to + '"' if to.include? ' '
         
     | 
| 
       70 
70 
     | 
    
         
             
                  exec 'put ' + from + ' ' + to
         
     | 
| 
       71 
71 
     | 
    
         
             
                  true
         
     | 
| 
       72 
72 
     | 
    
         
             
                rescue Client::RuntimeError => e
         
     | 
| 
         @@ -94,7 +94,7 @@ module SMB 
     | 
|
| 
       94 
94 
     | 
    
         
             
                # @param [Boolean] raise raise raise Error or just return +false+
         
     | 
| 
       95 
95 
     | 
    
         
             
                # @return [Boolean] true on success
         
     | 
| 
       96 
96 
     | 
    
         
             
                def del(path, raise = true)
         
     | 
| 
       97 
     | 
    
         
            -
                  path = '"' + path + '"' if  
     | 
| 
      
 97 
     | 
    
         
            +
                  path = '"' + path + '"' if path.include? ' '
         
     | 
| 
       98 
98 
     | 
    
         
             
                  exec 'del ' + path
         
     | 
| 
       99 
99 
     | 
    
         
             
                  true
         
     | 
| 
       100 
100 
     | 
    
         
             
                rescue Client::RuntimeError => e
         
     | 
| 
         @@ -121,7 +121,7 @@ module SMB 
     | 
|
| 
       121 
121 
     | 
    
         
             
                  if !overwrite && File.exist?(to)
         
     | 
| 
       122 
122 
     | 
    
         
             
                    raise Client::RuntimeError, "File [#{to}] already exist locally"
         
     | 
| 
       123 
123 
     | 
    
         
             
                  end
         
     | 
| 
       124 
     | 
    
         
            -
                  from = '"' + from + '"' if  
     | 
| 
      
 124 
     | 
    
         
            +
                  from = '"' + from + '"' if from.include? ' '
         
     | 
| 
       125 
125 
     | 
    
         
             
                  exec 'get ' + from + ' ' + to
         
     | 
| 
       126 
126 
     | 
    
         
             
                  to
         
     | 
| 
       127 
127 
     | 
    
         
             
                rescue Client::RuntimeError => e
         
     | 
    
        data/lib/smb/client/version.rb
    CHANGED