Skip to content

Commit

Permalink
Include user in testjour URIs
Browse files Browse the repository at this point in the history
  • Loading branch information
brynary committed Oct 23, 2008
1 parent 340eb6b commit 291f229
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 2 deletions.
6 changes: 5 additions & 1 deletion lib/testjour/commands/run.rb
Expand Up @@ -87,7 +87,11 @@ def request_build_from(server)
end

def testjour_uri
DRb.uri.gsub(/^druby:/, "testjour:") + File.expand_path(".")
uri = URI.parse(DRb.uri)
uri.path = File.expand_path(".")
uri.scheme = "testjour"
uri.user = `whoami`.strip
uri.to_s
end
end

Expand Down
1 change: 1 addition & 0 deletions lib/testjour/commands/slave_run.rb
Expand Up @@ -73,6 +73,7 @@ def drb_uri
uri = URI.parse(@queue)
uri.scheme = "druby"
uri.path = ""
uri.user = nil
uri.to_s
end

Expand Down
2 changes: 1 addition & 1 deletion lib/testjour/rsync.rb
Expand Up @@ -8,7 +8,7 @@ def self.copy_to_current_directory_from(source_uri)
destination_dir = File.expand_path(".")
uri = URI.parse(source_uri)

command = "rsync -az --delete --exclude=.git --exclude=*.log --exclude=*.pid #{uri.host}:#{uri.path}/ #{destination_dir}"
command = "rsync -az --delete --exclude=.git --exclude=*.log --exclude=*.pid #{uri.user}@#{uri.host}:#{uri.path}/ #{destination_dir}"

Testjour.logger.info "Rsyncing: #{command}"
start_time = Time.now
Expand Down

0 comments on commit 291f229

Please sign in to comment.