Sha256: 89cb4c94f8f98d32e2f423d9edcc234fbc587168535b5df3c6b65dd4af6da12b

Contents?: true

Size: 796 Bytes

Versions: 3

Compression:

Stored size: 796 Bytes

Contents

require 'bundler'
require 'tmpdir'

tmpdir = Dir.mktmpdir
File.open(tmpdir + '/Gemfile', 'w') do |f|
  f << File.read('Gemfile')
  f << File.read('test/Gemfile')
end
Dir.chdir tmpdir do
  Bundler.setup
end

$LOAD_PATH.unshift 'lib'

require 'iron_worker_ng'
require_relative 'test/iron_io_config.rb'

client = IronWorkerNG::Client.new

code = IronWorkerNG::Code.new do
  runtime 'ruby'

  exec 'ng_tests_worker.rb'
  gemfile 'Gemfile'
  gemfile 'test/Gemfile'

  Dir.glob('*').each do |p|
    dir  p, 'iwng' if File.directory?  p
    file p, 'iwng' if File.file? p
  end

  iron_io_config 'iwng'
end

puts client.codes.create(code)

puts code.create_zip

task = client.tasks.create 'NgTestsWorker', args: $*.join(' ')

client.tasks.wait_for task.id

puts '-' * 80

puts client.tasks.log(task.id)

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
iron_worker_ng-0.8.3 remote_test.rb
iron_worker_ng-0.8.2 remote_test.rb
iron_worker_ng-0.8.0 remote_test.rb