europeana-blacklight 0.5.1 → 0.5.2
Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 46546d4aabd0fb8a37697c0fe26d51087ed34a0e
|
4
|
+
data.tar.gz: 021247ccb3ac23abe10b06568fed1b021dc14678
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f34ae7033b1a10d4b8b225ea848f89d5bbdd795cc73f2fa2d14992d54186b156c3cc325ec1bbdecc5012b02bb69996a612aa52f14dbc2c91349601df15eca3f5
|
7
|
+
data.tar.gz: ed649beeb0bcde45fd775b277165d0db8c1628df20b41d38af75ccc0b44f8903937871391c2a7dcdfbc6cb1cb21362412bf31e9e76b6650e2a876cf27e4005fd
|
@@ -33,8 +33,8 @@ module Europeana
|
|
33
33
|
|
34
34
|
return lang_map unless lang_map?(lang_map)
|
35
35
|
|
36
|
-
lang_map_value(lang_map, I18n.locale.to_s) ||
|
37
|
-
lang_map_value(lang_map, I18n.default_locale.to_s) ||
|
36
|
+
lang_map_value(lang_map, ::I18n.locale.to_s) ||
|
37
|
+
lang_map_value(lang_map, ::I18n.default_locale.to_s) ||
|
38
38
|
dereferenced_lang_map_value(lang_map[:def]) ||
|
39
39
|
lang_map.values
|
40
40
|
end
|
@@ -4,7 +4,7 @@ require 'i18n'
|
|
4
4
|
RSpec.describe Europeana::Blacklight::Document do
|
5
5
|
subject { described_class.new(edm) }
|
6
6
|
before do
|
7
|
-
I18n.available_locales =
|
7
|
+
::I18n.available_locales = %i(en fr es)
|
8
8
|
end
|
9
9
|
|
10
10
|
let(:edm) do
|
@@ -165,7 +165,7 @@ RSpec.describe Europeana::Blacklight::Document do
|
|
165
165
|
context 'when hash is lang map' do
|
166
166
|
context 'with key for current locale' do
|
167
167
|
before do
|
168
|
-
I18n.locale = :en
|
168
|
+
::I18n.locale = :en
|
169
169
|
end
|
170
170
|
it 'returns current locale value' do
|
171
171
|
expect(subject.fetch('proxies.dcType')).to eq(['Picture'])
|
@@ -173,8 +173,8 @@ RSpec.describe Europeana::Blacklight::Document do
|
|
173
173
|
end
|
174
174
|
context 'with key for default locale' do
|
175
175
|
before do
|
176
|
-
I18n.locale = :fr
|
177
|
-
I18n.default_locale = :en
|
176
|
+
::I18n.locale = :fr
|
177
|
+
::I18n.default_locale = :en
|
178
178
|
end
|
179
179
|
it 'returns default locale value' do
|
180
180
|
expect(subject.fetch('proxies.dcType')).to eq(['Picture'])
|
@@ -182,8 +182,8 @@ RSpec.describe Europeana::Blacklight::Document do
|
|
182
182
|
end
|
183
183
|
context 'with key "def"' do
|
184
184
|
before do
|
185
|
-
I18n.locale = :fr
|
186
|
-
I18n.default_locale = :es
|
185
|
+
::I18n.locale = :fr
|
186
|
+
::I18n.default_locale = :es
|
187
187
|
end
|
188
188
|
it 'returns default locale value' do
|
189
189
|
expect(subject.fetch('proxies.dcType')).to eq(['Image'])
|
@@ -191,7 +191,7 @@ RSpec.describe Europeana::Blacklight::Document do
|
|
191
191
|
end
|
192
192
|
context 'without current locale or "def" keys' do
|
193
193
|
before do
|
194
|
-
I18n.locale = :es
|
194
|
+
::I18n.locale = :es
|
195
195
|
end
|
196
196
|
it 'returns array of all values' do
|
197
197
|
expect(subject.fetch('proxies.dcDescription')).to eq(['object desc'])
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: europeana-blacklight
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.5.
|
4
|
+
version: 0.5.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Richard Doe
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2017-
|
11
|
+
date: 2017-06-22 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: blacklight
|
@@ -256,7 +256,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
256
256
|
version: '0'
|
257
257
|
requirements: []
|
258
258
|
rubyforge_project:
|
259
|
-
rubygems_version: 2.5.
|
259
|
+
rubygems_version: 2.5.1
|
260
260
|
signing_key:
|
261
261
|
specification_version: 4
|
262
262
|
summary: Europeana REST API adapter for Blacklight
|