Skip to content

Commit

Permalink
turned Workling.load_path into an Array
Browse files Browse the repository at this point in the history
  • Loading branch information
purzelrakete committed Nov 29, 2008
1 parent ffe565a commit fab7736
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 4 deletions.
3 changes: 3 additions & 0 deletions CHANGES.markdown
@@ -1,3 +1,6 @@
Version 0.4.2.2, 29.11.08
- turned Workling.load_path into an Array.

Version 0.4.2.1, 27.11.08
- fixed raise exceptions if non existing worker methods are called

Expand Down
4 changes: 2 additions & 2 deletions lib/workling.rb
Expand Up @@ -20,8 +20,8 @@ def initialize
end

mattr_accessor :load_path
@@load_path = File.expand_path(File.join(File.dirname(__FILE__), '../../../../app/workers'))
VERSION = "0.4.2.1"
@@load_path = [ File.expand_path(File.join(File.dirname(__FILE__), '../../../../app/workers')) ]
VERSION = "0.4.2.2"

#
# determine the runner to use if nothing is specifically set. workling will try to detect
Expand Down
2 changes: 1 addition & 1 deletion lib/workling/discovery.rb
Expand Up @@ -8,7 +8,7 @@ class Discovery

# requires worklings so that they are added to routing.
def self.discover!
Dir.glob(Workling.load_path + "/**/*.rb").each { |wling| require wling }
Dir.glob(Workling.load_path.map { |p| "#{ p }/**/*.rb" }).each { |wling| require wling }
end
end
end
2 changes: 1 addition & 1 deletion test/test_helper.rb
Expand Up @@ -40,6 +40,6 @@
require "runners/thread_runner"

# worklings are in here.
Workling.load_path ="#{ plugin_root }/test/workers"
Workling.load_path = ["#{ plugin_root }/test/workers"]
Workling::Return::Store.instance = Workling::Return::Store::MemoryReturnStore.new
Workling::Discovery.discover!

0 comments on commit fab7736

Please sign in to comment.