blacklight 6.19.0 → 6.19.1
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 +4 -4
- data/VERSION +1 -1
- data/app/presenters/blacklight/index_presenter.rb +8 -4
- data/spec/presenters/index_presenter_spec.rb +9 -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: 51a58afc62bfdc6dfd3b7796e75ecdfef49a7d831fbd66cb2b4a34a483ff79bd
|
4
|
+
data.tar.gz: 696d0e82c3adc9e0728c98452b7588d7235f5cc649ac0a259ae122001b5b78dd
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 4830158f0d709f43a5d2d4388e29843f3ab02404cacd7abf0ba0965b58873a0f01c75e0bfbf2d32f7f467fbd4a98cdf121d2205b9e0de07e7ed28a40047e997f
|
7
|
+
data.tar.gz: af430dcbe8775706d3c9436b197bcd2fb9b8212ab46cac4ea33b14fd07e3c012293683b94993e4d431214d8a929828e12c8f5154bcd3f841904b68479a461c61
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
6.19.
|
1
|
+
6.19.1
|
@@ -53,13 +53,17 @@ module Blacklight
|
|
53
53
|
# @option options [String] :value
|
54
54
|
def field_value field_or_name, options = {}
|
55
55
|
field = case field_or_name
|
56
|
+
when Blacklight::Configuration::Field
|
57
|
+
field_or_name
|
56
58
|
when String, Symbol
|
57
|
-
Deprecation.warn(self, "You provided a
|
58
|
-
"Provide a Blacklight::Configuration::Field instead.
|
59
|
-
"strings or symbols in Blacklight 7")
|
59
|
+
Deprecation.warn(self, "You provided a #{field_or_name.class} value to IndexPresenter#field_value " \
|
60
|
+
"Provide a Blacklight::Configuration::Field instead. This behavior is deprecated in Blacklight 7")
|
60
61
|
field_config(field_or_name)
|
61
62
|
else
|
62
|
-
field_or_name
|
63
|
+
Deprecation.warn(self, "You provided a #{field_or_name.class} value to IndexPresenter#field_value. " \
|
64
|
+
"This will be silently ignored and will be an error in Blacklight 7.")
|
65
|
+
|
66
|
+
Configuration::NullField.new
|
63
67
|
end
|
64
68
|
field_values(field, options)
|
65
69
|
end
|
@@ -58,6 +58,15 @@ describe Blacklight::IndexPresenter do
|
|
58
58
|
expect(subject).to eq 'document qwer value'
|
59
59
|
end
|
60
60
|
end
|
61
|
+
|
62
|
+
context 'with a name as an integer' do
|
63
|
+
subject { presenter.field_value 123 }
|
64
|
+
|
65
|
+
it 'raises a deprecation' do
|
66
|
+
expect(Deprecation).to receive(:warn)
|
67
|
+
expect(subject).to eq ''
|
68
|
+
end
|
69
|
+
end
|
61
70
|
end
|
62
71
|
|
63
72
|
context 'when an explicit value is provided' do
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: blacklight
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 6.19.
|
4
|
+
version: 6.19.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Jonathan Rochkind
|
@@ -17,7 +17,7 @@ authors:
|
|
17
17
|
autorequire:
|
18
18
|
bindir: exe
|
19
19
|
cert_chain: []
|
20
|
-
date: 2018-12-
|
20
|
+
date: 2018-12-18 00:00:00.000000000 Z
|
21
21
|
dependencies:
|
22
22
|
- !ruby/object:Gem::Dependency
|
23
23
|
name: rails
|