Sha256: c6fcaf84c43a08d2d31c727b2b467d0cab9f464b589c077c44402bd1fe19759d

Contents?: true

Size: 1023 Bytes

Versions: 9

Compression:

Stored size: 1023 Bytes

Contents

# -*- coding: utf-8; -*-
#
# server: script for running standalone tdiary cgi server.
#
# Copyright (C) 2008-2010, Kakutani Shintaro <shintaro@kakutani.com>
# You can redistribute it and/or modify it under GPL2 or any later version.

task :server do
  $:.unshift File.expand_path('../../../', __FILE__).untaint
  require 'tdiary'

  unless File.exist?(TDiary.root + '/tdiary.conf')
    FileUtils.cp_r(TDiary.root + '/spec/fixtures/tdiary.conf.webrick',
      TDiary.root + '/tdiary.conf', :verbose => false)
  end
  unless File.directory?(TDiary.root + '/tmp/data')
    FileUtils.mkdir_p(TDiary.root + '/tmp/data/log')
    File.open(TDiary.root + '/tmp/data/tdiary.conf', 'w') do |f|
      f.write "tdiary_version = \"#{TDIARY_VERSION}\""
    end
    File.chmod(0644, TDiary.root + '/tmp/data/tdiary.conf')
  end

  opts = {
    :daemon => ENV['DAEMON'],
    :bind   => ENV['BIND'] || '0.0.0.0',
    :port   => ENV['PORT'] || 19292,
    :logger => $stderr,
    :access_log => $stderr,
  }

  TDiary::Server.run( opts )
end

Version data entries

9 entries across 8 versions & 1 rubygems

Version Path
tdiary-5.0.0 lib/tdiary/tasks/server.rake
tdiary-4.2.1 vendor/bundle/ruby/2.3.0/gems/tdiary-4.2.0/lib/tdiary/tasks/server.rake
tdiary-4.2.1 lib/tdiary/tasks/server.rake
tdiary-4.2.0 lib/tdiary/tasks/server.rake
tdiary-4.1.3 lib/tdiary/tasks/server.rake
tdiary-4.1.2 lib/tdiary/tasks/server.rake
tdiary-4.1.1 lib/tdiary/tasks/server.rake
tdiary-4.1.0 lib/tdiary/tasks/server.rake
tdiary-4.1.0.20141126 lib/tdiary/tasks/server.rake