Sha256: c9d797f13eb793d4e99de81151e0d09e50a6a2ced587c9d3f5520d85258af7df

Contents?: true

Size: 998 Bytes

Versions: 12

Compression:

Stored size: 998 Bytes

Contents

#
# 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

12 entries across 8 versions & 1 rubygems

Version Path
tdiary-5.0.8 vendor/bundle/gems/tdiary-5.0.7/lib/tdiary/tasks/server.rake
tdiary-5.0.7 lib/tdiary/tasks/server.rake
tdiary-5.0.6 lib/tdiary/tasks/server.rake
tdiary-5.0.5 vendor/bundle/gems/tdiary-5.0.3/lib/tdiary/tasks/server.rake
tdiary-5.0.5 lib/tdiary/tasks/server.rake
tdiary-5.0.5 vendor/bundle/gems/tdiary-5.0.4/lib/tdiary/tasks/server.rake
tdiary-5.0.5 vendor/bundle/gems/tdiary-5.0.4/vendor/bundle/gems/tdiary-5.0.3/lib/tdiary/tasks/server.rake
tdiary-5.0.4 vendor/bundle/gems/tdiary-5.0.3/lib/tdiary/tasks/server.rake
tdiary-5.0.4 lib/tdiary/tasks/server.rake
tdiary-5.0.3 lib/tdiary/tasks/server.rake
tdiary-5.0.2 lib/tdiary/tasks/server.rake
tdiary-5.0.1 lib/tdiary/tasks/server.rake