From d790474151819168523ae9a3e8e8a8dd2b240c58 Mon Sep 17 00:00:00 2001 From: Robert Bavey Date: Mon, 31 Aug 2015 16:04:06 -0400 Subject: [PATCH] Avoid using Pathname to compute relative paths in spout Merge inadvertently changed inherited method to once again use Pathname to compute relative paths. This change once more allows the code to work either in a jar context, or a .rb file on the filesystem. --- lib/red_storm/dsl/spout.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/red_storm/dsl/spout.rb b/lib/red_storm/dsl/spout.rb index bcb8ee0..f587f61 100644 --- a/lib/red_storm/dsl/spout.rb +++ b/lib/red_storm/dsl/spout.rb @@ -162,7 +162,7 @@ module RedStorm # below non-dry see Bolt class def self.inherited(subclass) path = (caller.first.to_s =~ /^(.+):\d+.*$/) ? $1 : raise(SpoutError, "unable to extract base topology class path from #{caller.first.inspect}") - subclass.base_class_path = Pathname.new(path).relative_path_from(Pathname.new(RedStorm::BASE_PATH)).to_s + subclass.base_class_path = File.expand_path(path) end def self.base_class_path=(path)