verify_it 0.1.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 ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA256:
3
+ metadata.gz: ef477abbd90cd2cccf84c643e7d2f9701f0156a9f98d2ac8540af3faad6cc296
4
+ data.tar.gz: 45a42d67357c0fb8f57c40f371274b97c80d5c2369a386758f15be965e11e3c2
5
+ SHA512:
6
+ metadata.gz: 8deb185375b951d67087946e05512db44eca245dde3a6054b664745b41f0753fecb2b5702efd6ce58ac461cf86413ef15634f5f4452d2738b31b17e076f5eb6c
7
+ data.tar.gz: bfe9967aad2dacc5c62bfa8dc16dd9adfbec268be7a2bf2e160d36c2edc18b5cdcbad33b41fc5aee2d4e8fb6ea630c4b9557a0e295f3c20794057afec292b705
data/.DS_Store ADDED
Binary file
data/AGENTS.md ADDED
@@ -0,0 +1,140 @@
1
+ # AGENTS.md
2
+
3
+ This file contains strict operational rules for AI agents working in this repository.
4
+
5
+ These rules are mandatory.
6
+
7
+ ---
8
+
9
+ # Agent Operating Guidelines
10
+
11
+ ## 1. Always Preserve and Expand Specs
12
+
13
+ You MUST:
14
+
15
+ - Create specs for all new behavior.
16
+ - Update specs when modifying behavior.
17
+ - Add regression specs for bug fixes.
18
+ - Never delete existing specs unless replacing them.
19
+
20
+ If behavior changes, specs must reflect that change.
21
+
22
+ No implementation without specs.
23
+
24
+ ---
25
+
26
+ ## 2. Use Bundler Conventions Only
27
+
28
+ This gem MUST follow Bundler’s official structure:
29
+
30
+ https://bundler.io/guides/creating_gem.html
31
+
32
+ Do not invent custom layouts.
33
+
34
+ Standard structure:
35
+
36
+ - lib/
37
+ - lib/verify_it.rb
38
+ - lib/verify_it/version.rb
39
+ - spec/
40
+ - verify_it.gemspec
41
+ - Gemfile
42
+
43
+ ---
44
+
45
+ ## 3. Maintain Production-Grade Standards
46
+
47
+ All generated code must:
48
+
49
+ - Be thread-safe
50
+ - Avoid global mutable state
51
+ - Avoid monkey patching
52
+ - Avoid runtime metaprogramming unless necessary
53
+ - Avoid unexpected side effects
54
+
55
+ ---
56
+
57
+ ## 4. API Stability
58
+
59
+ Agents must:
60
+
61
+ - Treat public methods as stable API
62
+ - Avoid renaming public methods
63
+ - Avoid changing method signatures without version bump
64
+ - Avoid altering return types silently
65
+
66
+ If a breaking change is introduced:
67
+ - Bump MAJOR version
68
+ - Update changelog
69
+ - Update README
70
+ - Update specs
71
+
72
+ ---
73
+
74
+ ## 5. Dependency Discipline
75
+
76
+ Agents MUST NOT:
77
+
78
+ - Add runtime dependencies casually
79
+ - Introduce large frameworks
80
+ - Add HTTP clients unless required
81
+ - Add ActiveSupport unless justified
82
+
83
+ Prefer pure Ruby implementations.
84
+
85
+ ---
86
+
87
+ ## 6. Code Style Requirements
88
+
89
+ - Ruby 3.x compatible
90
+ - Frozen string literal headers
91
+ - No unused variables
92
+ - No commented-out code
93
+ - No debug prints
94
+ - RuboCop clean
95
+
96
+ ---
97
+
98
+ ## 7. Error Handling Rules
99
+
100
+ - Raise explicit errors for invalid input.
101
+ - Avoid silent failures.
102
+ - Use custom error classes when appropriate.
103
+ - Document raised exceptions.
104
+
105
+ ---
106
+
107
+ ## 8. Documentation Requirements
108
+
109
+ Agents must update:
110
+
111
+ - README.md for new features
112
+ - CHANGELOG.md
113
+ - YARD documentation
114
+
115
+ Documentation is part of the feature.
116
+
117
+ ---
118
+
119
+ ## 9. Release Integrity
120
+
121
+ Before suggesting a release:
122
+
123
+ - All specs pass
124
+ - Lint passes
125
+ - Version is bumped correctly
126
+ - Changelog updated
127
+ - README updated
128
+
129
+ ---
130
+
131
+ ## 10. Golden Rule
132
+
133
+ If uncertain:
134
+ - Add a spec.
135
+ - Prefer explicit behavior.
136
+ - Avoid cleverness.
137
+ - Prefer clarity.
138
+
139
+ This gem is intended to be production-grade and long-lived.
140
+ Act accordingly.
data/CHANGELOG.md ADDED
@@ -0,0 +1,32 @@
1
+ ## [Unreleased]
2
+
3
+ ### Added
4
+ - CLI installer command (`verify_it install`) for Rails applications
5
+ - Interactive storage backend selection (Memory, Redis, Database)
6
+ - Automatic initializer generation with storage-specific configuration
7
+ - Automatic migration generation for database storage
8
+ - Comprehensive CLI specs
9
+
10
+ ## [0.1.0] - 2026-03-01
11
+
12
+ ### Added
13
+ - Core verification system with send and verify operations
14
+ - Storage adapters: Memory and Redis
15
+ - Configurable rate limiting system
16
+ - Support for SMS and Email delivery channels
17
+ - Result object with comprehensive status information
18
+ - Code generator with multiple formats (numeric, alphanumeric, alpha)
19
+ - Thread-safe operations
20
+ - Test mode for exposing codes without delivery
21
+ - Rails integration via Railtie and Verifiable concern
22
+ - Lifecycle callbacks (on_send, on_verify_success, on_verify_failure)
23
+ - Namespace support for multi-tenant applications
24
+ - Comprehensive RSpec test suite
25
+ - Full API documentation in README
26
+
27
+ ### Security
28
+ - Rate limiting for send attempts
29
+ - Rate limiting for verification attempts
30
+ - Rate limiting for identifier changes
31
+ - Automatic lockout after max failed attempts
32
+ - Code expiration with configurable TTL
data/CLAUDE.md ADDED
@@ -0,0 +1,132 @@
1
+ # CLAUDE.md
2
+
3
+ ## Project Context
4
+
5
+ This repository contains a production-grade Ruby gem built using Bundler
6
+ (`bundle gem verify_it --test=rspec --ci=github --mit`).
7
+
8
+ This gem is expected to:
9
+
10
+ - Follow Ruby idioms and best practices
11
+ - Be fully tested
12
+ - Maintain backward compatibility
13
+ - Be safe for production usage
14
+ - Be suitable for publishing to RubyGems
15
+
16
+ All development MUST preserve these guarantees.
17
+
18
+ ---
19
+
20
+ ## Core Development Rules
21
+
22
+ ### 1. Tests Are Mandatory
23
+
24
+ - Every feature must include RSpec coverage.
25
+ - Every bug fix must include a failing spec first.
26
+ - Specs must be deterministic and not rely on external services.
27
+ - No feature is complete without tests.
28
+
29
+ If specs break, they must be fixed immediately.
30
+
31
+ ---
32
+
33
+ ### 2. Backward Compatibility
34
+
35
+ This gem follows Semantic Versioning (SemVer):
36
+
37
+ - PATCH: bug fixes
38
+ - MINOR: backward-compatible features
39
+ - MAJOR: breaking changes
40
+
41
+ Do not introduce breaking changes without:
42
+
43
+ - Updating the version
44
+ - Documenting the change
45
+ - Updating the changelog
46
+ - Updating affected specs
47
+
48
+ ---
49
+
50
+ ### 3. Public API Discipline
51
+
52
+ - Clearly separate public vs private methods.
53
+ - Public methods must be documented with YARD.
54
+ - Internal implementation details must not leak.
55
+
56
+ Avoid expanding the public API surface unnecessarily.
57
+
58
+ ---
59
+
60
+ ### 4. Dependency Rules
61
+
62
+ - Prefer zero runtime dependencies.
63
+ - Every dependency must be justified.
64
+ - Development dependencies go in the gemspec under development dependencies.
65
+ - Do not introduce heavy dependencies without strong reason.
66
+
67
+ ---
68
+
69
+ ### 5. Code Quality Standards
70
+
71
+ - Ruby 3.x compatible
72
+ - Frozen string literal headers
73
+ - RuboCop compliant
74
+ - Small, composable objects
75
+ - No global state
76
+ - No monkey patching
77
+
78
+ ---
79
+
80
+ ### 6. Performance & Safety
81
+
82
+ - Avoid unnecessary allocations
83
+ - Avoid reflection-heavy logic unless justified
84
+ - Fail fast on invalid inputs
85
+ - Validate arguments explicitly
86
+
87
+ ---
88
+
89
+ ### 7. Documentation
90
+
91
+ The following must always be maintained:
92
+
93
+ - README.md
94
+ - CHANGELOG.md
95
+ - Inline YARD documentation
96
+ - Usage examples
97
+
98
+ Documentation must reflect real behavior.
99
+
100
+ ---
101
+
102
+ ### 8. CI Discipline
103
+
104
+ CI must:
105
+
106
+ - Run specs
107
+ - Lint with RuboCop
108
+ - Fail on warnings
109
+ - Test multiple Ruby versions
110
+
111
+ No PR should be merged if CI fails.
112
+
113
+ ---
114
+
115
+ ## Contributor Workflow
116
+
117
+ When implementing changes:
118
+
119
+ 1. Write or update specs first.
120
+ 2. Implement feature.
121
+ 3. Run `bundle exec rspec`.
122
+ 4. Run `bundle exec rubocop`.
123
+ 5. Update documentation.
124
+ 6. Update CHANGELOG.md.
125
+
126
+ ---
127
+
128
+ ## Non-Negotiable Rule
129
+
130
+ Never remove specs without replacing them.
131
+ Never reduce coverage.
132
+ Never ship untested code.
@@ -0,0 +1,10 @@
1
+ # Code of Conduct
2
+
3
+ "verify_it" follows [The Ruby Community Conduct Guideline](https://www.ruby-lang.org/en/conduct) in all "collaborative space", which is defined as community communications channels (such as mailing lists, submitted patches, commit comments, etc.):
4
+
5
+ * Participants will be tolerant of opposing views.
6
+ * Participants must ensure that their language and actions are free of personal attacks and disparaging personal remarks.
7
+ * When interpreting the words and actions of others, participants should always assume good intentions.
8
+ * Behaviour which can be reasonably considered harassment will not be tolerated.
9
+
10
+ If you have any concerns about behaviour within this project, please contact us at ["iguanadejere4@googlemail.com"](mailto:"iguanadejere4@googlemail.com").
data/LICENSE.txt ADDED
@@ -0,0 +1,21 @@
1
+ The MIT License (MIT)
2
+
3
+ Copyright (c) 2026 Jeremias Ramirez
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.