forked from RaVbaker/tolk
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Priit Tamboom
committed
Apr 5, 2012
1 parent
38dd480
commit 7eda280
Showing
9 changed files
with
43 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
--- | ||
username: tolk | ||
password: please-change-password | ||
|
||
allowed_hostnames: | ||
- priit | ||
- veiko | ||
- testlux |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -14,3 +14,4 @@ | |
|
||
$KCODE = 'UTF8' | ||
require 'ya2yaml' | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -15,3 +15,4 @@ | |
|
||
# Don't care if the mailer can't send | ||
config.action_mailer.raise_delivery_errors = false | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
require 'yaml' | ||
config = File.open('../config.yml') | ||
|
||
YAML::load_documents(config) do |conf| | ||
ALLOWED_HOSTNAMES = conf['allowed_hostnames'] | ||
USERNAME = conf['username'] | ||
PASSWORD = conf['password'] | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,13 @@ | ||
module Tolk | ||
end | ||
|
||
# load local config file, is there any better place, somehow it didn't work on init.rb | ||
require 'yaml' | ||
config_path = File.expand_path(File.join(File.dirname(__FILE__), '..', 'config', 'config.yml')) | ||
config = File.open(config_path) | ||
|
||
YAML::load_documents(config) do |conf| | ||
ALLOWED_HOSTNAMES = conf['allowed_hostnames'] | ||
USERNAME = conf['username'] | ||
PASSWORD = conf['password'] | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -42,6 +42,5 @@ def read_locale_file | |
|
||
self.class.flat_hash(YAML::load(IO.read(locale_file))[self.name]) | ||
end | ||
|
||
end | ||
end |