Sha256: bb74c96cda8d28272597ad2ef2691396455e120bcc4ae77061291155f26d82be

Contents?: true

Size: 1.04 KB

Versions: 2

Compression:

Stored size: 1.04 KB

Contents

#!/usr/bin/env ruby231
# encoding: utf-8
# ydim-htmld -- ydim -- 12.01.2006 -- hwyss@ywesee.com

$: << File.expand_path('../lib', File.dirname(__FILE__))
$: << File.expand_path('..', File.dirname(__FILE__))

require 'drb'
require 'logger'
require 'ydim/server'
require 'ydim/html/util/server'
require 'ydim/html/config'
require 'ydim/html/version'

module YDIM
  module Html
    headpath = File.expand_path('../.git/HEAD', File.dirname(__FILE__))
    YDIM_VERSION = YDIM::Html::VERSION

    DRb.start_service(@config.proxy_url)

    log_file = @config.log_file
    if(log_file.is_a?(String))
      FileUtils.mkdir_p(File.dirname(log_file))
      log_file = File.open(log_file, 'a')
      at_exit { log_file.close }
    end
    logger = Logger.new(log_file)
    logger.level = Logger.const_get(@config.log_level)
    @logger = logger

    ydim_server = DRb::DRbObject.new(nil, @config.server_url)
    server = YDIM::Html::Util::Server.new(ydim_server)
    $0 = "YDIM (Html::Util::Server)"

    DRb.start_service(@config.html_url, server)
    DRb.thread.join
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
ydim-html-1.0.3 bin/ydim-htmld
ydim-html-1.0.2 bin/ydim-htmld