Skip to content
This repository has been archived by the owner on Nov 28, 2018. It is now read-only.
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: choria-legacy/marionette-collective
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: master
Choose a base ref
...
head repository: timbyr/marionette-collective
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: master
Choose a head ref
Can’t automatically merge. Don’t worry, you can still create the pull request.
  • 1 commit
  • 2 files changed
  • 1 contributor

Commits on Aug 28, 2014

  1. Correcting lookup for external scripts

    Look for external script in libdir/mcollective/agent/<agent>/
    Keith Byrne committed Aug 28, 2014

    Verified

    This commit was signed with the committer’s verified signature.
    fwyzard Andrea Bocci
    Copy the full SHA
    384affa View commit details
Showing with 5 additions and 5 deletions.
  1. +1 −1 lib/mcollective/rpc/actionrunner.rb
  2. +4 −4 spec/unit/rpc/actionrunner_spec.rb
2 changes: 1 addition & 1 deletion lib/mcollective/rpc/actionrunner.rb
Original file line number Diff line number Diff line change
@@ -129,7 +129,7 @@ def tempfile(prefix)
def path_to_command(command)
unless command[0,1] == File::SEPARATOR
Config.instance.libdir.each do |libdir|
command_file = File.join(libdir, "agent", agent, command)
command_file = File.join(libdir, "mcollective", "agent", agent, command)

return command_file if File.exist?(command_file)
end
8 changes: 4 additions & 4 deletions spec/unit/rpc/actionrunner_spec.rb
Original file line number Diff line number Diff line change
@@ -188,8 +188,8 @@ module RPC
it "should find the first match in the libdir" do
Config.instance.expects(:libdir).returns(["#{File::SEPARATOR}libdir1", "#{File::SEPARATOR}libdir2"])

action_in_first_dir = File.join(File::SEPARATOR, "libdir1", "agent", "spectester", "action.sh")
action_in_last_dir = File.join(File::SEPARATOR, "libdir2", "agent", "spectester", "action.sh")
action_in_first_dir = File.join(File::SEPARATOR, "libdir1", "mcollective", "agent", "spectester", "action.sh")
action_in_last_dir = File.join(File::SEPARATOR, "libdir2", "mcollective", "agent", "spectester", "action.sh")

File.expects("exist?").with(action_in_first_dir).returns(true)
File.expects("exist?").with(action_in_last_dir).never
@@ -200,8 +200,8 @@ module RPC
it "should find the match even in the last libdir" do
Config.instance.expects(:libdir).returns(["#{File::SEPARATOR}libdir1", "#{File::SEPARATOR}libdir2"])

action_in_first_dir = File.join(File::SEPARATOR, "libdir1", "agent", "spectester", "action.sh")
action_in_last_dir = File.join(File::SEPARATOR, "libdir2", "agent", "spectester", "action.sh")
action_in_first_dir = File.join(File::SEPARATOR, "libdir1", "mcollective", "agent", "spectester", "action.sh")
action_in_last_dir = File.join(File::SEPARATOR, "libdir2", "mcollective", "agent", "spectester", "action.sh")

File.expects("exist?").with(action_in_first_dir).returns(false)
File.expects("exist?").with(action_in_last_dir).returns(true)