Sha256: 71623287f457abe11b872fbca7d7b0ca5a06b8d935e2e882579afb8f11aed09c
Contents?: true
Size: 1.45 KB
Versions: 2
Compression:
Stored size: 1.45 KB
Contents
require 'yaml' module Configuration extend self CONFIG = YAML.load_file('_config.yml') CONNECTION = CONFIG["connection"] APPROVE_BY_DEFAULT = CONFIG["approve_by_default"] ALLOW_ANONYMOUS_POST = CONFIG["allow_anonymous_post"] TIMESTAMP_FORMAT = CONFIG["timestamp_format"] USERNAME = CONFIG["username"] PASSWORD = CONFIG["password"] ALLOW_CORS = CONFIG["allow_cors"] CORS_ORIGIN = CONFIG["cors_origin"] AUTO_ESCAPE_HTML = CONFIG["auto_escape_html"] #wall of help text to be added in _config.yml def comment_wall comments = <<COMMENTS # ##connection : database connection url to be passed to sequel's connect method. ##check http://sequel.jeremyevans.net/rdoc/files/doc/opening_databases_rdoc.html ##all adapters supported by sequel can be used # ##approve_by_default : set to true to allow all coments to be posted without moderation. # ##allow_anonymous_post : set to true to allow comments without a name. # ##timestamp_format : datetime format to be passed to strftime. ##see availabe options here http://ruby-doc.org/core-2.2.1/Time.html#method-i-strftime # ##allow_cors : set to true to enable cross-origin resource sharing. # ##cors_origin : see available formats here https://github.com/cyu/rack-cors # ##auto_escape_html : automatically escape html in comment bodys # ##users : do not edit this by hand use 'rake adduser' instead. # ##if you edit this file after 'rake init' use 'rake update' for the changes to take effect. # COMMENTS end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
easycomments-1.0.3 | lib/easycomments/ec_configuration.rb |
easycomments-1.0.2 | lib/easycomments/ec_configuration.rb |