berkeley_library-logging 0.2.5 → 0.2.6.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.idea/inspectionProfiles/Project_Default.xml +4 -0
- data/.idea/logging.iml +94 -88
- data/.rubocop.yml +100 -136
- data/CHANGES.md +13 -0
- data/berkeley_library-logging.gemspec +8 -3
- data/lib/berkeley_library/logging/env.rb +1 -1
- data/lib/berkeley_library/logging/logger.rb +8 -0
- data/lib/berkeley_library/logging/loggers.rb +9 -8
- data/lib/berkeley_library/logging/module_info.rb +1 -1
- data/spec/.rubocop.yml +88 -7
- data/spec/rails/ucblit/logging/configurator_spec.rb +2 -2
- data/spec/rails/ucblit/logging/env_spec.rb +2 -2
- data/spec/rails/ucblit/logging/formatters_spec.rb +3 -1
- data/spec/rails/ucblit/logging/loggers_spec.rb +6 -5
- data/spec/rails/ucblit/logging/railtie_spec.rb +2 -2
- data/spec/rails/ucblit/logging_spec.rb +3 -3
- data/spec/spec_helper.rb +1 -1
- data/spec/standalone/ucblit/logging/configurator_spec.rb +2 -2
- data/spec/standalone/ucblit/logging/formatters_spec.rb +3 -1
- data/spec/standalone/ucblit/logging/loggers_spec.rb +4 -7
- data/spec/standalone/ucblit/logging/safe_serializer_spec.rb +2 -2
- data/spec/standalone/ucblit/logging_spec.rb +3 -3
- data/spec/standalone_helper.rb +1 -1
- metadata +29 -14
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 48c51023acdd7645c3bb8b848866530073434912b93498b4b12a739dd117da52
|
4
|
+
data.tar.gz: 40fc965452fba9f55877ef598eb594e510a67d1e8f77add187efe1b34f4395b5
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f9ecb21c588ccc52ee496c6fd4eb1e9bd47a771147da4707814931b48e58b0a50b4f5d5ce9d7f5974bdaa4fc1ee82ad456e5ac42f4d73931a69cde6652e3a2da
|
7
|
+
data.tar.gz: b4ffb91ebc7c1d4c98ca314f587ad66dfe92755556d345dd8b459412cf9ff657ed8f70e2c6ccd6060aed44167cc135911f90aeb9ab56e580c3388a6eba361928
|
@@ -6,6 +6,10 @@
|
|
6
6
|
<inspection_tool class="LanguageDetectionInspection" enabled="false" level="WARNING" enabled_by_default="false" />
|
7
7
|
<inspection_tool class="Rubocop" enabled="false" level="WARNING" enabled_by_default="false" />
|
8
8
|
<inspection_tool class="RubyCaseWithoutElseBlockInspection" enabled="false" level="WARNING" enabled_by_default="false" />
|
9
|
+
<inspection_tool class="RubyMismatchedArgumentType" enabled="true" level="WEAK WARNING" enabled_by_default="true">
|
10
|
+
<option name="myCheckNilability" value="false" />
|
11
|
+
</inspection_tool>
|
12
|
+
<inspection_tool class="RubyMismatchedGlobalVariableType" enabled="true" level="WEAK WARNING" enabled_by_default="true" />
|
9
13
|
<inspection_tool class="RubyNilAnalysis" enabled="true" level="WEAK WARNING" enabled_by_default="true" />
|
10
14
|
<inspection_tool class="RubyParameterNamingConvention" enabled="false" level="WARNING" enabled_by_default="false" />
|
11
15
|
<inspection_tool class="RubyStringKeysInHashInspection" enabled="true" level="INFORMATION" enabled_by_default="true" />
|
data/.idea/logging.iml
CHANGED
@@ -5,93 +5,99 @@
|
|
5
5
|
</component>
|
6
6
|
<component name="NewModuleRootManager">
|
7
7
|
<content url="file://$MODULE_DIR$" />
|
8
|
-
<orderEntry type="jdk" jdkName="RVM: ruby-2.7.
|
8
|
+
<orderEntry type="jdk" jdkName="RVM: ruby-2.7.5" jdkType="RUBY_SDK" />
|
9
9
|
<orderEntry type="sourceFolder" forTests="false" />
|
10
|
-
<orderEntry type="library" scope="PROVIDED" name="actioncable (
|
11
|
-
<orderEntry type="library" scope="PROVIDED" name="actionmailbox (
|
12
|
-
<orderEntry type="library" scope="PROVIDED" name="actionmailer (
|
13
|
-
<orderEntry type="library" scope="PROVIDED" name="actionpack (
|
14
|
-
<orderEntry type="library" scope="PROVIDED" name="actiontext (
|
15
|
-
<orderEntry type="library" scope="PROVIDED" name="actionview (
|
16
|
-
<orderEntry type="library" scope="PROVIDED" name="activejob (
|
17
|
-
<orderEntry type="library" scope="PROVIDED" name="activemodel (
|
18
|
-
<orderEntry type="library" scope="PROVIDED" name="activerecord (
|
19
|
-
<orderEntry type="library" scope="PROVIDED" name="activestorage (
|
20
|
-
<orderEntry type="library" scope="PROVIDED" name="activesupport (
|
21
|
-
<orderEntry type="library" scope="PROVIDED" name="amazing_print (v1.4.0, RVM: ruby-2.7.
|
22
|
-
<orderEntry type="library" scope="PROVIDED" name="ansi (v1.5.0, RVM: ruby-2.7.
|
23
|
-
<orderEntry type="library" scope="PROVIDED" name="ast (v2.4.2, RVM: ruby-2.7.
|
24
|
-
<orderEntry type="library" scope="PROVIDED" name="brakeman (v4.10.1, RVM: ruby-2.7.
|
25
|
-
<orderEntry type="library" scope="PROVIDED" name="builder (v3.2.4, RVM: ruby-2.7.
|
26
|
-
<orderEntry type="library" scope="PROVIDED" name="bundle-audit (v0.1.0, RVM: ruby-2.7.
|
27
|
-
<orderEntry type="library" scope="PROVIDED" name="bundler (v2.2.
|
28
|
-
<orderEntry type="library" scope="PROVIDED" name="bundler-audit (v0.9.0.1, RVM: ruby-2.7.
|
29
|
-
<orderEntry type="library" scope="PROVIDED" name="ci_reporter (v2.0.0, RVM: ruby-2.7.
|
30
|
-
<orderEntry type="library" scope="PROVIDED" name="ci_reporter_rspec (v1.0.0, RVM: ruby-2.7.
|
31
|
-
<orderEntry type="library" scope="PROVIDED" name="colorize (v0.8.1, RVM: ruby-2.7.
|
32
|
-
<orderEntry type="library" scope="PROVIDED" name="concurrent-ruby (v1.1.
|
33
|
-
<orderEntry type="library" scope="PROVIDED" name="crass (v1.0.6, RVM: ruby-2.7.
|
34
|
-
<orderEntry type="library" scope="PROVIDED" name="diff-lcs (v1.
|
35
|
-
<orderEntry type="library" scope="PROVIDED" name="
|
36
|
-
<orderEntry type="library" scope="PROVIDED" name="
|
37
|
-
<orderEntry type="library" scope="PROVIDED" name="
|
38
|
-
<orderEntry type="library" scope="PROVIDED" name="
|
39
|
-
<orderEntry type="library" scope="PROVIDED" name="
|
40
|
-
<orderEntry type="library" scope="PROVIDED" name="
|
41
|
-
<orderEntry type="library" scope="PROVIDED" name="
|
42
|
-
<orderEntry type="library" scope="PROVIDED" name="
|
43
|
-
<orderEntry type="library" scope="PROVIDED" name="
|
44
|
-
<orderEntry type="library" scope="PROVIDED" name="
|
45
|
-
<orderEntry type="library" scope="PROVIDED" name="
|
46
|
-
<orderEntry type="library" scope="PROVIDED" name="
|
47
|
-
<orderEntry type="library" scope="PROVIDED" name="
|
48
|
-
<orderEntry type="library" scope="PROVIDED" name="
|
49
|
-
<orderEntry type="library" scope="PROVIDED" name="
|
50
|
-
<orderEntry type="library" scope="PROVIDED" name="
|
51
|
-
<orderEntry type="library" scope="PROVIDED" name="
|
52
|
-
<orderEntry type="library" scope="PROVIDED" name="
|
53
|
-
<orderEntry type="library" scope="PROVIDED" name="
|
54
|
-
<orderEntry type="library" scope="PROVIDED" name="
|
55
|
-
<orderEntry type="library" scope="PROVIDED" name="
|
56
|
-
<orderEntry type="library" scope="PROVIDED" name="
|
57
|
-
<orderEntry type="library" scope="PROVIDED" name="
|
58
|
-
<orderEntry type="library" scope="PROVIDED" name="
|
59
|
-
<orderEntry type="library" scope="PROVIDED" name="
|
60
|
-
<orderEntry type="library" scope="PROVIDED" name="
|
61
|
-
<orderEntry type="library" scope="PROVIDED" name="
|
62
|
-
<orderEntry type="library" scope="PROVIDED" name="
|
63
|
-
<orderEntry type="library" scope="PROVIDED" name="
|
64
|
-
<orderEntry type="library" scope="PROVIDED" name="
|
65
|
-
<orderEntry type="library" scope="PROVIDED" name="
|
66
|
-
<orderEntry type="library" scope="PROVIDED" name="
|
67
|
-
<orderEntry type="library" scope="PROVIDED" name="
|
68
|
-
<orderEntry type="library" scope="PROVIDED" name="
|
69
|
-
<orderEntry type="library" scope="PROVIDED" name="
|
70
|
-
<orderEntry type="library" scope="PROVIDED" name="
|
71
|
-
<orderEntry type="library" scope="PROVIDED" name="
|
72
|
-
<orderEntry type="library" scope="PROVIDED" name="
|
73
|
-
<orderEntry type="library" scope="PROVIDED" name="
|
74
|
-
<orderEntry type="library" scope="PROVIDED" name="
|
75
|
-
<orderEntry type="library" scope="PROVIDED" name="
|
76
|
-
<orderEntry type="library" scope="PROVIDED" name="
|
77
|
-
<orderEntry type="library" scope="PROVIDED" name="
|
78
|
-
<orderEntry type="library" scope="PROVIDED" name="
|
79
|
-
<orderEntry type="library" scope="PROVIDED" name="
|
80
|
-
<orderEntry type="library" scope="PROVIDED" name="
|
81
|
-
<orderEntry type="library" scope="PROVIDED" name="
|
82
|
-
<orderEntry type="library" scope="PROVIDED" name="
|
83
|
-
<orderEntry type="library" scope="PROVIDED" name="
|
84
|
-
<orderEntry type="library" scope="PROVIDED" name="
|
85
|
-
<orderEntry type="library" scope="PROVIDED" name="
|
86
|
-
<orderEntry type="library" scope="PROVIDED" name="
|
87
|
-
<orderEntry type="library" scope="PROVIDED" name="
|
88
|
-
<orderEntry type="library" scope="PROVIDED" name="
|
89
|
-
<orderEntry type="library" scope="PROVIDED" name="
|
90
|
-
<orderEntry type="library" scope="PROVIDED" name="
|
91
|
-
<orderEntry type="library" scope="PROVIDED" name="
|
92
|
-
<orderEntry type="library" scope="PROVIDED" name="
|
93
|
-
<orderEntry type="library" scope="PROVIDED" name="
|
94
|
-
<orderEntry type="library" scope="PROVIDED" name="
|
10
|
+
<orderEntry type="library" scope="PROVIDED" name="actioncable (v7.0.3, RVM: ruby-2.7.5) [gem]" level="application" />
|
11
|
+
<orderEntry type="library" scope="PROVIDED" name="actionmailbox (v7.0.3, RVM: ruby-2.7.5) [gem]" level="application" />
|
12
|
+
<orderEntry type="library" scope="PROVIDED" name="actionmailer (v7.0.3, RVM: ruby-2.7.5) [gem]" level="application" />
|
13
|
+
<orderEntry type="library" scope="PROVIDED" name="actionpack (v7.0.3, RVM: ruby-2.7.5) [gem]" level="application" />
|
14
|
+
<orderEntry type="library" scope="PROVIDED" name="actiontext (v7.0.3, RVM: ruby-2.7.5) [gem]" level="application" />
|
15
|
+
<orderEntry type="library" scope="PROVIDED" name="actionview (v7.0.3, RVM: ruby-2.7.5) [gem]" level="application" />
|
16
|
+
<orderEntry type="library" scope="PROVIDED" name="activejob (v7.0.3, RVM: ruby-2.7.5) [gem]" level="application" />
|
17
|
+
<orderEntry type="library" scope="PROVIDED" name="activemodel (v7.0.3, RVM: ruby-2.7.5) [gem]" level="application" />
|
18
|
+
<orderEntry type="library" scope="PROVIDED" name="activerecord (v7.0.3, RVM: ruby-2.7.5) [gem]" level="application" />
|
19
|
+
<orderEntry type="library" scope="PROVIDED" name="activestorage (v7.0.3, RVM: ruby-2.7.5) [gem]" level="application" />
|
20
|
+
<orderEntry type="library" scope="PROVIDED" name="activesupport (v7.0.3, RVM: ruby-2.7.5) [gem]" level="application" />
|
21
|
+
<orderEntry type="library" scope="PROVIDED" name="amazing_print (v1.4.0, RVM: ruby-2.7.5) [gem]" level="application" />
|
22
|
+
<orderEntry type="library" scope="PROVIDED" name="ansi (v1.5.0, RVM: ruby-2.7.5) [gem]" level="application" />
|
23
|
+
<orderEntry type="library" scope="PROVIDED" name="ast (v2.4.2, RVM: ruby-2.7.5) [gem]" level="application" />
|
24
|
+
<orderEntry type="library" scope="PROVIDED" name="brakeman (v4.10.1, RVM: ruby-2.7.5) [gem]" level="application" />
|
25
|
+
<orderEntry type="library" scope="PROVIDED" name="builder (v3.2.4, RVM: ruby-2.7.5) [gem]" level="application" />
|
26
|
+
<orderEntry type="library" scope="PROVIDED" name="bundle-audit (v0.1.0, RVM: ruby-2.7.5) [gem]" level="application" />
|
27
|
+
<orderEntry type="library" scope="PROVIDED" name="bundler (v2.2.31, RVM: ruby-2.7.5) [gem]" level="application" />
|
28
|
+
<orderEntry type="library" scope="PROVIDED" name="bundler-audit (v0.9.0.1, RVM: ruby-2.7.5) [gem]" level="application" />
|
29
|
+
<orderEntry type="library" scope="PROVIDED" name="ci_reporter (v2.0.0, RVM: ruby-2.7.5) [gem]" level="application" />
|
30
|
+
<orderEntry type="library" scope="PROVIDED" name="ci_reporter_rspec (v1.0.0, RVM: ruby-2.7.5) [gem]" level="application" />
|
31
|
+
<orderEntry type="library" scope="PROVIDED" name="colorize (v0.8.1, RVM: ruby-2.7.5) [gem]" level="application" />
|
32
|
+
<orderEntry type="library" scope="PROVIDED" name="concurrent-ruby (v1.1.10, RVM: ruby-2.7.5) [gem]" level="application" />
|
33
|
+
<orderEntry type="library" scope="PROVIDED" name="crass (v1.0.6, RVM: ruby-2.7.5) [gem]" level="application" />
|
34
|
+
<orderEntry type="library" scope="PROVIDED" name="diff-lcs (v1.5.0, RVM: ruby-2.7.5) [gem]" level="application" />
|
35
|
+
<orderEntry type="library" scope="PROVIDED" name="digest (v3.1.0, RVM: ruby-2.7.5) [gem]" level="application" />
|
36
|
+
<orderEntry type="library" scope="PROVIDED" name="docile (v1.4.0, RVM: ruby-2.7.5) [gem]" level="application" />
|
37
|
+
<orderEntry type="library" scope="PROVIDED" name="dotenv (v2.7.6, RVM: ruby-2.7.5) [gem]" level="application" />
|
38
|
+
<orderEntry type="library" scope="PROVIDED" name="erubi (v1.10.0, RVM: ruby-2.7.5) [gem]" level="application" />
|
39
|
+
<orderEntry type="library" scope="PROVIDED" name="ffi (v1.15.5, RVM: ruby-2.7.5) [gem]" level="application" />
|
40
|
+
<orderEntry type="library" scope="PROVIDED" name="globalid (v1.0.0, RVM: ruby-2.7.5) [gem]" level="application" />
|
41
|
+
<orderEntry type="library" scope="PROVIDED" name="i18n (v1.10.0, RVM: ruby-2.7.5) [gem]" level="application" />
|
42
|
+
<orderEntry type="library" scope="PROVIDED" name="io-console (v0.5.11, RVM: ruby-2.7.5) [gem]" level="application" />
|
43
|
+
<orderEntry type="library" scope="PROVIDED" name="irb (v1.4.1, RVM: ruby-2.7.5) [gem]" level="application" />
|
44
|
+
<orderEntry type="library" scope="PROVIDED" name="listen (v3.1.5, RVM: ruby-2.7.5) [gem]" level="application" />
|
45
|
+
<orderEntry type="library" scope="PROVIDED" name="lograge (v0.12.0, RVM: ruby-2.7.5) [gem]" level="application" />
|
46
|
+
<orderEntry type="library" scope="PROVIDED" name="loofah (v2.18.0, RVM: ruby-2.7.5) [gem]" level="application" />
|
47
|
+
<orderEntry type="library" scope="PROVIDED" name="mail (v2.7.1, RVM: ruby-2.7.5) [gem]" level="application" />
|
48
|
+
<orderEntry type="library" scope="PROVIDED" name="marcel (v1.0.2, RVM: ruby-2.7.5) [gem]" level="application" />
|
49
|
+
<orderEntry type="library" scope="PROVIDED" name="method_source (v1.0.0, RVM: ruby-2.7.5) [gem]" level="application" />
|
50
|
+
<orderEntry type="library" scope="PROVIDED" name="mini_mime (v1.1.2, RVM: ruby-2.7.5) [gem]" level="application" />
|
51
|
+
<orderEntry type="library" scope="PROVIDED" name="minitest (v5.15.0, RVM: ruby-2.7.5) [gem]" level="application" />
|
52
|
+
<orderEntry type="library" scope="PROVIDED" name="net-imap (v0.2.3, RVM: ruby-2.7.5) [gem]" level="application" />
|
53
|
+
<orderEntry type="library" scope="PROVIDED" name="net-pop (v0.1.1, RVM: ruby-2.7.5) [gem]" level="application" />
|
54
|
+
<orderEntry type="library" scope="PROVIDED" name="net-protocol (v0.1.3, RVM: ruby-2.7.5) [gem]" level="application" />
|
55
|
+
<orderEntry type="library" scope="PROVIDED" name="net-smtp (v0.3.1, RVM: ruby-2.7.5) [gem]" level="application" />
|
56
|
+
<orderEntry type="library" scope="PROVIDED" name="nio4r (v2.5.8, RVM: ruby-2.7.5) [gem]" level="application" />
|
57
|
+
<orderEntry type="library" scope="PROVIDED" name="nokogiri (v1.13.6, RVM: ruby-2.7.5) [gem]" level="application" />
|
58
|
+
<orderEntry type="library" scope="PROVIDED" name="oj (v3.13.11, RVM: ruby-2.7.5) [gem]" level="application" />
|
59
|
+
<orderEntry type="library" scope="PROVIDED" name="ougai (v1.9.1, RVM: ruby-2.7.5) [gem]" level="application" />
|
60
|
+
<orderEntry type="library" scope="PROVIDED" name="parallel (v1.22.1, RVM: ruby-2.7.5) [gem]" level="application" />
|
61
|
+
<orderEntry type="library" scope="PROVIDED" name="parser (v3.1.2.0, RVM: ruby-2.7.5) [gem]" level="application" />
|
62
|
+
<orderEntry type="library" scope="PROVIDED" name="racc (v1.6.0, RVM: ruby-2.7.5) [gem]" level="application" />
|
63
|
+
<orderEntry type="library" scope="PROVIDED" name="rack (v2.2.3, RVM: ruby-2.7.5) [gem]" level="application" />
|
64
|
+
<orderEntry type="library" scope="PROVIDED" name="rack-test (v1.1.0, RVM: ruby-2.7.5) [gem]" level="application" />
|
65
|
+
<orderEntry type="library" scope="PROVIDED" name="rails (v7.0.3, RVM: ruby-2.7.5) [gem]" level="application" />
|
66
|
+
<orderEntry type="library" scope="PROVIDED" name="rails-dom-testing (v2.0.3, RVM: ruby-2.7.5) [gem]" level="application" />
|
67
|
+
<orderEntry type="library" scope="PROVIDED" name="rails-html-sanitizer (v1.4.2, RVM: ruby-2.7.5) [gem]" level="application" />
|
68
|
+
<orderEntry type="library" scope="PROVIDED" name="railties (v7.0.3, RVM: ruby-2.7.5) [gem]" level="application" />
|
69
|
+
<orderEntry type="library" scope="PROVIDED" name="rainbow (v3.1.1, RVM: ruby-2.7.5) [gem]" level="application" />
|
70
|
+
<orderEntry type="library" scope="PROVIDED" name="rake (v13.0.6, RVM: ruby-2.7.5) [gem]" level="application" />
|
71
|
+
<orderEntry type="library" scope="PROVIDED" name="rb-fsevent (v0.11.1, RVM: ruby-2.7.5) [gem]" level="application" />
|
72
|
+
<orderEntry type="library" scope="PROVIDED" name="rb-inotify (v0.10.1, RVM: ruby-2.7.5) [gem]" level="application" />
|
73
|
+
<orderEntry type="library" scope="PROVIDED" name="regexp_parser (v2.4.0, RVM: ruby-2.7.5) [gem]" level="application" />
|
74
|
+
<orderEntry type="library" scope="PROVIDED" name="reline (v0.3.1, RVM: ruby-2.7.5) [gem]" level="application" />
|
75
|
+
<orderEntry type="library" scope="PROVIDED" name="request_store (v1.5.1, RVM: ruby-2.7.5) [gem]" level="application" />
|
76
|
+
<orderEntry type="library" scope="PROVIDED" name="rexml (v3.2.5, RVM: ruby-2.7.5) [gem]" level="application" />
|
77
|
+
<orderEntry type="library" scope="PROVIDED" name="rspec (v3.11.0, RVM: ruby-2.7.5) [gem]" level="application" />
|
78
|
+
<orderEntry type="library" scope="PROVIDED" name="rspec-core (v3.11.0, RVM: ruby-2.7.5) [gem]" level="application" />
|
79
|
+
<orderEntry type="library" scope="PROVIDED" name="rspec-expectations (v3.11.0, RVM: ruby-2.7.5) [gem]" level="application" />
|
80
|
+
<orderEntry type="library" scope="PROVIDED" name="rspec-mocks (v3.11.1, RVM: ruby-2.7.5) [gem]" level="application" />
|
81
|
+
<orderEntry type="library" scope="PROVIDED" name="rspec-support (v3.11.0, RVM: ruby-2.7.5) [gem]" level="application" />
|
82
|
+
<orderEntry type="library" scope="PROVIDED" name="rubocop (v1.26.1, RVM: ruby-2.7.5) [gem]" level="application" />
|
83
|
+
<orderEntry type="library" scope="PROVIDED" name="rubocop-ast (v1.17.0, RVM: ruby-2.7.5) [gem]" level="application" />
|
84
|
+
<orderEntry type="library" scope="PROVIDED" name="rubocop-rspec (v2.4.0, RVM: ruby-2.7.5) [gem]" level="application" />
|
85
|
+
<orderEntry type="library" scope="PROVIDED" name="ruby-progressbar (v1.11.0, RVM: ruby-2.7.5) [gem]" level="application" />
|
86
|
+
<orderEntry type="library" scope="PROVIDED" name="ruby_dep (v1.5.0, RVM: ruby-2.7.5) [gem]" level="application" />
|
87
|
+
<orderEntry type="library" scope="PROVIDED" name="simplecov (v0.21.2, RVM: ruby-2.7.5) [gem]" level="application" />
|
88
|
+
<orderEntry type="library" scope="PROVIDED" name="simplecov-console (v0.9.1, RVM: ruby-2.7.5) [gem]" level="application" />
|
89
|
+
<orderEntry type="library" scope="PROVIDED" name="simplecov-html (v0.12.3, RVM: ruby-2.7.5) [gem]" level="application" />
|
90
|
+
<orderEntry type="library" scope="PROVIDED" name="simplecov-rcov (v0.3.1, RVM: ruby-2.7.5) [gem]" level="application" />
|
91
|
+
<orderEntry type="library" scope="PROVIDED" name="simplecov_json_formatter (v0.1.4, RVM: ruby-2.7.5) [gem]" level="application" />
|
92
|
+
<orderEntry type="library" scope="PROVIDED" name="strscan (v3.0.3, RVM: ruby-2.7.5) [gem]" level="application" />
|
93
|
+
<orderEntry type="library" scope="PROVIDED" name="terminal-table (v3.0.2, RVM: ruby-2.7.5) [gem]" level="application" />
|
94
|
+
<orderEntry type="library" scope="PROVIDED" name="thor (v1.2.1, RVM: ruby-2.7.5) [gem]" level="application" />
|
95
|
+
<orderEntry type="library" scope="PROVIDED" name="timeout (v0.2.0, RVM: ruby-2.7.5) [gem]" level="application" />
|
96
|
+
<orderEntry type="library" scope="PROVIDED" name="tzinfo (v2.0.4, RVM: ruby-2.7.5) [gem]" level="application" />
|
97
|
+
<orderEntry type="library" scope="PROVIDED" name="unicode-display_width (v2.1.0, RVM: ruby-2.7.5) [gem]" level="application" />
|
98
|
+
<orderEntry type="library" scope="PROVIDED" name="websocket-driver (v0.7.5, RVM: ruby-2.7.5) [gem]" level="application" />
|
99
|
+
<orderEntry type="library" scope="PROVIDED" name="websocket-extensions (v0.1.5, RVM: ruby-2.7.5) [gem]" level="application" />
|
100
|
+
<orderEntry type="library" scope="PROVIDED" name="zeitwerk (v2.5.4, RVM: ruby-2.7.5) [gem]" level="application" />
|
95
101
|
</component>
|
96
102
|
<component name="RModuleSettingsStorage">
|
97
103
|
<LOAD_PATH number="2" string0="$MODULE_DIR$/lib" string1="$MODULE_DIR$/spec" />
|
@@ -107,10 +113,10 @@
|
|
107
113
|
</subtasks>
|
108
114
|
</RakeTaskImpl>
|
109
115
|
<RakeTaskImpl description="Check test coverage, check code style, check gems for vulnerabilities" fullCommand="check" id="check" />
|
110
|
-
<RakeTaskImpl description="Remove artifacts directory" fullCommand="clean" id="clean" />
|
116
|
+
<RakeTaskImpl description="Remove artifacts directory, except for .keep file" fullCommand="clean" id="clean" />
|
111
117
|
<RakeTaskImpl description="Run all specs in spec directory, with coverage" fullCommand="coverage" id="coverage" />
|
112
118
|
<RakeTaskImpl description="Clean, check, build gem" fullCommand="default" id="default" />
|
113
|
-
<RakeTaskImpl description="Build berkeley_library-logging.gemspec as berkeley_library-logging-0.2.
|
119
|
+
<RakeTaskImpl description="Build berkeley_library-logging.gemspec as berkeley_library-logging-0.2.6.1.gem" fullCommand="gem" id="gem" />
|
114
120
|
<RakeTaskImpl description="Run RuboCop" fullCommand="rubocop" id="rubocop" />
|
115
121
|
<RakeTaskImpl id="rubocop">
|
116
122
|
<subtasks>
|
data/.rubocop.yml
CHANGED
@@ -1,9 +1,10 @@
|
|
1
1
|
AllCops:
|
2
|
-
# Exclude generated files
|
3
2
|
Exclude:
|
3
|
+
# Exclude generated files
|
4
4
|
- 'bin/**/*'
|
5
|
-
- '
|
6
|
-
- '
|
5
|
+
- 'db/**/*'
|
6
|
+
- 'out/**/*'
|
7
|
+
# Exclude vendor files in GitHub build
|
7
8
|
- 'vendor/**/*'
|
8
9
|
|
9
10
|
# Allow one line around block body (Layout/EmptyLines will still disallow two or more)
|
@@ -42,6 +43,10 @@ Naming/MethodParameterName:
|
|
42
43
|
Naming/VariableNumber:
|
43
44
|
Enabled: False
|
44
45
|
|
46
|
+
# Whether vertical or horizontal is more readable depends on context
|
47
|
+
Style/AccessorGrouping:
|
48
|
+
Enabled: false
|
49
|
+
|
45
50
|
# Do what's readable in the context you're in
|
46
51
|
Style/AccessModifierDeclarations:
|
47
52
|
Enabled: false
|
@@ -50,6 +55,10 @@ Style/AccessModifierDeclarations:
|
|
50
55
|
Style/AsciiComments:
|
51
56
|
Enabled: false
|
52
57
|
|
58
|
+
#
|
59
|
+
Style/ClassEqualityComparison:
|
60
|
+
Enabled: false
|
61
|
+
|
53
62
|
# Seriously?
|
54
63
|
Style/CommentedKeyword:
|
55
64
|
Enabled: False
|
@@ -88,185 +97,140 @@ Style/SafeNavigation:
|
|
88
97
|
Enabled: false
|
89
98
|
|
90
99
|
############################################################
|
91
|
-
#
|
100
|
+
# Enable newer cops
|
92
101
|
|
93
|
-
Style/HashEachMethods:
|
102
|
+
Style/HashEachMethods: # (new in 0.80)
|
94
103
|
Enabled: true
|
95
|
-
|
96
|
-
Style/HashTransformKeys:
|
104
|
+
Style/HashTransformKeys: # (new in 0.80)
|
97
105
|
Enabled: true
|
98
|
-
|
99
|
-
Style/HashTransformValues:
|
106
|
+
Style/HashTransformValues: # (new in 0.80)
|
100
107
|
Enabled: true
|
101
|
-
|
102
|
-
############################################################
|
103
|
-
# Added in RuboCop 0.81
|
104
|
-
|
105
|
-
Lint/StructNewOverride:
|
108
|
+
Lint/RaiseException: # (new in 0.81)
|
106
109
|
Enabled: true
|
107
|
-
|
108
|
-
Lint/RaiseException:
|
110
|
+
Lint/StructNewOverride: # (new in 0.81)
|
109
111
|
Enabled: true
|
110
|
-
|
111
|
-
############################################################
|
112
|
-
# Added in RuboCop 0.82
|
113
|
-
|
114
|
-
Layout/SpaceAroundMethodCallOperator:
|
112
|
+
Layout/SpaceAroundMethodCallOperator: # (new in 0.82)
|
115
113
|
Enabled: true
|
116
|
-
|
117
|
-
Style/ExponentialNotation:
|
114
|
+
Style/ExponentialNotation: # (new in 0.82)
|
118
115
|
Enabled: false
|
119
|
-
|
120
|
-
############################################################
|
121
|
-
# Added in RuboCop 0.83
|
122
|
-
|
123
|
-
Layout/EmptyLinesAroundAttributeAccessor:
|
116
|
+
Layout/EmptyLinesAroundAttributeAccessor: # (new in 0.83)
|
124
117
|
Enabled: true
|
125
|
-
|
126
|
-
Style/SlicingWithRange:
|
118
|
+
Style/SlicingWithRange: # (new in 0.83)
|
127
119
|
Enabled: true
|
128
|
-
|
129
|
-
############################################################
|
130
|
-
# Added in RuboCop 0.84
|
131
|
-
|
132
|
-
Lint/DeprecatedOpenSSLConstant:
|
120
|
+
Lint/DeprecatedOpenSSLConstant: # (new in 0.84)
|
133
121
|
Enabled: true
|
134
|
-
|
135
|
-
############################################################
|
136
|
-
# Added in RuboCop 0.85
|
137
|
-
|
138
|
-
Lint/MixedRegexpCaptureTypes:
|
122
|
+
Lint/MixedRegexpCaptureTypes: # (new in 0.85)
|
139
123
|
Enabled: true
|
140
|
-
|
141
|
-
Style/RedundantRegexpEscape:
|
124
|
+
Style/RedundantRegexpCharacterClass: # (new in 0.85)
|
142
125
|
Enabled: true
|
143
|
-
|
144
|
-
Style/RedundantRegexpCharacterClass:
|
126
|
+
Style/RedundantRegexpEscape: # (new in 0.85)
|
145
127
|
Enabled: true
|
146
|
-
|
147
|
-
############################################################
|
148
|
-
# Added in Rubocop 0.86
|
149
|
-
|
150
|
-
Style/RedundantFetchBlock:
|
128
|
+
Style/RedundantFetchBlock: # (new in 0.86)
|
151
129
|
Enabled: true
|
152
|
-
|
153
|
-
############################################################
|
154
|
-
# Added in Rubocop 0.87
|
155
|
-
|
156
|
-
# Sometimes we separate things for a reason
|
157
|
-
Style/AccessorGrouping:
|
158
|
-
Enabled: false
|
159
|
-
|
160
|
-
Style/BisectedAttrAccessor:
|
130
|
+
Lint/DuplicateRegexpCharacterClassElement: # (new in 1.1)
|
161
131
|
Enabled: true
|
162
|
-
|
163
|
-
Style/RedundantAssignment:
|
132
|
+
Lint/EmptyBlock: # (new in 1.1)
|
164
133
|
Enabled: true
|
165
|
-
|
166
|
-
############################################################
|
167
|
-
# Added in Rubocop 0.88
|
168
|
-
|
169
|
-
Lint/DuplicateElsifCondition:
|
134
|
+
Lint/ToEnumArguments: # (new in 1.1)
|
170
135
|
Enabled: true
|
171
|
-
|
172
|
-
Style/ArrayCoercion:
|
136
|
+
Lint/UnmodifiedReduceAccumulator: # (new in 1.1)
|
173
137
|
Enabled: true
|
174
|
-
|
175
|
-
Style/CaseLikeIf:
|
138
|
+
Style/ArgumentsForwarding: # (new in 1.1)
|
176
139
|
Enabled: true
|
177
|
-
|
178
|
-
Style/HashAsLastArrayItem:
|
140
|
+
Style/DocumentDynamicEvalDefinition: # (new in 1.1)
|
179
141
|
Enabled: true
|
180
|
-
|
181
|
-
Style/HashLikeCase:
|
142
|
+
Style/SwapValues: # (new in 1.1)
|
182
143
|
Enabled: true
|
183
|
-
|
184
|
-
Style/RedundantFileExtensionInRequire:
|
144
|
+
Lint/NoReturnInBeginEndBlocks: # (new in 1.2)
|
185
145
|
Enabled: true
|
186
|
-
|
187
|
-
############################################################
|
188
|
-
# Added in Rubocop 0.89
|
189
|
-
|
190
|
-
Lint/BinaryOperatorWithIdenticalOperands:
|
146
|
+
Style/CollectionCompact: # (new in 1.2)
|
191
147
|
Enabled: true
|
192
|
-
|
193
|
-
Lint/DuplicateRescueException:
|
148
|
+
Style/NegatedIfElseCondition: # (new in 1.2)
|
194
149
|
Enabled: true
|
195
|
-
|
196
|
-
Lint/EmptyConditionalBody:
|
150
|
+
Lint/DuplicateBranch: # (new in 1.3)
|
197
151
|
Enabled: true
|
198
|
-
|
199
|
-
Lint/FloatComparison:
|
152
|
+
Lint/EmptyClass: # (new in 1.3)
|
200
153
|
Enabled: true
|
201
|
-
|
202
|
-
Lint/MissingSuper:
|
154
|
+
Style/NilLambda: # (new in 1.3)
|
203
155
|
Enabled: true
|
204
|
-
|
205
|
-
Lint/OutOfRangeRegexpRef:
|
156
|
+
Style/RedundantArgument: # (new in 1.4)
|
206
157
|
Enabled: true
|
207
|
-
|
208
|
-
Lint/SelfAssignment:
|
158
|
+
Lint/UnexpectedBlockArity: # (new in 1.5)
|
209
159
|
Enabled: true
|
210
|
-
|
211
|
-
Lint/TopLevelReturnWithArgument:
|
160
|
+
Layout/SpaceBeforeBrackets: # (new in 1.7)
|
212
161
|
Enabled: true
|
213
|
-
|
214
|
-
Lint/UnreachableLoop:
|
162
|
+
Lint/AmbiguousAssignment: # (new in 1.7)
|
215
163
|
Enabled: true
|
216
|
-
|
217
|
-
Style/ExplicitBlockArgument:
|
164
|
+
Style/HashExcept: # (new in 1.7)
|
218
165
|
Enabled: true
|
219
|
-
|
220
|
-
Style/GlobalStdStream:
|
166
|
+
Lint/DeprecatedConstants: # (new in 1.8)
|
221
167
|
Enabled: true
|
222
|
-
|
223
|
-
Style/OptionalBooleanParameter:
|
168
|
+
Lint/LambdaWithoutLiteralBlock: # (new in 1.8)
|
224
169
|
Enabled: true
|
225
|
-
|
226
|
-
Style/SingleArgumentDig:
|
170
|
+
Lint/RedundantDirGlobSort: # (new in 1.8)
|
227
171
|
Enabled: true
|
228
|
-
|
229
|
-
Style/SoleNestedConditional:
|
172
|
+
Style/EndlessMethod: # (new in 1.8)
|
230
173
|
Enabled: true
|
231
|
-
|
232
|
-
Style/StringConcatenation:
|
174
|
+
Lint/NumberedParameterAssignment: # (new in 1.9)
|
233
175
|
Enabled: true
|
234
|
-
|
235
|
-
############################################################
|
236
|
-
# Added in Rubocop 0.90
|
237
|
-
|
238
|
-
Lint/DuplicateRequire:
|
176
|
+
Lint/OrAssignmentToConstant: # (new in 1.9)
|
239
177
|
Enabled: true
|
240
|
-
|
241
|
-
Lint/EmptyFile:
|
178
|
+
Lint/SymbolConversion: # (new in 1.9)
|
242
179
|
Enabled: true
|
243
|
-
|
244
|
-
Lint/TrailingCommaInAttributeDeclaration:
|
180
|
+
Lint/TripleQuotes: # (new in 1.9)
|
245
181
|
Enabled: true
|
246
|
-
|
247
|
-
Lint/UselessMethodDefinition:
|
182
|
+
Style/IfWithBooleanLiteralBranches: # (new in 1.9)
|
248
183
|
Enabled: true
|
249
|
-
|
250
|
-
Style/CombinableLoops:
|
184
|
+
Gemspec/DateAssignment: # (new in 1.10)
|
251
185
|
Enabled: true
|
252
|
-
|
253
|
-
Style/KeywordParametersOrder:
|
186
|
+
Style/HashConversion: # (new in 1.10)
|
254
187
|
Enabled: true
|
255
|
-
|
256
|
-
Style/RedundantSelfAssignment:
|
188
|
+
Style/StringChars: # (new in 1.12)
|
257
189
|
Enabled: true
|
258
|
-
|
259
|
-
############################################################
|
260
|
-
# Added in Rubocop 0.91
|
261
|
-
|
262
|
-
Layout/BeginEndAlignment:
|
190
|
+
Lint/EmptyInPattern: # (new in 1.16)
|
263
191
|
Enabled: true
|
264
|
-
|
265
|
-
Lint/ConstantDefinitionInBlock:
|
192
|
+
Style/InPatternThen: # (new in 1.16)
|
266
193
|
Enabled: true
|
267
|
-
|
268
|
-
Lint/IdentityComparison:
|
194
|
+
Style/MultilineInPatternThen: # (new in 1.16)
|
269
195
|
Enabled: true
|
270
|
-
|
271
|
-
|
196
|
+
Style/QuotedSymbols: # (new in 1.16)
|
197
|
+
Enabled: true
|
198
|
+
Layout/LineEndStringConcatenationIndentation: # (new in 1.18)
|
199
|
+
Enabled: true
|
200
|
+
Naming/InclusiveLanguage: # (new in 1.18)
|
201
|
+
Enabled: true
|
202
|
+
Lint/AmbiguousRange: # new in 1.19
|
203
|
+
Enabled: true
|
204
|
+
Style/RedundantSelfAssignmentBranch: # new in 1.19
|
205
|
+
Enabled: true
|
206
|
+
Lint/AmbiguousOperatorPrecedence: # new in 1.21
|
207
|
+
Enabled: true
|
208
|
+
Lint/IncompatibleIoSelectWithFiberScheduler: # new in 1.21
|
209
|
+
Enabled: true
|
210
|
+
Lint/RequireRelativeSelfPath: # new in 1.22
|
211
|
+
Enabled: true
|
212
|
+
Security/IoMethods: # new in 1.22
|
272
213
|
Enabled: true
|
214
|
+
Style/NumberedParameters: # new in 1.22
|
215
|
+
Enabled: true
|
216
|
+
Style/NumberedParametersLimit: # new in 1.22
|
217
|
+
Enabled: true
|
218
|
+
Style/SelectByRegexp: # new in 1.22
|
219
|
+
Enabled: true
|
220
|
+
Gemspec/RequireMFA: # new in 1.23
|
221
|
+
Enabled: true
|
222
|
+
Lint/UselessRuby2Keywords: # new in 1.23
|
223
|
+
Enabled: true
|
224
|
+
Style/OpenStructUse: # new in 1.23
|
225
|
+
Enabled: true
|
226
|
+
Naming/BlockForwarding: # new in 1.24
|
227
|
+
Enabled: true
|
228
|
+
Style/FileRead: # new in 1.24
|
229
|
+
Enabled: true
|
230
|
+
Style/FileWrite: # new in 1.24
|
231
|
+
Enabled: true
|
232
|
+
Style/MapToHash: # new in 1.24
|
233
|
+
Enabled: true
|
234
|
+
Style/NestedFileDirname: # new in 1.26
|
235
|
+
Enabled: true
|
236
|
+
|
data/CHANGES.md
CHANGED
@@ -1,3 +1,16 @@
|
|
1
|
+
# 0.2.6.2 (2022-05-25)
|
2
|
+
|
3
|
+
- Fix `NoMethodError` when calling `BerkeleyLibrary::Logging::Loggers.default_logger` before
|
4
|
+
Rails is fully initialized
|
5
|
+
|
6
|
+
# 0.2.6.1 (2022-05-11)
|
7
|
+
|
8
|
+
- Fix `LoadError` on Rails 6.x.
|
9
|
+
|
10
|
+
# 0.2.6 (2022-03-14)
|
11
|
+
|
12
|
+
- Add support for Rails 7.
|
13
|
+
|
1
14
|
# 0.2.5 (2021-11-04)
|
2
15
|
|
3
16
|
- Rails event logs now include a subset of session attributes (`session_id` and `_csrf_token`).
|
@@ -25,7 +25,9 @@ Gem::Specification.new do |spec|
|
|
25
25
|
|
26
26
|
spec.required_ruby_version = ">= #{ruby_version}"
|
27
27
|
|
28
|
-
|
28
|
+
rails_version = '>= 6'
|
29
|
+
|
30
|
+
spec.add_dependency 'activesupport', rails_version
|
29
31
|
spec.add_dependency 'amazing_print', '~> 1.1'
|
30
32
|
spec.add_dependency 'colorize', '~> 0.8.1'
|
31
33
|
spec.add_dependency 'lograge', '~> 0.11'
|
@@ -37,11 +39,14 @@ Gem::Specification.new do |spec|
|
|
37
39
|
spec.add_development_dependency 'dotenv', '~> 2.7'
|
38
40
|
spec.add_development_dependency 'irb', '~> 1.2' # workaroundfor https://github.com/bundler/bundler/issues/6929
|
39
41
|
spec.add_development_dependency 'listen', '>= 3.0.5', '< 3.2'
|
40
|
-
spec.add_development_dependency 'rails',
|
42
|
+
spec.add_development_dependency 'rails', rails_version
|
41
43
|
spec.add_development_dependency 'rake', '~> 13.0'
|
42
44
|
spec.add_development_dependency 'rspec-support', '~> 3.9'
|
43
|
-
spec.add_development_dependency 'rubocop', '~>
|
45
|
+
spec.add_development_dependency 'rubocop', '~> 1.26.0'
|
46
|
+
spec.add_development_dependency 'rubocop-rspec', '~> 2.4.0'
|
44
47
|
spec.add_development_dependency 'simplecov', '~> 0.21.1'
|
45
48
|
spec.add_development_dependency 'simplecov-console', '~> 0.9.1'
|
46
49
|
spec.add_development_dependency 'simplecov-rcov', '~> 0.2'
|
50
|
+
|
51
|
+
spec.metadata['rubygems_mfa_required'] = 'true'
|
47
52
|
end
|
@@ -11,7 +11,7 @@ module BerkeleyLibrary
|
|
11
11
|
return Rails.env if defined?(Rails)
|
12
12
|
|
13
13
|
@env ||= begin
|
14
|
-
#
|
14
|
+
# NOTE: can't just self.env= b/c it returns the wrong value -- see
|
15
15
|
# https://stackoverflow.com/q/65226532/27358
|
16
16
|
env = (ENV['RAILS_ENV'] || ENV['RACK_ENV'] || FALLBACK_ENV)
|
17
17
|
ensure_rails_env_like(env)
|
@@ -1,3 +1,11 @@
|
|
1
|
+
begin
|
2
|
+
# Rails 7.x LoggerThreadSafeLevel needs IsolatedExecutionState,
|
3
|
+
# but doesn't explicitly require it
|
4
|
+
require 'active_support/isolated_execution_state'
|
5
|
+
rescue LoadError
|
6
|
+
# Rails 6.x doesn't
|
7
|
+
end
|
8
|
+
|
1
9
|
require 'active_support/logger'
|
2
10
|
require 'ougai'
|
3
11
|
require 'berkeley_library/logging/tagged_logging_extensions'
|
@@ -9,13 +9,7 @@ module BerkeleyLibrary
|
|
9
9
|
FALLBACK_LOG_DIR = 'log'.freeze
|
10
10
|
|
11
11
|
def default_logger
|
12
|
-
|
13
|
-
return Rails.logger if Rails.logger
|
14
|
-
|
15
|
-
warn('Rails is defined, but Rails logger is nil')
|
16
|
-
end
|
17
|
-
|
18
|
-
new_default_logger
|
12
|
+
rails_logger || new_default_logger
|
19
13
|
end
|
20
14
|
|
21
15
|
# TODO: support passing a hash / passing default_log_file
|
@@ -38,6 +32,13 @@ module BerkeleyLibrary
|
|
38
32
|
|
39
33
|
private
|
40
34
|
|
35
|
+
def rails_logger
|
36
|
+
return unless defined?(Rails)
|
37
|
+
return unless Rails.respond_to?(:logger)
|
38
|
+
|
39
|
+
Rails.logger
|
40
|
+
end
|
41
|
+
|
41
42
|
def new_broadcast_logger(config)
|
42
43
|
new_json_logger($stdout).tap do |json_logger|
|
43
44
|
file_logger = rails_file_logger(config)
|
@@ -68,7 +69,7 @@ module BerkeleyLibrary
|
|
68
69
|
end
|
69
70
|
|
70
71
|
def workdir
|
71
|
-
return Rails.application.root if defined?(Rails)
|
72
|
+
return Rails.application.root if defined?(Rails) && Rails.respond_to?(:application)
|
72
73
|
|
73
74
|
Pathname.getwd
|
74
75
|
end
|
@@ -7,7 +7,7 @@ module BerkeleyLibrary
|
|
7
7
|
SUMMARY = 'Opinionated Ruby/Rails logging for UC Berkeley Library'.freeze
|
8
8
|
DESCRIPTION = 'A gem providing shared logging code for UC Berkeley Library gems and Rails applications'.freeze
|
9
9
|
LICENSE = 'MIT'.freeze
|
10
|
-
VERSION = '0.2.
|
10
|
+
VERSION = '0.2.6.2'.freeze
|
11
11
|
HOMEPAGE = 'https://github.com/BerkeleyLibrary/logging'.freeze
|
12
12
|
|
13
13
|
private_class_method :new
|
data/spec/.rubocop.yml
CHANGED
@@ -1,15 +1,18 @@
|
|
1
1
|
inherit_from: ../.rubocop.yml
|
2
2
|
|
3
|
+
require:
|
4
|
+
- rubocop-rspec
|
5
|
+
|
3
6
|
Style/ClassAndModuleChildren:
|
4
7
|
Enabled: false
|
5
8
|
|
6
|
-
|
9
|
+
Style/OpenStructUse:
|
7
10
|
Enabled: false
|
8
11
|
|
9
|
-
Metrics/
|
12
|
+
Metrics/AbcSize:
|
10
13
|
Enabled: false
|
11
14
|
|
12
|
-
Metrics/
|
15
|
+
Metrics/BlockLength:
|
13
16
|
Enabled: false
|
14
17
|
|
15
18
|
Metrics/ModuleLength:
|
@@ -19,9 +22,87 @@ Metrics/MethodLength:
|
|
19
22
|
Enabled: false
|
20
23
|
|
21
24
|
############################################################
|
22
|
-
#
|
25
|
+
# rubocop-rspec
|
26
|
+
|
27
|
+
# believe me, it wasn't by choice
|
28
|
+
RSpec/AnyInstance:
|
29
|
+
Enabled: false
|
30
|
+
|
31
|
+
# we meant to do that
|
32
|
+
RSpec/BeforeAfterAll:
|
33
|
+
Enabled: false
|
34
|
+
|
35
|
+
# more words != more readable
|
36
|
+
RSpec/ContextWording:
|
37
|
+
Enabled: false
|
38
|
+
|
39
|
+
# explicit >>> implicit
|
40
|
+
RSpec/DescribedClass:
|
41
|
+
Enabled: false
|
42
|
+
|
43
|
+
# more punctuation != more readable
|
44
|
+
RSpec/DescribeSymbol:
|
45
|
+
Enabled: false
|
46
|
+
|
47
|
+
# too late now
|
48
|
+
RSpec/ExampleLength:
|
49
|
+
Enabled: false
|
50
|
+
|
51
|
+
# we meant to do that
|
52
|
+
RSpec/ExpectInHook:
|
53
|
+
Enabled: false
|
54
|
+
|
55
|
+
# if only it were that simple
|
56
|
+
RSpec/ExpectOutput:
|
57
|
+
Enabled: false
|
58
|
+
|
59
|
+
# your naming scheme is not in possession of all the facts
|
60
|
+
RSpec/FilePath:
|
61
|
+
Enabled: false
|
23
62
|
|
24
|
-
#
|
25
|
-
|
63
|
+
# explicit >>> implicit
|
64
|
+
RSpec/InstanceVariable:
|
26
65
|
Enabled: false
|
27
|
-
|
66
|
+
|
67
|
+
# maybe when 'all' has a corresponding 'none' matcher
|
68
|
+
RSpec/IteratedExpectation:
|
69
|
+
Enabled: false
|
70
|
+
|
71
|
+
# TODO: clean these up & de-disable this
|
72
|
+
RSpec/LeakyConstantDeclaration:
|
73
|
+
Enabled: false
|
74
|
+
|
75
|
+
# too late now
|
76
|
+
RSpec/MultipleMemoizedHelpers:
|
77
|
+
Enabled: false
|
78
|
+
|
79
|
+
# setup cost / time >>> failure granularity
|
80
|
+
RSpec/MultipleExpectations:
|
81
|
+
Enabled: false
|
82
|
+
|
83
|
+
# cure is worse than the disease
|
84
|
+
RSpec/NestedGroups:
|
85
|
+
Enabled: false
|
86
|
+
|
87
|
+
# more quotation marks != more readable
|
88
|
+
RSpec/SharedExamples:
|
89
|
+
Enabled: false
|
90
|
+
|
91
|
+
# we meant to do that
|
92
|
+
RSpec/StubbedMock:
|
93
|
+
Enabled: false
|
94
|
+
|
95
|
+
# we meant to do that
|
96
|
+
RSpec/VerifiedDoubles:
|
97
|
+
Enabled: false
|
98
|
+
|
99
|
+
############################################################
|
100
|
+
# rubocop-rspec
|
101
|
+
|
102
|
+
# enable newer rubocop-rspec cops
|
103
|
+
|
104
|
+
RSpec/IdenticalEqualityAssertion: # new in 2.4
|
105
|
+
Enabled: true
|
106
|
+
|
107
|
+
RSpec/Rails/AvoidSetupHook: # new in 2.4
|
108
|
+
Enabled: true
|
@@ -10,7 +10,7 @@ module BerkeleyLibrary
|
|
10
10
|
|
11
11
|
attr_reader :config
|
12
12
|
|
13
|
-
before
|
13
|
+
before do
|
14
14
|
app = Class.new(Rails::Application).new
|
15
15
|
allow(Rails).to receive(:application).and_return(app)
|
16
16
|
@config = app.config
|
@@ -75,7 +75,7 @@ module BerkeleyLibrary
|
|
75
75
|
|
76
76
|
attr_reader :session, :request, :payload, :event
|
77
77
|
|
78
|
-
before
|
78
|
+
before do
|
79
79
|
@session = instance_double(ActionDispatch::Request::Session)
|
80
80
|
allow(session).to receive(:to_hash).and_return(session_hash)
|
81
81
|
|
@@ -9,7 +9,7 @@ module BerkeleyLibrary
|
|
9
9
|
describe :new_json_formatter do
|
10
10
|
attr_reader :out, :logger
|
11
11
|
|
12
|
-
before
|
12
|
+
before do
|
13
13
|
@out = StringIO.new
|
14
14
|
@logger = Logger.new(out)
|
15
15
|
logger.formatter = Formatters.new_json_formatter
|
@@ -68,6 +68,7 @@ module BerkeleyLibrary
|
|
68
68
|
expect(additional_data['more_strings']).to eq([expected_string, expected_string])
|
69
69
|
end
|
70
70
|
|
71
|
+
# rubocop:disable Layout/LineLength
|
71
72
|
it 'removes ANSI formatting from ActiveRecord logs' do
|
72
73
|
original = " \e[1m\e[36mLendingItem Load (2.0ms)\e[0m \e[1m\e[34mSELECT \"lending_items\".* FROM \"lending_items\" WHERE \"lending_items\".\"directory\" = $1 LIMIT $2\e[0m [[\"directory\", \"b135297126_C068087930\"], [\"LIMIT\", 1]]"
|
73
74
|
expected = ' LendingItem Load (2.0ms) SELECT "lending_items".* FROM "lending_items" WHERE "lending_items"."directory" = $1 LIMIT $2 [["directory", "b135297126_C068087930"], ["LIMIT", 1]]'
|
@@ -76,6 +77,7 @@ module BerkeleyLibrary
|
|
76
77
|
msg = logged_json['msg']
|
77
78
|
expect(msg).to eq(expected)
|
78
79
|
end
|
80
|
+
# rubocop:enable Layout/LineLength
|
79
81
|
end
|
80
82
|
|
81
83
|
describe :ensure_hash do
|
@@ -6,11 +6,11 @@ module BerkeleyLibrary
|
|
6
6
|
describe Loggers do
|
7
7
|
attr_reader :orig_rails_env
|
8
8
|
|
9
|
-
before
|
9
|
+
before do
|
10
10
|
@orig_rails_env = Rails.env
|
11
11
|
end
|
12
12
|
|
13
|
-
after
|
13
|
+
after do
|
14
14
|
Rails.env = orig_rails_env
|
15
15
|
end
|
16
16
|
|
@@ -46,8 +46,9 @@ module BerkeleyLibrary
|
|
46
46
|
end
|
47
47
|
|
48
48
|
describe :default_logger do
|
49
|
-
before
|
50
|
-
|
49
|
+
before { @rails_logger = Rails.logger }
|
50
|
+
|
51
|
+
after { Rails.logger = @rails_logger }
|
51
52
|
|
52
53
|
it 'returns the Rails logger' do
|
53
54
|
expected_logger = double(::Logger)
|
@@ -86,7 +87,7 @@ module BerkeleyLibrary
|
|
86
87
|
describe :new_default_logger do
|
87
88
|
attr_reader :config
|
88
89
|
|
89
|
-
before
|
90
|
+
before do
|
90
91
|
app = Class.new(Rails::Application).new
|
91
92
|
@config = app.config
|
92
93
|
end
|
@@ -6,7 +6,7 @@ module BerkeleyLibrary
|
|
6
6
|
attr_reader :app
|
7
7
|
attr_reader :config
|
8
8
|
|
9
|
-
before
|
9
|
+
before do
|
10
10
|
@app = Class.new(Rails::Application).new
|
11
11
|
allow(Rails).to receive(:application).and_return(app)
|
12
12
|
@config = app.config
|
@@ -16,7 +16,7 @@ module BerkeleyLibrary
|
|
16
16
|
attr_reader :logging_initializer
|
17
17
|
attr_reader :bootstrap_logger_initializer
|
18
18
|
|
19
|
-
before
|
19
|
+
before do
|
20
20
|
expected_file, _line = Module.const_source_location(BerkeleyLibrary::Logging::Railtie.name)
|
21
21
|
@logging_initializer = app.initializers.find do |init|
|
22
22
|
block = init.block
|
@@ -25,7 +25,7 @@ module BerkeleyLibrary
|
|
25
25
|
mock_logger_class.new
|
26
26
|
end
|
27
27
|
|
28
|
-
before
|
28
|
+
before do
|
29
29
|
@rails_logger_orig = Rails.logger
|
30
30
|
Rails.logger = new_mock_logger
|
31
31
|
|
@@ -35,7 +35,7 @@ module BerkeleyLibrary
|
|
35
35
|
end
|
36
36
|
end
|
37
37
|
|
38
|
-
after
|
38
|
+
after do
|
39
39
|
@logger_was_defined ? reset_logger! : undefine_logger!
|
40
40
|
Rails.logger = @rails_logger_orig
|
41
41
|
end
|
@@ -74,7 +74,7 @@ module BerkeleyLibrary
|
|
74
74
|
describe 'included' do
|
75
75
|
attr_reader :logificator
|
76
76
|
|
77
|
-
before
|
77
|
+
before do
|
78
78
|
@logificator = Object.new
|
79
79
|
@logificator.singleton_class.include(Logging)
|
80
80
|
end
|
data/spec/spec_helper.rb
CHANGED
@@ -8,7 +8,7 @@ if ENV['COVERAGE']
|
|
8
8
|
spec_group_re = %r{(?<=^#{spec_root}/)[^/]+(?=/)}
|
9
9
|
|
10
10
|
RSpec.configure do |config|
|
11
|
-
config.before
|
11
|
+
config.before do |example|
|
12
12
|
abs_path = File.realpath(example.metadata[:absolute_file_path])
|
13
13
|
match_data = spec_group_re.match(abs_path)
|
14
14
|
raise ArgumentError, "Unable to determine group for example at #{abs_path}" unless match_data
|
@@ -8,7 +8,7 @@ module BerkeleyLibrary
|
|
8
8
|
describe :configure! do
|
9
9
|
attr_reader :config
|
10
10
|
|
11
|
-
before
|
11
|
+
before do
|
12
12
|
@stdout_orig = $stdout
|
13
13
|
$stdout = StringIO.new
|
14
14
|
|
@@ -16,7 +16,7 @@ module BerkeleyLibrary
|
|
16
16
|
config.lograge = Lograge::OrderedOptions.new
|
17
17
|
end
|
18
18
|
|
19
|
-
after
|
19
|
+
after do
|
20
20
|
$stdout = @stdout_orig
|
21
21
|
end
|
22
22
|
|
@@ -9,7 +9,7 @@ module BerkeleyLibrary
|
|
9
9
|
describe :new_json_formatter do
|
10
10
|
attr_reader :out, :logger
|
11
11
|
|
12
|
-
before
|
12
|
+
before do
|
13
13
|
@out = StringIO.new
|
14
14
|
@logger = Logger.new(out)
|
15
15
|
logger.formatter = Formatters.new_json_formatter
|
@@ -66,6 +66,7 @@ module BerkeleyLibrary
|
|
66
66
|
expect(additional_data['more_strings']).to eq([expected_string, expected_string])
|
67
67
|
end
|
68
68
|
|
69
|
+
# rubocop:disable Layout/LineLength
|
69
70
|
it 'removes ANSI formatting from ActiveRecord logs' do
|
70
71
|
original = " \e[1m\e[36mLendingItem Load (2.0ms)\e[0m \e[1m\e[34mSELECT \"lending_items\".* FROM \"lending_items\" WHERE \"lending_items\".\"directory\" = $1 LIMIT $2\e[0m [[\"directory\", \"b135297126_C068087930\"], [\"LIMIT\", 1]]"
|
71
72
|
expected = ' LendingItem Load (2.0ms) SELECT "lending_items".* FROM "lending_items" WHERE "lending_items"."directory" = $1 LIMIT $2 [["directory", "b135297126_C068087930"], ["LIMIT", 1]]'
|
@@ -74,6 +75,7 @@ module BerkeleyLibrary
|
|
74
75
|
msg = logged_json['msg']
|
75
76
|
expect(msg).to eq(expected)
|
76
77
|
end
|
78
|
+
# rubocop:enable Layout/LineLength
|
77
79
|
end
|
78
80
|
|
79
81
|
describe :ensure_hash do
|
@@ -8,7 +8,7 @@ module BerkeleyLibrary
|
|
8
8
|
attr_reader :out
|
9
9
|
|
10
10
|
# rubocop:disable Lint/ConstantDefinitionInBlock
|
11
|
-
before
|
11
|
+
before do
|
12
12
|
@out = StringIO.new
|
13
13
|
class ::TestError < StandardError
|
14
14
|
attr_writer :cause
|
@@ -20,7 +20,7 @@ module BerkeleyLibrary
|
|
20
20
|
end
|
21
21
|
# rubocop:enable Lint/ConstantDefinitionInBlock
|
22
22
|
|
23
|
-
after
|
23
|
+
after do
|
24
24
|
Object.send(:remove_const, :TestError)
|
25
25
|
end
|
26
26
|
|
@@ -39,7 +39,6 @@ module BerkeleyLibrary
|
|
39
39
|
describe :new_json_logger do
|
40
40
|
|
41
41
|
# TODO: rewrite this as a matcher
|
42
|
-
# rubocop:disable Metrics/AbcSize
|
43
42
|
def assert_serialized_error(err_json, err)
|
44
43
|
expect(err_json).to be_a(Hash)
|
45
44
|
expect(err_json['name']).to eq(TestError.name)
|
@@ -52,8 +51,6 @@ module BerkeleyLibrary
|
|
52
51
|
expect(err_stack).to include(line)
|
53
52
|
end
|
54
53
|
end
|
55
|
-
# rubocop:enable Metrics/AbcSize
|
56
|
-
|
57
54
|
it 'supports tagged logging' do
|
58
55
|
logger = Loggers.new_json_logger(out)
|
59
56
|
logger = ActiveSupport::TaggedLogging.new(logger)
|
@@ -329,11 +326,11 @@ module BerkeleyLibrary
|
|
329
326
|
describe :new_default_logger do
|
330
327
|
attr_reader :config
|
331
328
|
|
332
|
-
before
|
329
|
+
before do
|
333
330
|
@config = OpenStruct.new
|
334
331
|
end
|
335
332
|
|
336
|
-
after
|
333
|
+
after do
|
337
334
|
BerkeleyLibrary::Logging.instance_variable_set(:@env, nil)
|
338
335
|
end
|
339
336
|
|
@@ -82,7 +82,7 @@ module BerkeleyLibrary
|
|
82
82
|
|
83
83
|
context 'exceptions' do
|
84
84
|
# rubocop:disable Lint/ConstantDefinitionInBlock
|
85
|
-
before
|
85
|
+
before do
|
86
86
|
class ::TestError < StandardError
|
87
87
|
attr_writer :cause
|
88
88
|
|
@@ -93,7 +93,7 @@ module BerkeleyLibrary
|
|
93
93
|
end
|
94
94
|
# rubocop:enable Lint/ConstantDefinitionInBlock
|
95
95
|
|
96
|
-
after
|
96
|
+
after do
|
97
97
|
Object.send(:remove_const, :TestError)
|
98
98
|
end
|
99
99
|
|
@@ -25,7 +25,7 @@ module BerkeleyLibrary
|
|
25
25
|
mock_logger_class.new
|
26
26
|
end
|
27
27
|
|
28
|
-
before
|
28
|
+
before do
|
29
29
|
if (@logger_was_defined = logger_defined?)
|
30
30
|
@logging_logger_orig = Logging.instance_variable_get(:@logger)
|
31
31
|
undefine_logger!
|
@@ -37,7 +37,7 @@ module BerkeleyLibrary
|
|
37
37
|
allow(Logging::Loggers).to receive(:default_logger).and_return(persistent_default_logger)
|
38
38
|
end
|
39
39
|
|
40
|
-
after
|
40
|
+
after do
|
41
41
|
@logger_was_defined ? reset_logger! : undefine_logger!
|
42
42
|
end
|
43
43
|
|
@@ -75,7 +75,7 @@ module BerkeleyLibrary
|
|
75
75
|
describe 'included' do
|
76
76
|
attr_reader :logificator
|
77
77
|
|
78
|
-
before
|
78
|
+
before do
|
79
79
|
@logificator = Object.new
|
80
80
|
@logificator.singleton_class.include(Logging)
|
81
81
|
end
|
data/spec/standalone_helper.rb
CHANGED
metadata
CHANGED
@@ -1,29 +1,29 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: berkeley_library-logging
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.
|
4
|
+
version: 0.2.6.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- David Moles
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2022-05-25 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activesupport
|
15
15
|
requirement: !ruby/object:Gem::Requirement
|
16
16
|
requirements:
|
17
|
-
- - "
|
17
|
+
- - ">="
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version: '6
|
19
|
+
version: '6'
|
20
20
|
type: :runtime
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
|
-
- - "
|
24
|
+
- - ">="
|
25
25
|
- !ruby/object:Gem::Version
|
26
|
-
version: '6
|
26
|
+
version: '6'
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: amazing_print
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
@@ -174,16 +174,16 @@ dependencies:
|
|
174
174
|
name: rails
|
175
175
|
requirement: !ruby/object:Gem::Requirement
|
176
176
|
requirements:
|
177
|
-
- - "
|
177
|
+
- - ">="
|
178
178
|
- !ruby/object:Gem::Version
|
179
|
-
version: '6
|
179
|
+
version: '6'
|
180
180
|
type: :development
|
181
181
|
prerelease: false
|
182
182
|
version_requirements: !ruby/object:Gem::Requirement
|
183
183
|
requirements:
|
184
|
-
- - "
|
184
|
+
- - ">="
|
185
185
|
- !ruby/object:Gem::Version
|
186
|
-
version: '6
|
186
|
+
version: '6'
|
187
187
|
- !ruby/object:Gem::Dependency
|
188
188
|
name: rake
|
189
189
|
requirement: !ruby/object:Gem::Requirement
|
@@ -218,14 +218,28 @@ dependencies:
|
|
218
218
|
requirements:
|
219
219
|
- - "~>"
|
220
220
|
- !ruby/object:Gem::Version
|
221
|
-
version:
|
221
|
+
version: 1.26.0
|
222
|
+
type: :development
|
223
|
+
prerelease: false
|
224
|
+
version_requirements: !ruby/object:Gem::Requirement
|
225
|
+
requirements:
|
226
|
+
- - "~>"
|
227
|
+
- !ruby/object:Gem::Version
|
228
|
+
version: 1.26.0
|
229
|
+
- !ruby/object:Gem::Dependency
|
230
|
+
name: rubocop-rspec
|
231
|
+
requirement: !ruby/object:Gem::Requirement
|
232
|
+
requirements:
|
233
|
+
- - "~>"
|
234
|
+
- !ruby/object:Gem::Version
|
235
|
+
version: 2.4.0
|
222
236
|
type: :development
|
223
237
|
prerelease: false
|
224
238
|
version_requirements: !ruby/object:Gem::Requirement
|
225
239
|
requirements:
|
226
240
|
- - "~>"
|
227
241
|
- !ruby/object:Gem::Version
|
228
|
-
version:
|
242
|
+
version: 2.4.0
|
229
243
|
- !ruby/object:Gem::Dependency
|
230
244
|
name: simplecov
|
231
245
|
requirement: !ruby/object:Gem::Requirement
|
@@ -330,7 +344,8 @@ files:
|
|
330
344
|
homepage: https://github.com/BerkeleyLibrary/logging
|
331
345
|
licenses:
|
332
346
|
- MIT
|
333
|
-
metadata:
|
347
|
+
metadata:
|
348
|
+
rubygems_mfa_required: 'true'
|
334
349
|
post_install_message:
|
335
350
|
rdoc_options: []
|
336
351
|
require_paths:
|
@@ -346,7 +361,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
346
361
|
- !ruby/object:Gem::Version
|
347
362
|
version: '0'
|
348
363
|
requirements: []
|
349
|
-
rubygems_version: 3.1.
|
364
|
+
rubygems_version: 3.1.6
|
350
365
|
signing_key:
|
351
366
|
specification_version: 4
|
352
367
|
summary: Opinionated Ruby/Rails logging for UC Berkeley Library
|