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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: f8c4e84017c1688f0bcd1f5d99438369b1ac18bda293369d65422d732b401755
4
- data.tar.gz: 7c7dc8aaa1ceb8aa086ffdeecd6dd1c086952298f4a626c927df495f64958086
3
+ metadata.gz: 51a58afc62bfdc6dfd3b7796e75ecdfef49a7d831fbd66cb2b4a34a483ff79bd
4
+ data.tar.gz: 696d0e82c3adc9e0728c98452b7588d7235f5cc649ac0a259ae122001b5b78dd
5
5
  SHA512:
6
- metadata.gz: de725df92b158a47778ae9f7d0fe54b1055ca1679d68995d5dee0653cfb637bef524b3011d62fa2ec57289abae7f1e2158e38e160a32848112783531af0d1507
7
- data.tar.gz: '02385cf07bd6d5c1296d8a5521acf481c42a6ec3046e3a2dbc5d21cba5a624dddec3d68e8f0cff8b885537a76b15a5d3ca7bf1729d167b64fadc5cad2e555e33'
6
+ metadata.gz: 4830158f0d709f43a5d2d4388e29843f3ab02404cacd7abf0ba0965b58873a0f01c75e0bfbf2d32f7f467fbd4a98cdf121d2205b9e0de07e7ed28a40047e997f
7
+ data.tar.gz: af430dcbe8775706d3c9436b197bcd2fb9b8212ab46cac4ea33b14fd07e3c012293683b94993e4d431214d8a929828e12c8f5154bcd3f841904b68479a461c61
data/VERSION CHANGED
@@ -1 +1 @@
1
- 6.19.0
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 String or Symbol value to IndexPresenter#field_value " \
58
- "Provide a Blacklight::Configuration::Field instead. field_value() will not accept " \
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.0
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-17 00:00:00.000000000 Z
20
+ date: 2018-12-18 00:00:00.000000000 Z
21
21
  dependencies:
22
22
  - !ruby/object:Gem::Dependency
23
23
  name: rails