This commit is contained in:
2026-06-12 15:40:12 -04:00
commit 521653e5de
53 changed files with 8635 additions and 0 deletions
+19
View File
@@ -0,0 +1,19 @@
development: &default
# general
default_timezone: "Asia/Taipei"
site_root_url: http://localhost:4567
per_page: 10
# meta tags
meta_title: Example Blog
meta_description: Sinatra Template is like a tiny Rails
meta_keywords: "sinatra ruby rails blog"
meta_og_site_name: Example Blog
meta_og_url: http://example.com/sub_dir
meta_og_image: http://example.com/sub_dir/images/og_image.png
test:
<<: *default
production:
<<: *default
site_root_url: http://example.com/sub_dir
+7
View File
@@ -0,0 +1,7 @@
development: &default
http_auth_accounts:
admin: right_password
test:
<<: *default
production:
<<: *default
+14
View File
@@ -0,0 +1,14 @@
development:
adapter: mysql2
encoding: utf8mb4
database: dashboard_development
username: root
password: mypassword
host: db
production:
adapter: mysql2
encoding: utf8
username: root
password:
database: sinatra_template_production
+26
View File
@@ -0,0 +1,26 @@
log4r_config:
loggers:
- name: app_logger
trace: "false"
outputters:
- stdout
- logfile
outputters:
- type: StdoutOutputter
name: stdout
level: DEBUG
formatter:
date_pattern: "%Y-%m-%d %H:%M:%S"
pattern: "%d [%l] %m"
type: PatternFormatter
- type: FileOutputter
name: logfile
level: INFO
date_pattern: "%Y%m%d"
trunc: "false"
filename: "#{HOME}/app_logger.log"
formatter:
date_pattern: "%Y-%m-%d %H:%M:%S"
pattern: "%d [%l] %m"
type: PatternFormatter
+15
View File
@@ -0,0 +1,15 @@
if ENV['MY_RUBY_HOME'] && ENV['MY_RUBY_HOME'].include?('rvm')
begin
rvm_path = File.dirname(File.dirname(ENV['MY_RUBY_HOME']))
rvm_lib_path = File.join(rvm_path, 'lib')
$LOAD_PATH.unshift rvm_lib_path
require 'rvm'
RVM.use_from_path! File.dirname(File.dirname(__FILE__))
rescue LoadError
raise "RVM ruby lib is currently unavailable."
end
end
# This assumes Bundler 1.0+
ENV['BUNDLE_GEMFILE'] = File.expand_path('../Gemfile', File.dirname(__FILE__))
require 'bundler/setup'