mods_display 1.0.0.alpha1 → 1.0.0.alpha2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/mods_display/html.rb +3 -1
- data/lib/mods_display/version.rb +1 -1
- data/lib/mods_display.rb +7 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 11dfd2a19312fa3a121188ad7285eaf4ae841ebd9077da079d996c8c044c75bb
|
4
|
+
data.tar.gz: 03cf396d6fc8304f86d691041ae8f248b498626d225694fcf2aa02bd11eea91f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 4a3978055d27cb58509dab4c33f5452d8b29331db2fa2669f6051f91ab390ddcb3c3561d1d89ccc47048032b9169b98f0f63ef8f29c37b3b5e6374131ce5d061
|
7
|
+
data.tar.gz: 94962310a85cdb0bba23997b5b5bde94a9be8d8dbf34b58f383811e7144f8e3764e41462933ff5ff3dbc2161449f6e476eda36a7bd5560779c877bfbd1022ff5
|
data/lib/mods_display/html.rb
CHANGED
@@ -56,7 +56,9 @@ module ModsDisplay
|
|
56
56
|
view_context.render ModsDisplay::RecordComponent.new(record: self, fields: fields)
|
57
57
|
end
|
58
58
|
|
59
|
-
MODS_DISPLAY_FIELD_MAPPING.
|
59
|
+
MODS_DISPLAY_FIELD_MAPPING.each do |key, _value|
|
60
|
+
next if key == :title
|
61
|
+
|
60
62
|
define_method(key) do |raw: false|
|
61
63
|
field = mods_field(key)
|
62
64
|
next field if raw
|
data/lib/mods_display/version.rb
CHANGED
data/lib/mods_display.rb
CHANGED
@@ -38,4 +38,10 @@ I18n::Backend::Simple.send(:include, I18n::Backend::Fallbacks)
|
|
38
38
|
I18n.load_path += Dir["#{File.expand_path('../..', __FILE__)}/config/locales/*.yml"]
|
39
39
|
I18n.backend.load_translations
|
40
40
|
|
41
|
-
|
41
|
+
begin
|
42
|
+
require 'rails'
|
43
|
+
rescue LoadError
|
44
|
+
#do nothing
|
45
|
+
end
|
46
|
+
|
47
|
+
require 'mods_display/engine' if defined?(Rails)
|