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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 29d0b62ee677df5874f71c15c9da893a400992064ff2636bce46c9b1b2058e75
4
- data.tar.gz: e90d7f860b9be00ffdd3c3570b8846d73eccdd7d176a6af76fa5a3dc597fa07a
3
+ metadata.gz: 11dfd2a19312fa3a121188ad7285eaf4ae841ebd9077da079d996c8c044c75bb
4
+ data.tar.gz: 03cf396d6fc8304f86d691041ae8f248b498626d225694fcf2aa02bd11eea91f
5
5
  SHA512:
6
- metadata.gz: 0756633e1fd4a7be5246939e60b3c080933fd1308faf9b70c85f8d1c590557209eaef4c84157a7e0352f287bcd8b4f1729f67cd0ed399bac91c0a05f5c736bd8
7
- data.tar.gz: 4df2f37443d07c938b09323db91a23878a4aec9704a71fc02092dba89c78e9921f1e1b1c68c5da058d88a0445f0ace30ecb08474c46db5fd935566929727ba7b
6
+ metadata.gz: 4a3978055d27cb58509dab4c33f5452d8b29331db2fa2669f6051f91ab390ddcb3c3561d1d89ccc47048032b9169b98f0f63ef8f29c37b3b5e6374131ce5d061
7
+ data.tar.gz: 94962310a85cdb0bba23997b5b5bde94a9be8d8dbf34b58f383811e7144f8e3764e41462933ff5ff3dbc2161449f6e476eda36a7bd5560779c877bfbd1022ff5
@@ -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.except(:title).each do |key, _value|
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
@@ -1,3 +1,3 @@
1
1
  module ModsDisplay
2
- VERSION = '1.0.0.alpha1'
2
+ VERSION = '1.0.0.alpha2'
3
3
  end
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
- require 'mods_display/engine'
41
+ begin
42
+ require 'rails'
43
+ rescue LoadError
44
+ #do nothing
45
+ end
46
+
47
+ require 'mods_display/engine' if defined?(Rails)
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: mods_display
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.0.alpha1
4
+ version: 1.0.0.alpha2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jessie Keck