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