rservicebus 0.0.55 → 0.0.56
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/rservicebus/AppResource/Dir.rb +19 -1
- data/lib/rservicebus/Monitor/Dir.rb +2 -0
- metadata +1 -1
@@ -3,7 +3,25 @@ module RServiceBus
|
|
3
3
|
class AppResource_Dir<AppResource
|
4
4
|
|
5
5
|
def connect(uri)
|
6
|
-
|
6
|
+
begin
|
7
|
+
inputDir = Dir.new( uri.path )
|
8
|
+
if !File.writable?( uri.path ) then
|
9
|
+
puts "*** Warning. Directory is not writable, #{uri.path}."
|
10
|
+
puts "*** Warning. Make the directory, #{uri.path}, writable and try again."
|
11
|
+
end
|
12
|
+
rescue Errno::ENOENT => e
|
13
|
+
puts "***** Directory does not exist, #{uri.path}."
|
14
|
+
puts "***** Create the directory, #{uri.path}, and try again."
|
15
|
+
puts "***** eg, mkdir #{uri.path}"
|
16
|
+
abort();
|
17
|
+
rescue Errno::ENOTDIR => e
|
18
|
+
puts "***** The specified path does not point to a directory, #{uri.path}."
|
19
|
+
puts "***** Either repoint path to a directory, or remove, #{uri.path}, and create it as a directory."
|
20
|
+
puts "***** eg, rm #{uri.path} && mkdir #{uri.path}"
|
21
|
+
abort();
|
22
|
+
end
|
23
|
+
|
24
|
+
return inputDir;
|
7
25
|
end
|
8
26
|
|
9
27
|
end
|
@@ -23,10 +23,12 @@ module RServiceBus
|
|
23
23
|
rescue Errno::ENOENT => e
|
24
24
|
puts "***** Directory does not exist, #{uri.path}."
|
25
25
|
puts "***** Create the directory, #{uri.path}, and try again."
|
26
|
+
puts "***** eg, mkdir #{uri.path}"
|
26
27
|
abort();
|
27
28
|
rescue Errno::ENOTDIR => e
|
28
29
|
puts "***** The specified path does not point to a directory, #{uri.path}."
|
29
30
|
puts "***** Either repoint path to a directory, or remove, #{uri.path}, and create it as a directory."
|
31
|
+
puts "***** eg, rm #{uri.path} && mkdir #{uri.path}"
|
30
32
|
abort();
|
31
33
|
end
|
32
34
|
|