tml 4.3.3 → 4.3.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/tml/session.rb +9 -5
- data/lib/tml/tokens/data.rb +1 -5
- data/lib/tml/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 4c93181c73e8d51d0547614c850cd4f1902397a5
|
4
|
+
data.tar.gz: 8388206c002b497ee3210f6cc07860374c0aaeee
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e6f3cb0e93280f4fba083a262f54996e464712ca57caf597a22a46b361315768b0f6f32e20d2a827c64a832e1170de167738985dece40d88317b9aecb150c02a
|
7
|
+
data.tar.gz: 977bfea69f9e79248688fab4b9b48d62d803c8931cac356a32e6471c0bf55cf46b7e8a39ac3780066bb688255e39eec1f20fbb5e4501d0b60e8f6f21330d02d1
|
data/lib/tml/session.rb
CHANGED
@@ -134,18 +134,18 @@ module Tml
|
|
134
134
|
end
|
135
135
|
|
136
136
|
def source_language
|
137
|
-
|
138
|
-
|
139
|
-
return application.language(opts[:locale]) unless opts[:locale].blank?
|
137
|
+
(@block_options || []).reverse.each do |opts|
|
138
|
+
return application.language(opts[:locale]) unless opts[:locale].nil?
|
140
139
|
end
|
140
|
+
|
141
141
|
application.language
|
142
142
|
end
|
143
143
|
|
144
144
|
def target_language
|
145
|
-
|
146
|
-
arr.reverse.each do |opts|
|
145
|
+
(@block_options || []).reverse.each do |opts|
|
147
146
|
return application.language(opts[:target_locale]) unless opts[:target_locale].nil?
|
148
147
|
end
|
148
|
+
|
149
149
|
current_language
|
150
150
|
end
|
151
151
|
|
@@ -170,6 +170,10 @@ module Tml
|
|
170
170
|
(@block_options ||= []).last || {}
|
171
171
|
end
|
172
172
|
|
173
|
+
def block_options_queue
|
174
|
+
@block_options
|
175
|
+
end
|
176
|
+
|
173
177
|
def with_block_options(opts)
|
174
178
|
push_block_options(opts)
|
175
179
|
if block_given?
|
data/lib/tml/tokens/data.rb
CHANGED
@@ -381,11 +381,7 @@ module Tml
|
|
381
381
|
return error("Missing value for #{full_name} in #{label}", false)
|
382
382
|
end
|
383
383
|
|
384
|
-
|
385
|
-
return error("Token value is nil for #{full_name} in #{label}", false)
|
386
|
-
end
|
387
|
-
|
388
|
-
return label.gsub(full_name, "") if object.nil?
|
384
|
+
return label.gsub(full_name, '') if object.nil?
|
389
385
|
|
390
386
|
value = token_value(object, language, options)
|
391
387
|
label.gsub(full_name, value)
|
data/lib/tml/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: tml
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 4.3.
|
4
|
+
version: 4.3.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Michael Berkovich
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-
|
11
|
+
date: 2015-02-03 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: faraday
|