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.
This commit is contained in:
Robert Bavey 2015-08-31 16:04:06 -04:00
parent c549d701d5
commit d790474151
1 changed files with 1 additions and 1 deletions

View File

@ -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)