mongory 0.3.0
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/.rspec +3 -0
- data/.rubocop.yml +84 -0
- data/.yardopts +7 -0
- data/CHANGELOG.md +246 -0
- data/CODE_OF_CONDUCT.md +84 -0
- data/LICENSE.txt +21 -0
- data/README.md +517 -0
- data/Rakefile +12 -0
- data/examples/README.md +41 -0
- data/examples/benchmark.rb +44 -0
- data/lib/generators/mongory/install/install_generator.rb +42 -0
- data/lib/generators/mongory/install/templates/initializer.rb.erb +83 -0
- data/lib/generators/mongory/matcher/matcher_generator.rb +56 -0
- data/lib/generators/mongory/matcher/templates/matcher.rb.erb +92 -0
- data/lib/generators/mongory/matcher/templates/matcher_spec.rb.erb +17 -0
- data/lib/mongory/converters/abstract_converter.rb +122 -0
- data/lib/mongory/converters/condition_converter.rb +74 -0
- data/lib/mongory/converters/data_converter.rb +26 -0
- data/lib/mongory/converters/key_converter.rb +63 -0
- data/lib/mongory/converters/value_converter.rb +47 -0
- data/lib/mongory/converters.rb +7 -0
- data/lib/mongory/matchers/README.md +57 -0
- data/lib/mongory/matchers/abstract_matcher.rb +153 -0
- data/lib/mongory/matchers/abstract_multi_matcher.rb +109 -0
- data/lib/mongory/matchers/abstract_operator_matcher.rb +46 -0
- data/lib/mongory/matchers/and_matcher.rb +65 -0
- data/lib/mongory/matchers/array_record_matcher.rb +88 -0
- data/lib/mongory/matchers/elem_match_matcher.rb +47 -0
- data/lib/mongory/matchers/eq_matcher.rb +37 -0
- data/lib/mongory/matchers/every_matcher.rb +41 -0
- data/lib/mongory/matchers/exists_matcher.rb +48 -0
- data/lib/mongory/matchers/field_matcher.rb +123 -0
- data/lib/mongory/matchers/gt_matcher.rb +29 -0
- data/lib/mongory/matchers/gte_matcher.rb +29 -0
- data/lib/mongory/matchers/hash_condition_matcher.rb +55 -0
- data/lib/mongory/matchers/in_matcher.rb +52 -0
- data/lib/mongory/matchers/literal_matcher.rb +123 -0
- data/lib/mongory/matchers/lt_matcher.rb +29 -0
- data/lib/mongory/matchers/lte_matcher.rb +29 -0
- data/lib/mongory/matchers/ne_matcher.rb +29 -0
- data/lib/mongory/matchers/nin_matcher.rb +51 -0
- data/lib/mongory/matchers/not_matcher.rb +32 -0
- data/lib/mongory/matchers/or_matcher.rb +60 -0
- data/lib/mongory/matchers/present_matcher.rb +52 -0
- data/lib/mongory/matchers/regex_matcher.rb +61 -0
- data/lib/mongory/matchers.rb +176 -0
- data/lib/mongory/mongoid.rb +19 -0
- data/lib/mongory/query_builder.rb +187 -0
- data/lib/mongory/query_matcher.rb +66 -0
- data/lib/mongory/query_operator.rb +28 -0
- data/lib/mongory/rails.rb +15 -0
- data/lib/mongory/utils/debugger.rb +123 -0
- data/lib/mongory/utils/rails_patch.rb +22 -0
- data/lib/mongory/utils/singleton_builder.rb +31 -0
- data/lib/mongory/utils.rb +75 -0
- data/lib/mongory/version.rb +5 -0
- data/lib/mongory-rb.rb +3 -0
- data/lib/mongory.rb +116 -0
- data/mongory.gemspec +40 -0
- data/sig/mongory.rbs +4 -0
- metadata +108 -0
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: 76d9dbc1cf7704258a68da00e955a295c66d6f0c53b1bcfa8becf505315daa14
|
4
|
+
data.tar.gz: 6492e6f3371fc402153abc0bb0368490a15f88f483ccdfce0912dc2249d9efe5
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: 9a8139f2288b78943b1e4d0f68433d8383d359877bef277dd760e2dc08486fedf3ebccb8d914a243e0f836ff61f7d307d00df8dbd5187e260b57f3cc7eadc0d0
|
7
|
+
data.tar.gz: 6317bad45fcc0ceb4d5b96316319090b6ca72e75db3ae34fd77fd799c8e1d4324d0cbb5a06b413eab2a74c89ca6494e4fc26b4ac082bfc2a2720bad373eb86b4
|
data/.rspec
ADDED
data/.rubocop.yml
ADDED
@@ -0,0 +1,84 @@
|
|
1
|
+
AllCops:
|
2
|
+
NewCops: enable
|
3
|
+
Exclude:
|
4
|
+
- 'pre_release/**/*'
|
5
|
+
- 'vendor/**/*'
|
6
|
+
- 'node_modules/**/*'
|
7
|
+
- 'tmp/**/*'
|
8
|
+
TargetRubyVersion: 2.6
|
9
|
+
|
10
|
+
Style/StringLiterals:
|
11
|
+
Enabled: true
|
12
|
+
EnforcedStyle: single_quotes
|
13
|
+
|
14
|
+
Style/StringLiteralsInInterpolation:
|
15
|
+
Enabled: true
|
16
|
+
EnforcedStyle: single_quotes
|
17
|
+
|
18
|
+
Layout/LineLength:
|
19
|
+
Max: 120
|
20
|
+
|
21
|
+
Style/PercentLiteralDelimiters:
|
22
|
+
PreferredDelimiters:
|
23
|
+
default: '()'
|
24
|
+
'%i': '()'
|
25
|
+
'%w': '()'
|
26
|
+
|
27
|
+
Metrics/ClassLength:
|
28
|
+
Enabled: false
|
29
|
+
|
30
|
+
Metrics/MethodLength:
|
31
|
+
Enabled: false
|
32
|
+
|
33
|
+
Metrics/BlockLength:
|
34
|
+
Enabled: false
|
35
|
+
|
36
|
+
Metrics/CyclomaticComplexity:
|
37
|
+
Enabled: false
|
38
|
+
|
39
|
+
Metrics/PerceivedComplexity:
|
40
|
+
Enabled: false
|
41
|
+
|
42
|
+
Style/Alias:
|
43
|
+
EnforcedStyle: prefer_alias_method
|
44
|
+
|
45
|
+
Lint/MissingSuper:
|
46
|
+
Enabled: false
|
47
|
+
|
48
|
+
Style/SelectByRegexp:
|
49
|
+
Enabled: false
|
50
|
+
|
51
|
+
Style/WordArray:
|
52
|
+
Enabled: false
|
53
|
+
|
54
|
+
Style/SymbolArray:
|
55
|
+
Enabled: false
|
56
|
+
|
57
|
+
Layout/FirstArrayElementIndentation:
|
58
|
+
Enabled: false
|
59
|
+
|
60
|
+
Lint/StructNewOverride:
|
61
|
+
Enabled: false
|
62
|
+
|
63
|
+
Style/Proc:
|
64
|
+
Enabled: false
|
65
|
+
|
66
|
+
Lint/RescueException:
|
67
|
+
Enabled: false
|
68
|
+
|
69
|
+
Naming/AccessorMethodName:
|
70
|
+
Enabled: false
|
71
|
+
|
72
|
+
Naming/PredicateName:
|
73
|
+
Enabled: false
|
74
|
+
|
75
|
+
Lint/UselessMethodDefinition:
|
76
|
+
Enabled: false
|
77
|
+
|
78
|
+
Naming/FileName:
|
79
|
+
Enabled: false
|
80
|
+
|
81
|
+
Style/Documentation:
|
82
|
+
Exclude:
|
83
|
+
- 'lib/mongory/matchers/**/*'
|
84
|
+
- 'spec/**/*'
|
data/.yardopts
ADDED
data/CHANGELOG.md
ADDED
@@ -0,0 +1,246 @@
|
|
1
|
+
# Changelog
|
2
|
+
|
3
|
+
## v0.3.0
|
4
|
+
|
5
|
+
### New Features
|
6
|
+
- Added matcher generator (`rails g mongory:matcher`)
|
7
|
+
- Automatically generates matcher class
|
8
|
+
- Automatically generates test files
|
9
|
+
- Automatically updates initializer
|
10
|
+
- Added performance test suite
|
11
|
+
- Provides performance data for different data sizes
|
12
|
+
- Includes both simple and complex query tests
|
13
|
+
|
14
|
+
### Improvements
|
15
|
+
- Improved code style configuration
|
16
|
+
- Updated documentation structure
|
17
|
+
- Optimized matcher-related code
|
18
|
+
- Enhanced key converter functionality
|
19
|
+
- Added support for escaped dots in string keys (e.g., `"user\\.name"` or `'user\.name'`)
|
20
|
+
- Fixed key converter registry method error
|
21
|
+
- Enhanced error handling
|
22
|
+
- Modified error class structure
|
23
|
+
- Improved documentation generation
|
24
|
+
- Fixed yardoc issues
|
25
|
+
- Expanded README content
|
26
|
+
|
27
|
+
### Performance Data
|
28
|
+
- Simple queries:
|
29
|
+
- 1000 records: ~2.5ms
|
30
|
+
- 10000 records: ~24.5ms
|
31
|
+
- 100000 records: ~242.5ms
|
32
|
+
- Complex queries:
|
33
|
+
- 1000 records: ~3.2ms
|
34
|
+
- 10000 records: ~31.5ms
|
35
|
+
- 100000 records: ~323.0ms
|
36
|
+
|
37
|
+
### Bug Fixes
|
38
|
+
- Fixed require insertion position in matcher generator
|
39
|
+
- Fixed key converter registry method error in Mongoid patch
|
40
|
+
- Fixed support for escaped dots in key converter
|
41
|
+
|
42
|
+
## [0.2.0] 2025-04-17
|
43
|
+
|
44
|
+
### ✨ Added
|
45
|
+
- `Matchers.register(method_sym, operator, klass)` API for registering custom operator matchers
|
46
|
+
- `Matchers.enable_symbol_snippets!` opt-in method to enable query snippets like `:age.gt`
|
47
|
+
- `Matchers::Validator` module for safe matcher registration validation
|
48
|
+
- `Matchers::Registry` struct to encapsulate method/operator mapping with Symbol patching
|
49
|
+
- All built-in matchers (`$regex`, `$or`, `$present`, etc.) now use declarative self-registration via `register(...)`
|
50
|
+
|
51
|
+
### 🛠️ Changed
|
52
|
+
- Matcher lookup is now routed through `Matchers.lookup(operator)` instead of hardcoded branches
|
53
|
+
- Symbol snippet patching is now explicitly opt-in and will never override existing methods
|
54
|
+
|
55
|
+
### 💥 Breaking (if applies)
|
56
|
+
- If any external code relies on internal matcher instantiation logic, it should switch to using `Matchers.register`
|
57
|
+
|
58
|
+
### 🔒 Security / Safety
|
59
|
+
- All Symbol patching is guarded via `method_defined?` check to prevent conflict with Mongoid or user extensions
|
60
|
+
|
61
|
+
## [0.1.0] 2025-04-17
|
62
|
+
- Rename Mongory to Mongory-rb and reset version to v0.1.0
|
63
|
+
|
64
|
+
## [2.0.0-beta.2] - 2025-04-16
|
65
|
+
|
66
|
+
### Changed
|
67
|
+
- Refactored all converter classes (`DataConverter`, `KeyConverter`, `ValueConverter`, `ConditionConverter`) into singleton classes inheriting from `AbstractConverter`
|
68
|
+
- Introduced `default_registrations` hook method to encapsulate converter setup logic internally
|
69
|
+
- Migrated fallback logic into `initialize`, removed reliance on `instance_eval`
|
70
|
+
- Renamed `converter_builder.rb` to `abstract_converter.rb`
|
71
|
+
- Refactored `Debugger` into a singleton class with `include Singleton`
|
72
|
+
- Moved `Debugger`'s setup logic into `initialize`
|
73
|
+
- All references to converters and debugger updated to use `.instance`
|
74
|
+
|
75
|
+
### Breaking Changes
|
76
|
+
- Removed support for direct `.convert(...)` calls on converter constants (e.g., `KeyConverter.convert`); use `.instance.convert(...)` instead
|
77
|
+
- Removed `.configure` DSL on `ConditionConverter`; use `default_registrations` override instead
|
78
|
+
- Replaced `Debugger.method` access with `Debugger.instance.method`
|
79
|
+
|
80
|
+
## [2.0.0-beta.1] - Unreleased - 2025-4-16
|
81
|
+
|
82
|
+
### ⚠️ Breaking Changes
|
83
|
+
- Renamed `DefaultMatcher` to `LiteralMatcher`
|
84
|
+
- Renamed `ConditionMatcher` to `HashConditionMatcher`
|
85
|
+
- Renamed `CollectionMatcher` to `ArrayRecordMatcher`
|
86
|
+
- Matcher behavior now enforces diggable structure for field access
|
87
|
+
- Query no longer matches `nil` as a valid document; field conditions (like `a: nil`) require diggable structure
|
88
|
+
|
89
|
+
### ✨ Features
|
90
|
+
- Support for `$in` and `$nin` operators in query conditions
|
91
|
+
- Delegated `nil` conditions to `OrMatcher` to improve MongoDB compatibility
|
92
|
+
|
93
|
+
### 🧠 Debugger & Trace
|
94
|
+
- Introduced structured matcher trace logging for better debugging
|
95
|
+
- Tree-based trace visualization implemented
|
96
|
+
- Removed dependency on Ruby's PrettyPrint module
|
97
|
+
|
98
|
+
### 🛠 Refactors
|
99
|
+
- Unified matcher dispatch logic in `dispatched_matcher`
|
100
|
+
- Simplified `render_tree` logic
|
101
|
+
- Improved fallback handling for symbol/string keys in field matchers
|
102
|
+
- Improved trace indent level calculation logic
|
103
|
+
- Removed all internal sort helpers: `#asc`, `#desc`, and `#sort_by_key`
|
104
|
+
- Sorting is no longer supported in Mongory query builder
|
105
|
+
- If needed, use `query.sort_by { |record| ... }` instead
|
106
|
+
|
107
|
+
### ✅ Fixes
|
108
|
+
- `$every => []` now correctly returns `false` instead of `true`
|
109
|
+
|
110
|
+
### 🧪 Test & Docs
|
111
|
+
- Refined RSpec matcher test coverage
|
112
|
+
- Updated YARD documentation across matchers
|
113
|
+
- Matcher converter display now includes full namespace
|
114
|
+
|
115
|
+
### 📄 Planning
|
116
|
+
- Added draft design notes for the upcoming `aggregate` system
|
117
|
+
|
118
|
+
## [1.8.0] - 2025-04-14
|
119
|
+
|
120
|
+
### Changed
|
121
|
+
|
122
|
+
- **Refactored Matcher Architecture**
|
123
|
+
- `DigValueMatcher` has been renamed to `FieldMatcher` to better reflect its behavior.
|
124
|
+
- All matchers now use `enable_unwrap!` to explicitly control matcher flattening logic in multi-match contexts.
|
125
|
+
- `ConditionMatcher`, `CollectionMatcher`, and `DefaultMatcher` routing logic now reflects the new matcher structure.
|
126
|
+
|
127
|
+
- **Improved Matcher Trace & Tree Introspection**
|
128
|
+
- All matchers now support `.render_tree` and `.tree_title` to integrate with `QueryBuilder#explain`.
|
129
|
+
- `FieldMatcher`, `RegexMatcher`, `InMatcher`, and `NinMatcher` now display accurate introspection trees.
|
130
|
+
- Enhanced `uniq_key` implementations across matchers to prevent duplication and support correct tree merging.
|
131
|
+
|
132
|
+
- **Operator Behavior Refinement**
|
133
|
+
- `InMatcher` and `NinMatcher` now clearly distinguish between single value vs. array inputs.
|
134
|
+
- `RegexMatcher` now accepts both literal `/regex/` and `"$regex"` formats; fallback from `DefaultMatcher` is supported.
|
135
|
+
|
136
|
+
### Documentation
|
137
|
+
|
138
|
+
- Added or improved YARD documentation across all matchers.
|
139
|
+
- All public APIs, including `render_tree`, `match`, `uniq_key`, and `tree_title` are now documented with examples and usage notes.
|
140
|
+
- `matchers/README.md` updated to reflect renames and structural clarity.
|
141
|
+
|
142
|
+
## [1.7.0] - 2025-04-13
|
143
|
+
|
144
|
+
### Added
|
145
|
+
|
146
|
+
- `QueryBuilder#explain` prints a tree-structured matcher breakdown using `PP`, useful for debugging.
|
147
|
+
- Matchers now support `#render_tree` and `#tree_title`, enabling structured introspection.
|
148
|
+
- `QueryBuilder#any_of` added as a semantic alias for `.and('$or' => [...])`.
|
149
|
+
|
150
|
+
### Changed
|
151
|
+
|
152
|
+
- Filter logic restructured to use immediately-parsed matchers (`set_matcher`) instead of building on `result`.
|
153
|
+
- `.each` now directly filters via matcher tree evaluation, removing dependency on an internal condition hash.
|
154
|
+
- Removed legacy `.result` method.
|
155
|
+
- `.or(...)` now wraps existing conditions intelligently when merging mixed operator states.
|
156
|
+
- `.pluck` and `.sort_by_keys` no longer convert keys to strings, fixing inconsistency with native Mongoid behavior.
|
157
|
+
|
158
|
+
### Deprecated
|
159
|
+
|
160
|
+
- `.asc` and `.desc` now emit deprecation warnings; they will be removed in v2.0.0.
|
161
|
+
|
162
|
+
## [1.6.4] - 2025-04-11
|
163
|
+
|
164
|
+
### Fixed
|
165
|
+
|
166
|
+
- `MongoidPatch` now references `Mongory::Converters::KeyConverter` directly instead of lazily accessing it through `.condition_converter`.
|
167
|
+
- Restored missing `Mongory.configure` method accidentally removed in earlier documentation refactor.
|
168
|
+
- Ensured all `.configure` entrypoints are consistently available for all converters.
|
169
|
+
|
170
|
+
## [1.6.1] - 2025-04-11
|
171
|
+
|
172
|
+
### Added
|
173
|
+
|
174
|
+
- **Rails Integration via Railtie**
|
175
|
+
Mongory now auto-integrates with Rails if present, using a new `Mongory::Railtie` and `RailsPatch` module.
|
176
|
+
|
177
|
+
- **Mongoid Integration Module**
|
178
|
+
Added `mongory/mongoid` which registers `Mongoid::Criteria::Queryable::Key` for symbolic query operators (e.g. `:age.gt`).
|
179
|
+
|
180
|
+
- **Conditional Auto-Require**
|
181
|
+
`mongory.rb` now conditionally requires `rails` and `mongoid` integration modules when Rails or Mongoid is detected.
|
182
|
+
|
183
|
+
- **YARD Documentation**
|
184
|
+
Improved YARD docstrings for all public APIs, including `QueryOperator`, `InstallGenerator`, and matchers.
|
185
|
+
|
186
|
+
### Changed
|
187
|
+
|
188
|
+
- **Generator Initializer Cleanup**
|
189
|
+
Removed direct Mongoid-specific converter registration from generator output. This logic is now encapsulated in `mongory/mongoid.rb`.
|
190
|
+
|
191
|
+
- **Improved Symbol DSL Activation**
|
192
|
+
Symbol snippets (`:age.gt => 30`) are now opt-in, via `Mongory.enable_symbol_snippets!`, and properly isolated from default runtime.
|
193
|
+
|
194
|
+
- **Safer Core Patch for present?/blank?**
|
195
|
+
When in Rails, Mongory will use `Object#present?` and `Object#blank?` instead of internal implementations, for better semantic consistency.
|
196
|
+
|
197
|
+
## [1.6.0] - 2025-04-11
|
198
|
+
|
199
|
+
### Added
|
200
|
+
- **Custom Operator: `$every`**
|
201
|
+
Added support for `$every`, a new matcher that succeeds only if *all* elements in an array satisfy the condition.
|
202
|
+
- **Custom Error Class: `Mongory::TypeError`**
|
203
|
+
Replaces Ruby's `TypeError` for internal validation, enabling cleaner and safer error handling.
|
204
|
+
- **Internal API: `SingletonBuilder`**
|
205
|
+
Introduced a unified abstraction for building singleton converters and utilities (used by `Debugger`, all Converters, etc.).
|
206
|
+
|
207
|
+
### Changed
|
208
|
+
- **Unified Matcher Construction**
|
209
|
+
All matchers now use `.build(...)` instead of `.new(...)` for consistent instantiation.
|
210
|
+
- **Simplified Matcher Dispatch**
|
211
|
+
Multi-matchers (`$and`, `$or`, etc.) now unwrap themselves when only one submatcher is present.
|
212
|
+
- **Centralized Matcher Responsibility**
|
213
|
+
`ConditionMatcher` replaces `DefaultMatcher` as the default dispatcher for query conditions.
|
214
|
+
- **Consistent Data Conversion**
|
215
|
+
All nested matchers (e.g. `FieldMatcher`, `ElemMatchMatcher`) now apply `data_converter` at match-time.
|
216
|
+
|
217
|
+
### Fixed
|
218
|
+
- **Validation Improvements**
|
219
|
+
Introduced `deep_check_validity!` to ensure all nested matchers are properly verified.
|
220
|
+
- **Edge Case Consistency**
|
221
|
+
Cleaner fallback handling and key traversal behavior under complex or mixed-type query structures.
|
222
|
+
|
223
|
+
---
|
224
|
+
|
225
|
+
## [1.5.0] - 2025-04-09
|
226
|
+
|
227
|
+
### Added
|
228
|
+
- **YARD Documentation**: Added `.yardopts` configuration file for generating documentation.
|
229
|
+
- **Converters Module**: Introduced `Mongory::Converters` module with `DataConverter` and `ConditionConverter` classes for better data and condition normalization.
|
230
|
+
- **Debugger**: Exposed `Utils::Debugger` for better debug control and query tracing.
|
231
|
+
|
232
|
+
### Changed
|
233
|
+
- **QueryBuilder Refactor**: Simplified `build_query` method to use `QueryBuilder` directly without namespace.
|
234
|
+
- **Data and Condition Converters**: Directly exposed `data_converter` and `condition_converter` via `Mongory` module for easier access and configuration.
|
235
|
+
- **Removed Config Class**: Removed `Config` class and replaced with direct configuration in `Mongory`.
|
236
|
+
|
237
|
+
### Fixed
|
238
|
+
- **Bug Fixes**: Corrected issues with array comparisons and query operator behaviors.
|
239
|
+
|
240
|
+
---
|
241
|
+
|
242
|
+
## [Prior Versions Summary]
|
243
|
+
|
244
|
+
- `1.0.1`: Initial release
|
245
|
+
- `1.1.0 ~ 1.3.3`: Refactored matcher architecture, added class inheritance structure, separated key/value matcher logic.
|
246
|
+
- `1.4.x`: Skipped
|
data/CODE_OF_CONDUCT.md
ADDED
@@ -0,0 +1,84 @@
|
|
1
|
+
# Contributor Covenant Code of Conduct
|
2
|
+
|
3
|
+
## Our Pledge
|
4
|
+
|
5
|
+
We as members, contributors, and leaders pledge to make participation in our community a harassment-free experience for everyone, regardless of age, body size, visible or invisible disability, ethnicity, sex characteristics, gender identity and expression, level of experience, education, socio-economic status, nationality, personal appearance, race, religion, or sexual identity and orientation.
|
6
|
+
|
7
|
+
We pledge to act and interact in ways that contribute to an open, welcoming, diverse, inclusive, and healthy community.
|
8
|
+
|
9
|
+
## Our Standards
|
10
|
+
|
11
|
+
Examples of behavior that contributes to a positive environment for our community include:
|
12
|
+
|
13
|
+
* Demonstrating empathy and kindness toward other people
|
14
|
+
* Being respectful of differing opinions, viewpoints, and experiences
|
15
|
+
* Giving and gracefully accepting constructive feedback
|
16
|
+
* Accepting responsibility and apologizing to those affected by our mistakes, and learning from the experience
|
17
|
+
* Focusing on what is best not just for us as individuals, but for the overall community
|
18
|
+
|
19
|
+
Examples of unacceptable behavior include:
|
20
|
+
|
21
|
+
* The use of sexualized language or imagery, and sexual attention or
|
22
|
+
advances of any kind
|
23
|
+
* Trolling, insulting or derogatory comments, and personal or political attacks
|
24
|
+
* Public or private harassment
|
25
|
+
* Publishing others' private information, such as a physical or email
|
26
|
+
address, without their explicit permission
|
27
|
+
* Other conduct which could reasonably be considered inappropriate in a
|
28
|
+
professional setting
|
29
|
+
|
30
|
+
## Enforcement Responsibilities
|
31
|
+
|
32
|
+
Community leaders are responsible for clarifying and enforcing our standards of acceptable behavior and will take appropriate and fair corrective action in response to any behavior that they deem inappropriate, threatening, offensive, or harmful.
|
33
|
+
|
34
|
+
Community leaders have the right and responsibility to remove, edit, or reject comments, commits, code, wiki edits, issues, and other contributions that are not aligned to this Code of Conduct, and will communicate reasons for moderation decisions when appropriate.
|
35
|
+
|
36
|
+
## Scope
|
37
|
+
|
38
|
+
This Code of Conduct applies within all community spaces, and also applies when an individual is officially representing the community in public spaces. Examples of representing our community include using an official e-mail address, posting via an official social media account, or acting as an appointed representative at an online or offline event.
|
39
|
+
|
40
|
+
## Enforcement
|
41
|
+
|
42
|
+
Instances of abusive, harassing, or otherwise unacceptable behavior may be reported to the community leaders responsible for enforcement at koten0224@gmail.com. All complaints will be reviewed and investigated promptly and fairly.
|
43
|
+
|
44
|
+
All community leaders are obligated to respect the privacy and security of the reporter of any incident.
|
45
|
+
|
46
|
+
## Enforcement Guidelines
|
47
|
+
|
48
|
+
Community leaders will follow these Community Impact Guidelines in determining the consequences for any action they deem in violation of this Code of Conduct:
|
49
|
+
|
50
|
+
### 1. Correction
|
51
|
+
|
52
|
+
**Community Impact**: Use of inappropriate language or other behavior deemed unprofessional or unwelcome in the community.
|
53
|
+
|
54
|
+
**Consequence**: A private, written warning from community leaders, providing clarity around the nature of the violation and an explanation of why the behavior was inappropriate. A public apology may be requested.
|
55
|
+
|
56
|
+
### 2. Warning
|
57
|
+
|
58
|
+
**Community Impact**: A violation through a single incident or series of actions.
|
59
|
+
|
60
|
+
**Consequence**: A warning with consequences for continued behavior. No interaction with the people involved, including unsolicited interaction with those enforcing the Code of Conduct, for a specified period of time. This includes avoiding interactions in community spaces as well as external channels like social media. Violating these terms may lead to a temporary or permanent ban.
|
61
|
+
|
62
|
+
### 3. Temporary Ban
|
63
|
+
|
64
|
+
**Community Impact**: A serious violation of community standards, including sustained inappropriate behavior.
|
65
|
+
|
66
|
+
**Consequence**: A temporary ban from any sort of interaction or public communication with the community for a specified period of time. No public or private interaction with the people involved, including unsolicited interaction with those enforcing the Code of Conduct, is allowed during this period. Violating these terms may lead to a permanent ban.
|
67
|
+
|
68
|
+
### 4. Permanent Ban
|
69
|
+
|
70
|
+
**Community Impact**: Demonstrating a pattern of violation of community standards, including sustained inappropriate behavior, harassment of an individual, or aggression toward or disparagement of classes of individuals.
|
71
|
+
|
72
|
+
**Consequence**: A permanent ban from any sort of public interaction within the community.
|
73
|
+
|
74
|
+
## Attribution
|
75
|
+
|
76
|
+
This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 2.0,
|
77
|
+
available at https://www.contributor-covenant.org/version/2/0/code_of_conduct.html.
|
78
|
+
|
79
|
+
Community Impact Guidelines were inspired by [Mozilla's code of conduct enforcement ladder](https://github.com/mozilla/diversity).
|
80
|
+
|
81
|
+
[homepage]: https://www.contributor-covenant.org
|
82
|
+
|
83
|
+
For answers to common questions about this code of conduct, see the FAQ at
|
84
|
+
https://www.contributor-covenant.org/faq. Translations are available at https://www.contributor-covenant.org/translations.
|
data/LICENSE.txt
ADDED
@@ -0,0 +1,21 @@
|
|
1
|
+
The MIT License (MIT)
|
2
|
+
|
3
|
+
Copyright (c) 2025 frank0224
|
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.
|