Sha256: 7f4ce2719892977f1109cf82a288766d3a768e6326ebf2219ec860fcc146bea1

Contents?: true

Size: 1.02 KB

Versions: 26

Compression:

Stored size: 1.02 KB

Contents

#--
# Copyright (c) 2010-2012 Engine Yard, Inc.
# Copyright (c) 2007-2009 Sun Microsystems, Inc.
# This source code is available under the MIT license.
# See the file LICENSE.txt for details.
#++

require 'rubygems'
require 'drb'
require 'stringio'
require 'warbler'

class Warbler::Config
  include DRb::DRbUndumped
end

class Warbler::Jar
  include DRb::DRbUndumped
end

class WarblerDrbServer
  def initialize
    @output = StringIO.new
    $stdout = $stderr = @output
  end

  def config(config_proc = nil)
    @config ||= begin 
      Warbler::Config.new do |config| 
        config_proc && config_proc.call(config)
      end
    end
  end

  def ready?
    true
  end

  def jar
    @jar ||= Warbler::Jar.new
  end

  def run_task(t)
    @task ||= Warbler::Task.new "warble", config
    Rake::Task[t].invoke
  end

  def stop
    DRb.stop_service
  end
end

require File.expand_path('drb_default_id_conv', File.dirname(__FILE__))

server = WarblerDrbServer.new
service = DRb.start_service 'druby://127.0.0.1:7890', server
service.thread.join

Version data entries

26 entries across 26 versions & 1 rubygems

Version Path
warbler-1.4.10 spec/drb_helper.rb
warbler-2.0.2 spec/drb_helper.rb
warbler-2.0.1 spec/drb_helper.rb
warbler-2.0.0 spec/drb_helper.rb
warbler-2.0.0.rc3 spec/drb_helper.rb
warbler-2.0.0.rc2 spec/drb_helper.rb
warbler-2.0.0.rc1 spec/drb_helper.rb
warbler-2.0.0.pre3 spec/drb_helper.rb
warbler-2.0.0.pre2 spec/drb_helper.rb
warbler-1.4.9 spec/drb_helper.rb
warbler-1.4.8 spec/drb_helper.rb
warbler-2.0.0.pre1 spec/drb_helper.rb
warbler-1.4.7 spec/drb_helper.rb
warbler-1.4.6 spec/drb_helper.rb
warbler-1.4.5 spec/drb_helper.rb
warbler-1.4.4 spec/drb_helper.rb
warbler-1.4.3 spec/drb_helper.rb
warbler-1.4.2 spec/drb_helper.rb
warbler-1.4.1 spec/drb_helper.rb
warbler-1.4.0 spec/drb_helper.rb