r18n-core 3.0.3 → 3.0.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/ChangeLog.md +3 -0
- data/lib/r18n-core/translation.rb +6 -0
- data/lib/r18n-core/version.rb +1 -1
- data/spec/translation_spec.rb +16 -0
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 1a98108d0f919b57a6c864599dcd773ce3eacce7286114c4fb18b168998a59f9
|
4
|
+
data.tar.gz: 42f2644371ba8017b1020c05a45013973788465f437a01a12c7b211d1a83b78b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 051f28f8b5c1dcee329a7e6c3ba8881300cd82ca228b42e0214610570ec4960f3d7800198c056a4edb377c22803bd946c624436c27082be5d171885da1b84bda
|
7
|
+
data.tar.gz: c63dc19fce9236dad30181cf411d1922fe66c83a8e8d4023c4fc529dd7987a1153af73b2417918a7f06c26aa6dc41f7cf5efe0a513f05c26e3b1cfed166e6e51
|
data/ChangeLog.md
CHANGED
data/lib/r18n-core/version.rb
CHANGED
data/spec/translation_spec.rb
CHANGED
@@ -145,4 +145,20 @@ describe R18n::Translation do
|
|
145
145
|
translation = R18n::Translation.new(en, '')
|
146
146
|
expect(translation.inspect).to eq('Translation root for en {}')
|
147
147
|
end
|
148
|
+
|
149
|
+
describe '#dig' do
|
150
|
+
subject { R18n::I18n.new('en', DIR).in.dig(*keys) }
|
151
|
+
|
152
|
+
context 'with existing keys' do
|
153
|
+
let(:keys) { %w[another level] }
|
154
|
+
|
155
|
+
it { is_expected.to be_translated }
|
156
|
+
end
|
157
|
+
|
158
|
+
context 'with non-existing keys' do
|
159
|
+
let(:keys) { %w[non-existing level] }
|
160
|
+
|
161
|
+
it { is_expected.not_to be_translated }
|
162
|
+
end
|
163
|
+
end
|
148
164
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: r18n-core
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 3.0.
|
4
|
+
version: 3.0.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Andrey Sitnik
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2018-
|
11
|
+
date: 2018-07-10 00:00:00.000000000 Z
|
12
12
|
dependencies: []
|
13
13
|
description: |2
|
14
14
|
R18n is a i18n tool to translate your Ruby application.
|