Skip to content

Commit

Permalink
Pathfinder in bin. Components are supposed to be in components subdir…
Browse files Browse the repository at this point in the history
… or to have been full-path specified
  • Loading branch information
flagos committed Apr 17, 2012
1 parent 1423753 commit b26821a
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 49 deletions.
3 changes: 0 additions & 3 deletions config/default.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
pathfinder:
- ../

export:
- /home/temperature
- /home/humidity
Expand Down
2 changes: 0 additions & 2 deletions config/flagos_mur.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
pathfinder:
- ../

export:
- /home/mur/temperature
Expand Down
14 changes: 12 additions & 2 deletions server/Component.rb
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
#
require 'Launcher.rb'
require 'Pin.rb'
require 'Pathfinder'
require 'globals'

class Component
include Launcher
Expand All @@ -40,7 +40,17 @@ def initialize(component_) # Constructor
end

def get_exec_path
@exec = Pathfinder.instance.get_file(@filename)
@exec = @filename
local_install = File.dirname(__FILE__)
local_file = "#{local_install}/../components/#{@filename}"

if (File.exists?(local_file)) # installed in /components
@exec = File.expand_path(local_file)
elsif (File.exists?(@filename)) # abs_path to component
@exec = File.expand_path(@filename)
else
Globals.error("#{@filename} not found", 144)
end
end

def introspect
Expand Down
41 changes: 0 additions & 41 deletions server/Pathfinder.rb

This file was deleted.

1 change: 0 additions & 1 deletion server/main.rb
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,6 @@ def initialize (config_, service_, internalservice_, log_)
@event_handler = Event_Handler.instance
@internalservice.export(@event_handler)

Pathfinder.instance.init_pathfinder(@config_path)

@info = Info.new()
@service.export(@info)
Expand Down

0 comments on commit b26821a

Please sign in to comment.