rails_codebook 0.1.0 → 0.1.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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 814ab5d238db7699629517ba1f3993da9914821c
4
- data.tar.gz: b5659d156688735b64aded7e8f886b14bf8a52cb
3
+ metadata.gz: 1088737e513744d95f3ed8986a8ce1f57e60b08f
4
+ data.tar.gz: d111b2e09981fd1227415aa74c9f0757c05398a9
5
5
  SHA512:
6
- metadata.gz: fb3775a9217f293adfe2190e4fac3b309aab3138a820fb86053c1ed03f46b4119b29728488a1ece6053dc45a778b0cd34d051cac4df4ed464be0daefe9e341fa
7
- data.tar.gz: a66befeb1de78a5b6e0e2a37cf2948b16590976f21ae2f765c3e539555ffde687244d198278a21643ec1de778c835b89f879d79f49e37f5846722f263f45b900
6
+ metadata.gz: b0173f94ad22220a5a5d5c372e2784dcb0305838c701e18f2d57001b21eee15675ec36a095460e6b6001ac50a66ac01920d1f0dad58cf717b86e6bbb565cfed2
7
+ data.tar.gz: 8a0dd95fbad1d7079988ef65888405712098a5497d550a6f759da30c1e1043c35325fc5999ae327ec5c9e6b79b4f64b8e599f1d5e22886b8a844b0fed2f64a4f
data/README.md CHANGED
@@ -267,8 +267,9 @@ Therefore you got to have your translations for every codebook value you want to
267
267
  I myself use the initializzation process like this:
268
268
 
269
269
  in ```config/locales``` I created myself the ```codebooks``` directory where I placed all the files with different translations of codebook values in certain format:
270
- ```config/locales/codebook/cs.yml```
271
- ```yaml
270
+
271
+ _config/locales/codebook/cs.yml_
272
+ ``` yaml
272
273
  cs:
273
274
  codebook: # this is the cb_key you can define in config block in case you dont like my default
274
275
  boolean: # this is the codebook name
@@ -4,7 +4,13 @@ module RailsCodebook
4
4
 
5
5
 
6
6
  def initialize_content
7
- RailsCodebook::configuration.cb_data_path.each do |filename|
7
+ routes = ['']
8
+ if File.exists?(File.join(Gem.loaded_specs['rails_codebook'].full_gem_path, 'config', 'locales', 'cs.yml'))
9
+ default_cb_route = [File.join(Gem.loaded_specs['rails_codebook'].full_gem_path, 'config', 'locales', 'cs.yml')]
10
+ routes = RailsCodebook::configuration.cb_data_path + default_cb_route
11
+ end
12
+
13
+ routes.each do |filename|
8
14
 
9
15
  codebook_values_file = (File.exists?(filename)) ? filename : nil
10
16
 
@@ -1,3 +1,3 @@
1
1
  module RailsCodebook
2
- VERSION = "0.1.0"
2
+ VERSION = "0.1.1"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rails_codebook
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - redrick
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2013-11-28 00:00:00.000000000 Z
11
+ date: 2013-12-05 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: redis