Sha256: 130559951394b4a35a333631e634de91aa3d010811a32d31ad462b400df484ee

Contents?: true

Size: 990 Bytes

Versions: 26

Compression:

Stored size: 990 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__)
  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

26 entries across 21 versions & 1 rubygems

Version Path
tdiary-5.3.0 lib/tdiary/tasks/server.rake
tdiary-5.2.4 lib/tdiary/tasks/server.rake
tdiary-5.2.3 lib/tdiary/tasks/server.rake
tdiary-5.2.2 lib/tdiary/tasks/server.rake
tdiary-5.2.1 lib/tdiary/tasks/server.rake
tdiary-5.2.0 lib/tdiary/tasks/server.rake
tdiary-5.1.7 lib/tdiary/tasks/server.rake
tdiary-5.1.6 vendor/bundle/ruby/2.7.0/gems/tdiary-5.1.5/lib/tdiary/tasks/server.rake
tdiary-5.1.6 vendor/bundle/ruby/2.7.0/gems/tdiary-5.1.5/vendor/bundle/ruby/3.0.0/gems/tdiary-5.1.4/lib/tdiary/tasks/server.rake
tdiary-5.1.6 lib/tdiary/tasks/server.rake
tdiary-5.1.5 vendor/bundle/ruby/3.0.0/gems/tdiary-5.1.4/lib/tdiary/tasks/server.rake
tdiary-5.1.5 lib/tdiary/tasks/server.rake
tdiary-5.1.4 lib/tdiary/tasks/server.rake
tdiary-5.1.3 lib/tdiary/tasks/server.rake
tdiary-5.1.2 vendor/bundle/ruby/2.6.0/gems/tdiary-5.0.14/lib/tdiary/tasks/server.rake
tdiary-5.1.2 lib/tdiary/tasks/server.rake
tdiary-5.1.1 vendor/bundle/ruby/2.6.0/gems/tdiary-5.0.14/lib/tdiary/tasks/server.rake
tdiary-5.1.1 lib/tdiary/tasks/server.rake
tdiary-5.1.0 lib/tdiary/tasks/server.rake
tdiary-5.0.14 lib/tdiary/tasks/server.rake