effective_logging 3.0.1 → 3.0.2

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
- SHA1:
3
- metadata.gz: bbc0e538d852182737e0d46e6124c56ee7f598bd
4
- data.tar.gz: 1019133ccfeaaf250a64bed156bc959206efed1a
2
+ SHA256:
3
+ metadata.gz: c92ea369d5e7b887728bf0291ae1646927cec17e34291a6f992113974709d251
4
+ data.tar.gz: c548c740c30f16808a9a4c3819de0e59f1c13f19a2d0e3c4731d98bde5a24554
5
5
  SHA512:
6
- metadata.gz: 9edf59801301335283763230a35134950349742a6b4fe81b728fe48fc42608107a81b6ceabe6e7af02cc473f540c135a6e71acc9e70eee9e43a931fb540bb681
7
- data.tar.gz: 11897b22f2dacfcdb0d000c5d78dc0a5b89857db75cdf6f70cc387d36bafd4b4341d5ee00d2d966fc86298b9a93a93c96b83ca635b4b4f0b1c0011c32a93a279
6
+ metadata.gz: fdbe98db9ef7b04d6b026fb2a440fe190836f971af7415c32b7ad653f35575a0bc1c0e635e5a9787d4a7e1a61dc9184741ca6af4615bd1ab594139720a1d9675
7
+ data.tar.gz: fa25ce65060c2c38f575b90378da8962e6c53ab24708cbfdbd56b5ab13040c4c83b6ff69311ccf02cdc8919d5e9e4431ad55673260d865eb14d274067a941e5a
@@ -1,4 +1,13 @@
1
1
  module EffectiveLoggingHelper
2
+ ALLOWED_TAGS = [
3
+ "a", "abbr", "acronym", "address", "b", "big", "blockquote", "br", "cite", "code", "dd", "del", "dfn", "div", "dl", "dt", "em",
4
+ "h1", "h2", "h3", "h4", "h5", "h6", "hr", "i", "img", "ins", "kbd", "li", "ol", "p", "pre", "samp", "small", "span", "strong",
5
+ "sub", "sup", "table", "tbody", "td", "tfoot", "th", "thead", "tr", "tt", "ul", "var"
6
+ ]
7
+
8
+ ALLOWED_ATTRIBUTES = [
9
+ "abbr", "alt", "cite", "class", "colspan", "datetime", "height", "href", "name", "rowspan", "src", "title", "width", "xml:lang"
10
+ ]
2
11
 
3
12
  def bootstrap_class_for_status(status)
4
13
  case status
@@ -59,10 +68,7 @@ module EffectiveLoggingHelper
59
68
  end
60
69
 
61
70
  def format_log_details_resource_value(value)
62
- @format_resource_tags ||= ActionView::Base.sanitized_allowed_tags.to_a + ['table', 'thead', 'tbody', 'tfoot', 'tr', 'td', 'th']
63
- @format_resource_atts ||= ActionView::Base.sanitized_allowed_attributes.to_a + ['colspan', 'rowspan']
64
-
65
- simple_format(sanitize(value.to_s, tags: @format_resource_tags, attributes: @format_resource_atts), {}, sanitize: false)
71
+ simple_format(sanitize(value.to_s, tags: ALLOWED_TAGS, attributes: ALLOWED_ATTRIBUTES), {}, sanitize: false)
66
72
  end
67
73
 
68
74
  end
@@ -1,3 +1,3 @@
1
1
  module EffectiveLogging
2
- VERSION = '3.0.1'.freeze
2
+ VERSION = '3.0.2'.freeze
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: effective_logging
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.0.1
4
+ version: 3.0.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Code and Effect
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2019-04-26 00:00:00.000000000 Z
11
+ date: 2019-10-31 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails
@@ -138,8 +138,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
138
138
  - !ruby/object:Gem::Version
139
139
  version: '0'
140
140
  requirements: []
141
- rubyforge_project:
142
- rubygems_version: 2.4.5.1
141
+ rubygems_version: 3.0.3
143
142
  signing_key:
144
143
  specification_version: 4
145
144
  summary: Automatically log all sent emails, user logins, and page views. This also