rservicebus 0.1.21 → 0.1.23

Sign up to get free protection for your applications and to get access to all the features.
@@ -4,28 +4,16 @@ require "net/smb"
4
4
 
5
5
  class AppResource_Smb<AppResource
6
6
 
7
- def connect(uri)
8
- begin
9
- remote = smb.open( uri.path, "b" )
10
- #if !File.writable?( uri.path ) then
11
- # puts "*** Warning. Directory is not writable, #{uri.path}."
12
- # puts "*** Warning. Make the directory, #{uri.path}, writable and try again."
13
- #end
14
- rescue Errno::ENOENT => e
15
- puts "***** Directory does not exist, #{uri.path}."
16
- puts "***** Create the directory, #{uri.path}, and try again."
17
- puts "***** eg, mkdir #{uri.path}"
18
- abort();
19
- rescue Errno::ENOTDIR => e
20
- puts "***** The specified path does not point to a directory, #{uri.path}."
21
- puts "***** Either repoint path to a directory, or remove, #{uri.path}, and create it as a directory."
22
- puts "***** eg, rm #{uri.path} && mkdir #{uri.path}"
23
- abort();
24
- end
25
-
26
- return remote;
27
- end
28
-
29
- end
30
-
7
+ def processUri
8
+ parts = uri.path.split( "/" )
9
+ parts.shift
10
+ @share = parts.shift
11
+ @path = parts.join( "/" )
12
+
13
+ @smb = Net::SMB.new
14
+ @smb.auth_callback {|@uri.host, share|
15
+ [uri.user,uri.password]
16
+ }
17
+ end
18
+ end
31
19
  end
@@ -0,0 +1,14 @@
1
+ module RServiceBus
2
+
3
+
4
+ class AppResource_SmbDir<AppResource_Smb
5
+
6
+ def connect(uri)
7
+ self.processUri
8
+ remote = SMB.opendir( s, "b" )
9
+ return remote
10
+ end
11
+
12
+ end
13
+
14
+ end
@@ -0,0 +1,14 @@
1
+ module RServiceBus
2
+
3
+
4
+ class AppResource_SmbFile<AppResource_Smb
5
+
6
+ def connect(uri)
7
+ self.processUri
8
+ remote = SMB.open( s, "b" )
9
+ return remote
10
+ end
11
+
12
+ end
13
+
14
+ end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rservicebus
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.21
4
+ version: 0.1.23
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2013-09-18 00:00:00.000000000 Z
12
+ date: 2013-09-19 00:00:00.000000000 Z
13
13
  dependencies: []
14
14
  description: A Ruby interpretation of NServiceBus
15
15
  email: guy@guyirvine.com
@@ -36,6 +36,8 @@ files:
36
36
  - lib/rservicebus/AppResource/Redis.rb
37
37
  - lib/rservicebus/AppResource/ScpUpload.rb
38
38
  - lib/rservicebus/AppResource/Smb.rb
39
+ - lib/rservicebus/AppResource/SmbDir.rb
40
+ - lib/rservicebus/AppResource/SmbFile.rb
39
41
  - lib/rservicebus/AppResource/State.rb
40
42
  - lib/rservicebus/AppResource.rb
41
43
  - lib/rservicebus/Audit.rb