whowish_word 0.5.0 → 0.5.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -36,7 +36,7 @@ class WhowishWordController < ApplicationController
36
36
  filename = "#{keys[1..-1].join("_")}_#{filename}"
37
37
  end
38
38
 
39
- paths = [Rails.root, "config", "locales", "whowish_word"]
39
+ paths = [ WhowishWord.config_file_dir ]
40
40
  paths.push(keys[0]) if keys.length > 0
41
41
  paths.push(filename)
42
42
 
@@ -9,15 +9,17 @@ module WhowishWord
9
9
  include WhowishWord::Initializer
10
10
  include WhowishWord::WordFor
11
11
  # include WhowishWord::Authentication
12
+
13
+ attr_accessor :config_file_dir
12
14
 
13
- attr_accessor :words
14
-
15
- def init()
15
+ def init(config_file_dir = File.join(Rails.root, 'config', 'locales', 'whowish_word'))
16
16
  install_route
17
17
  install_hook
18
18
  load_rails
19
+
20
+ @config_file_dir = config_file_dir
19
21
 
20
- Rails.configuration.i18n.load_path += Dir[Rails.root.join('config', 'locales', 'whowish_word', '**', '*.{rb,yml}')]
22
+ Rails.configuration.i18n.load_path = Dir[File.join(@config_file_dir, '**', '*.{rb,yml}')]
21
23
 
22
24
  I18n.class_eval do
23
25
  class << self
@@ -1,3 +1,3 @@
1
1
 
2
- WhowishWord.init()
2
+ WhowishWord.init(File.join(Rails.root, 'tmp', 'whowish_word'))
3
3
 
@@ -1,4 +1,4 @@
1
1
  ---
2
2
  th:
3
3
  text1: ไทย
4
- text: ไทย1
4
+ text: ไทย123
data/whowish_word.gemspec CHANGED
@@ -3,7 +3,7 @@ $:.push File.expand_path("../lib", __FILE__)
3
3
 
4
4
  Gem::Specification.new do |s|
5
5
  s.name = "whowish_word"
6
- s.version = "0.5.0"
6
+ s.version = "0.5.1"
7
7
  s.platform = Gem::Platform::RUBY
8
8
  s.authors = ["Tanin Na Nakorn"]
9
9
  s.email = ["tanin47@yahoo.com"]
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: whowish_word
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.5.0
4
+ version: 0.5.1
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors: