active_model_logger 0.2.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 +7 -0
- data/.rubocop.yml +44 -0
- data/CHANGELOG.md +7 -0
- data/CODE_OF_CONDUCT.md +55 -0
- data/LICENSE.txt +21 -0
- data/README.md +1215 -0
- data/Rakefile +12 -0
- data/examples/basic_usage.rb +142 -0
- data/examples/log_block_demo.rb +487 -0
- data/examples/stdout_logging_demo.rb +35 -0
- data/identifier.sqlite +0 -0
- data/lib/active_model_logger/block_logger.rb +133 -0
- data/lib/active_model_logger/generators/active_model_logger/install_generator.rb +30 -0
- data/lib/active_model_logger/generators/active_model_logger/templates/README +33 -0
- data/lib/active_model_logger/generators/active_model_logger/templates/create_active_model_logs.rb +34 -0
- data/lib/active_model_logger/json_query_helpers.rb +103 -0
- data/lib/active_model_logger/log.rb +86 -0
- data/lib/active_model_logger/loggable.rb +380 -0
- data/lib/active_model_logger/loggable_helpers.rb +78 -0
- data/lib/active_model_logger/railtie.rb +14 -0
- data/lib/active_model_logger/version.rb +5 -0
- data/lib/active_model_logger.rb +17 -0
- data/sig/ActiveModelLogger.rbs +4 -0
- metadata +211 -0
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: 0bb1355057a9ecf245973c917a48719699330f6457e9bf62f3bed9d1b7bb529d
|
4
|
+
data.tar.gz: 6f5eea88ec0fa2a4c37aa090d25e9f86aa787b34a74fa6ae30893d4ce7c654ef
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: 824e97db16dc5119651362a5c1e59586514545288b82aa6518c1a1e4b768ab860748e872c5107706df1c4f5f3d6b3e0abbd105ab3985ad68cd200062abe74f65
|
7
|
+
data.tar.gz: 7930d419cbb5d4142400653fa92db7474cd28248225aa26fd544a975f91c75546c547f712a0f114580fab03d1ac0e44866dda6570d02f190dc895e9cceaec4e3
|
data/.rubocop.yml
ADDED
@@ -0,0 +1,44 @@
|
|
1
|
+
require:
|
2
|
+
- rubocop-minitest
|
3
|
+
|
4
|
+
AllCops:
|
5
|
+
TargetRubyVersion: 3.3
|
6
|
+
SuggestExtensions: false
|
7
|
+
NewCops: enable
|
8
|
+
Exclude:
|
9
|
+
- 'lib/active_model_logger/generators/**/*.rb'
|
10
|
+
- 'db/migrate/**/*.rb'
|
11
|
+
- 'test/**/*.rb'
|
12
|
+
|
13
|
+
Style/Documentation:
|
14
|
+
Enabled: false
|
15
|
+
|
16
|
+
Style/FrozenStringLiteralComment:
|
17
|
+
Enabled: true
|
18
|
+
|
19
|
+
Style/StringLiterals:
|
20
|
+
EnforcedStyle: double_quotes
|
21
|
+
|
22
|
+
Style/TrailingCommaInArrayLiteral:
|
23
|
+
EnforcedStyleForMultiline: comma
|
24
|
+
|
25
|
+
Style/TrailingCommaInHashLiteral:
|
26
|
+
EnforcedStyleForMultiline: comma
|
27
|
+
|
28
|
+
Layout/LineLength:
|
29
|
+
Max: 125
|
30
|
+
|
31
|
+
Metrics/MethodLength:
|
32
|
+
Max: 30
|
33
|
+
|
34
|
+
Metrics/AbcSize:
|
35
|
+
Max: 25
|
36
|
+
|
37
|
+
Metrics/ModuleLength:
|
38
|
+
Max: 220
|
39
|
+
|
40
|
+
Metrics/BlockLength:
|
41
|
+
Max: 200
|
42
|
+
|
43
|
+
Metrics/CyclomaticComplexity:
|
44
|
+
Max: 10
|
data/CHANGELOG.md
ADDED
data/CODE_OF_CONDUCT.md
ADDED
@@ -0,0 +1,55 @@
|
|
1
|
+
# Code of Conduct
|
2
|
+
|
3
|
+
## Focus on the Work
|
4
|
+
Keep everything strictly about the gem, its code, and its future development. All other topics are not permitted.
|
5
|
+
|
6
|
+
## Basic Rules
|
7
|
+
|
8
|
+
* **Be professional.** Treat others as you would want to be treated in a workplace.
|
9
|
+
* **Stay on topic.** This is about the ActiveModelLogger gem, not politics, personal issues, or unrelated topics.
|
10
|
+
* **Don't be a jerk.** No trolling, personal attacks, or deliberately disruptive behavior.
|
11
|
+
* **Keep it technical.** Focus on code quality, performance, and functionality.
|
12
|
+
* **Don't be afraid of criticism.** Be open and consider any suggestions or criticism.
|
13
|
+
|
14
|
+
## Disagreements (Not Arguments)
|
15
|
+
|
16
|
+
### How to Disagree
|
17
|
+
* State your position clearly and respectfully
|
18
|
+
* Focus on technical merits, not personal preferences
|
19
|
+
* Provide evidence and examples to support your position
|
20
|
+
* Accept that your opinion may not win out. That's OK (see Resolving Disagreements below).
|
21
|
+
|
22
|
+
### When Disagreements Become Arguments
|
23
|
+
Disagreements become arguments when:
|
24
|
+
* The discussion goes on after a reasonable amount of back and forth
|
25
|
+
* Participants are repeating themselves (even if politely)
|
26
|
+
* You start feeling angry or upset. Take a break and come back later.
|
27
|
+
|
28
|
+
## Resolving Disagreements
|
29
|
+
|
30
|
+
The maintainers have the final say on which solutions will be chosen. When a decision is made, we expect everyone to back it. However, there will be a future moment when the chosen decision proves itself to be a good one, or a bad one, or in between. However it lands, we should:
|
31
|
+
|
32
|
+
* Acknowledge when we were wrong
|
33
|
+
* Acknowledge when others were right
|
34
|
+
* Such acknowledgments are the responsibility of those who were involved in the disagreement.
|
35
|
+
* You do not have a special right to any acknowledgment that your position was correct, and you are not required to
|
36
|
+
acknowledge when someone else was correct. But, it's a really good idea since it allows contributors to feel OK
|
37
|
+
about not getting their way if at some point in the future, if they turned out to be right, others will humbly state
|
38
|
+
this. It's OK to be right and it's OK to be wrong. Both are eventually going to happen to anyone who contributes.
|
39
|
+
|
40
|
+
## Grace
|
41
|
+
|
42
|
+
Everyone has a bad day. Everyone will make mistakes. At some point, you will find yourself offended by something someone said. Show grace. This helps our community as none of us are immune to mistakes or offending someone.
|
43
|
+
|
44
|
+
## Enforcement
|
45
|
+
When the community suggests that you may have stepped over the line, carefully consider any constructive criticism offered. Make adjustments if you find value in the suggestions. When the maintainers step in, they will handle it with any of the following depending on the offense.
|
46
|
+
|
47
|
+
* **First offense:** Warning
|
48
|
+
* **Second offense:** Temporary ban
|
49
|
+
* **Third offense:** Permanent ban
|
50
|
+
|
51
|
+
The maintainers will handle violations as they see fit. They are the final judges in all matters related to this gem. If you appeal their decision, handle it as you would any disagreement. That is, avoid turning it into an argument. Maintainers are subject to the same rules as contributors.
|
52
|
+
|
53
|
+
## Scope
|
54
|
+
|
55
|
+
This applies to all project spaces: issues, pull requests, discussions, and any other communication related to the ActiveModelLogger gem.
|
data/LICENSE.txt
ADDED
@@ -0,0 +1,21 @@
|
|
1
|
+
The MIT License (MIT)
|
2
|
+
|
3
|
+
Copyright (c) 2025 Eric Slick
|
4
|
+
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
7
|
+
in the Software without restriction, including without limitation the rights
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
10
|
+
furnished to do so, subject to the following conditions:
|
11
|
+
|
12
|
+
The above copyright notice and this permission notice shall be included in
|
13
|
+
all copies or substantial portions of the Software.
|
14
|
+
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
21
|
+
THE SOFTWARE.
|