emipair-merb_global 0.0.11 → 0.0.12

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- emipair-merb_global (0.0.11)
4
+ emipair-merb_global (0.0.12)
5
5
  gettext (= 2.0.4)
6
6
  merb-core (>= 0.9.1)
7
7
  treetop (~> 1.2.3)
@@ -35,7 +35,7 @@ GEM
35
35
  gettext (2.0.4)
36
36
  locale (>= 2.0.4)
37
37
  json (1.4.6)
38
- locale (2.0.4)
38
+ locale (2.0.5)
39
39
  merb-core (1.1.3)
40
40
  bundler
41
41
  erubis (>= 2.6.2)
@@ -70,26 +70,10 @@ module Merb
70
70
  end
71
71
  end
72
72
  end
73
- YAML.dump File.join(Merb::Global::MessageProviders.localedir,
74
- lang_name + '.yaml')
73
+ YAML.dump File.join(Merb::Global::MessageProviders.localedir, lang_name + '.yaml')
75
74
  end
76
75
  end
77
76
 
78
- def to_json(locale = nil)
79
- locale ||= Locale.new('en')
80
- lang = get_lang
81
-
82
- # Extracted yaml_data from this method to support looking through several yaml files.
83
- lang[locale] = yaml_data(locale) unless lang.include?(locale)
84
- lang[locale].to_json
85
- end
86
-
87
- protected
88
-
89
- def get_lang
90
- ['development', 'test'].include?(Merb.environment) ? {} : @lang
91
- end
92
-
93
77
  def yaml_data(locale)
94
78
  files_to_try = ["#{locale}.yaml", "#{locale.language}.yaml"]
95
79
  files_to_try.each do |filename|
@@ -98,6 +82,12 @@ module Merb
98
82
  end
99
83
  nil
100
84
  end
85
+
86
+ protected
87
+
88
+ def get_lang
89
+ ['development', 'test'].include?(Merb.environment) ? {} : @lang
90
+ end
101
91
  end
102
92
  end
103
93
  end
@@ -1,5 +1,5 @@
1
1
  module Merb
2
2
  module Global
3
- VERSION = '0.0.11'
3
+ VERSION = '0.0.12'
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: emipair-merb_global
3
3
  version: !ruby/object:Gem::Version
4
- hash: 9
4
+ hash: 7
5
5
  prerelease: false
6
6
  segments:
7
7
  - 0
8
8
  - 0
9
- - 11
10
- version: 0.0.11
9
+ - 12
10
+ version: 0.0.12
11
11
  platform: ruby
12
12
  authors:
13
13
  - EMI Engineering
@@ -15,7 +15,7 @@ autorequire:
15
15
  bindir: bin
16
16
  cert_chain: []
17
17
 
18
- date: 2011-01-18 00:00:00 -05:00
18
+ date: 2011-01-20 00:00:00 -05:00
19
19
  default_executable:
20
20
  dependencies:
21
21
  - !ruby/object:Gem::Dependency