require 'tempfile'
@data_path = Dir.tmpdir

psql_service = CFRuntime::CloudApp.service_names_of_type('postgresql')
psql_options = CFRuntime::PGClient.options_for_svc(names[0])
@database_url = "postgres://#{psql_options[:user]}:#{psql_options[:password]}@#{psql_options[:host]}:#{psql_options[:port]}/#{psql_options[:dbname]}"

@style = 'GFM'

require 'tdiary/io/cache/memcached'
require 'tdiary/io/rdb'
@io_class = TDiary::RdbIO

@index = './'
@update = 'update.rb'
@logger = Logger.new($stderr)

@accesskey_enabled = false
@options['bot'] = [
	'^BlogLines/',
	'^blogmap',
	'MI[CK]AN/',
	'^NG/',
	'^samidare',
	'^TAMATEBAKO/'
]

@options['apply_plugin'] = true
@options['sp.path'] = ['misc/plugin']
@options['style.path'] = ['misc/style/gfm', 'tdiary/style']
@options['sp.selected'] =
"amazon.rb
append-css.rb
calendar2.rb
dropdown_calendar.rb
footnote.rb
highlight.rb
image.rb
jdate.rb
kw.rb
my-ex.rb
"

@options['dropdown_calendar.label'] = ''
@options['spamfilter.bad_comment_patts'] = "(href=|casino|gambling|betting|fastsearch\\.eu\\.com|ganzao|poker|holdem|hold.em|roulette|drug|tramadol|viagra|fioricet|oxycontin|biaxin|aldara|business cards|home depot|slot.?machine|insurance|getblog2|video-game|Good site|internet-all\\.com|deai|tdfms|comu2|omaha)\r\n"
@options['spamfilter.bad_ip_addrs'] = ""
@options['spamfilter.bad_mail_patts'] = "(mu@alloha\\.info|mumu2004@mail\\.com|zhongleibo|dfd@12\\.com|anonimous|aol\\.|yahoo\\.|google\\.|hotmail\\.|msn\\.|leroy\\.|ablare\\.|gmx\\.|lorazepam|\\.co$)"
@options['spamfilter.bad_uri_patts'] = ""
@options['spamfilter.bad_uri_patts_for_mails'] = false
@options['spamfilter.debug_file'] = ""
@options['spamfilter.debug_mode'] = false
@options['spamfilter.filter_mode'] = true
@options['spamfilter.max_uris'] = "2"
@options['spamfilter.resolv_check'] = false
@options['spamfilter.resolv_check_mode'] = false
@options['spamlookup.domain.list'] = "bsb.spamlookup.net\r\nsc.surbl.org\r\nrbl.bulkfeeds.jp"
@options['spamlookup.safe_domain.list'] = "search.yahoo.co.jp\r\nwww.google.com\r\nwww.google.co.jp\r\nsearch.msn.co.jp"

@html_title = %Q[【日記のタイトル】]
@header = <<HEADER
<%= navi %>
<h1><%= @html_title %></h1>
<div class="main">
HEADER
@footer = <<FOOTER
</div>
<div class="sidebar">
<div style="text-align: center">
<%= calendar2 %>
<%= calendar %>
</div>
</div>
FOOTER

@date_format = '%Y年%m月%d日'
@section_anchor = '<span class="sanchor">_</span>'
@comment_anchor = '<span class="canchor">_</span>'
@latest_limit = 10
@theme = 'default'
@show_comment = true
@comment_limit = 3
@show_referer = false
@referer_day_only = true
@hour_offset = 9
@show_nyear = true
@secure = false

load_cgi_conf
