recourse 5.10.0 → 5.10.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: fc1fa907947fab5a125008b4ce6d190f8fc10cbcc5e5a07f8645230adc81d056
4
- data.tar.gz: 7b08aaa5c77bb19c27f144e24888ed641c118666fa408ff877bc59e1345fb0c9
3
+ metadata.gz: afb6a61d5d13796a096ef7b08e10dd5be4e78f84394f5956e1128b5d9cd84c85
4
+ data.tar.gz: dcdba66e3572b1df47503614634fc69441baacdbf7de8dbca68d5fae3c97f98a
5
5
  SHA512:
6
- metadata.gz: aab672ef3d982d5b36eef34813c4d140ab4c3ad0267db0ae87b6e87b6304d3cc179ef5e9c6fe58160f62675390297c81c8ee0423c14fcbd811fea14840100560
7
- data.tar.gz: a867787db27e144331de96386609e64a3b18241e42ac1c773ee91799c41bc28e98bad8afa0cefd55dfed433ace537d117c0ccb60506e90c02cfd5197b3951969
6
+ metadata.gz: e68943cc95a7fdf3e0be426cd893e7b3e42fc8e4526bbe2cdafb1d646c4d3e48e287947776bd8ed18ff3d9b3d8d608c2878140b633759053bb2c88c10b498fb4
7
+ data.tar.gz: 59de342b0a61faefdf645f4eddb71f5979e3ecdd55c0855536635a30662eb16e26d98fa5a13b8bc824a3f16dabcc3b6c7ba478ae5334439e61ec471b2e7ba093
@@ -29,7 +29,7 @@ module Recourse
29
29
  # Nothing to disclose is nothing to mask: an encrypted column the record has no
30
30
  # value for reads as the dash, rather than as one asterisk hiding one.
31
31
  def value_control(column)
32
- return masked_value formatted_value(column) if masked? column
32
+ return masked_value column if masked? column
33
33
 
34
34
  tag.div resource_value(column), class: 'form-control-plaintext'
35
35
  end
@@ -41,7 +41,11 @@ module Recourse
41
41
  # PII is a page's to show and nobody's to leak by accident, so it arrives as one
42
42
  # asterisk per character with the plaintext in an attribute the reveal reads: a
43
43
  # screenshot of the page discloses nothing, and reading one value takes a click.
44
- def masked_value(value)
44
+ # What the column holds rather than what a cell would make of it: the reveal
45
+ # writes what it is given as text, so markup would be read out as markup -- and
46
+ # one asterisk per character of a tag counts nothing anybody is hiding.
47
+ def masked_value(column)
48
+ value = resource_record.attributes[column].to_s
45
49
  options = {
46
50
  class: 'form-control-plaintext d-flex gap-2 align-items-end',
47
51
  data: { controller: 'reveal', reveal_plain_value: value },
@@ -1,4 +1,4 @@
1
1
  module Recourse
2
2
  # Version of the gem, read by the gemspec and by hosts checking compatibility.
3
- VERSION = '5.10.0'
3
+ VERSION = '5.10.1'
4
4
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: recourse
3
3
  version: !ruby/object:Gem::Version
4
- version: 5.10.0
4
+ version: 5.10.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - claudiob