mods_display 1.0.0.alpha3 → 1.0.0.alpha4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 6bdb26528f999cd2a0b4fc6ef1ebcfdb65f2e1519ce5bf60a53165dd253cda56
4
- data.tar.gz: 7a62db3452190084b29368f5ef6c0362f570aa81d2f53a90b4714ea906b0dca9
3
+ metadata.gz: ddc37991f77e62624571f1bb31377288046f1cc31b184d20b0cc3677a3e52b7e
4
+ data.tar.gz: 770739d41125913dca2427c9f1a6ef6c1c27c58b7dec25957971e6a4fc57d2be
5
5
  SHA512:
6
- metadata.gz: b60063a6c9cc97e37e1ba731400acfa304247c46910715a86fe24a458df238dbdabcde7b988d3d8eb4365c1735b91b6b8d96129d581c6b06aef2f5f53d1add80
7
- data.tar.gz: d518a05161e94ba4b48017a222f53a9299921b99455fd7a1918307e033ee69aedb0e7794d4bc415488cbd8f08d61383d0c899f62fd25458a6b6c54e6125ce33d
6
+ metadata.gz: 0bc274a16344bb24cf853a15595444659a5255fdf4f4fd4095d75acf438ce01df9df70bf86f0526788c79deb5b46dd59bb40d96242fd8afec5f4148b0228a7d5
7
+ data.tar.gz: 99da3c5c1d779f1100a61047db8c7ffd2b2485216e48dbcd1a2728deb0599ddd7da828f49199e3db8fda761c6a9862e115d8ba71dbe727124eb48b186c6484c5
@@ -82,19 +82,16 @@ module ModsDisplay
82
82
  def license_statement(element)
83
83
  matches = element.text.match(/^(?<code>.*) (?<type>.*):(?<description>.*)$/)
84
84
 
85
- return "<div>#{element.text}</div>" unless matches
85
+ return element.text unless matches
86
86
 
87
87
  code = matches[:code].downcase
88
88
  type = matches[:type].downcase
89
89
  description = license_description(code, type) || matches[:description]
90
90
  url = license_url(code, type)
91
- output = "<div class='#{code}-#{type}'>"
92
- output << if url
93
- "<a href='#{url}'>#{description}</a>"
94
- else
95
- description
96
- end
97
- output << '</div>'
91
+
92
+ return "<a href='#{url}'>#{description}</a>" if url
93
+
94
+ description
98
95
  end
99
96
 
100
97
  def license_url(code, type)
@@ -1,3 +1,3 @@
1
1
  module ModsDisplay
2
- VERSION = '1.0.0.alpha3'
2
+ VERSION = '1.0.0.alpha4'
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: mods_display
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.0.alpha3
4
+ version: 1.0.0.alpha4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jessie Keck
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2022-01-18 00:00:00.000000000 Z
11
+ date: 2022-01-19 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: stanford-mods