simple_authorize 1.0.0 → 1.0.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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 705f75951bbd55e8352217a91088812ddb17a0914f5674c2e04c3ff5623d0f28
4
- data.tar.gz: 94af211cac4be86bac47e46d1f2e06ae6342d4d5fbc7bf0e41fe5e9f82591287
3
+ metadata.gz: 0016cdf20b078e1d8e9d67b037742260a3e07d8d73a8056aea027c182ed422dc
4
+ data.tar.gz: 4653aae4a3e588e3ebb94e6afb16518793a2e5b5c167b117f5c8bf6517e2ee7f
5
5
  SHA512:
6
- metadata.gz: 56b1be714196ca98cdced6ea2556e64c5086be5b4ed923eee1434cc939252fea1ac72fe905cb0b2e035db45075d3b91f373f139b64b32d78a3449d558f481374
7
- data.tar.gz: bd6f0bb6cf73dfcfbd8dde7e0be6a08d0073fa3f23ca7c18121a626c84c83692fc0f3bd2e1efb25131a132e22c188682eb30f99aa5370e05303104526eaecc0d
6
+ metadata.gz: 8fdc1204e73d66f005d3f19893244712013300f12529b59a28e709f21552134e52e8efbb944197403be7832521cf983c15a7c1b8c46c3b2d3808dbbdc5511f2a
7
+ data.tar.gz: 5da4732fc1838f7a495336b4380f3bb90a523a5922fe6130e3e6b6c50cd0d2fd3d37f17f083de74ea8128871aac18f2d3a9ca7ef1e5196b225371c82e6ddd4cd
data/.overcommit.yml ADDED
@@ -0,0 +1,55 @@
1
+ # Overcommit configuration
2
+ # See https://github.com/sds/overcommit for full documentation
3
+
4
+ # Verify signatures for overcommit config to prevent tampering
5
+ verify_signatures: true
6
+
7
+ # Run these hooks before commits
8
+ PreCommit:
9
+ RuboCop:
10
+ enabled: true
11
+ description: 'Checking code style with RuboCop'
12
+ required: true
13
+ quiet: false
14
+ command: ['bundle', 'exec', 'rubocop']
15
+
16
+ TrailingWhitespace:
17
+ enabled: true
18
+ description: 'Checking for trailing whitespace'
19
+
20
+ YamlSyntax:
21
+ enabled: true
22
+ description: 'Checking YAML syntax'
23
+
24
+ # Run these hooks before pushes (more extensive checks)
25
+ PrePush:
26
+ RuboCop:
27
+ enabled: true
28
+ description: 'Running RuboCop before push'
29
+ required: true
30
+
31
+ Minitest:
32
+ enabled: true
33
+ description: 'Running Minitest suite'
34
+ required: true
35
+
36
+ RSpec:
37
+ enabled: true
38
+ description: 'Running RSpec suite'
39
+ required: true
40
+
41
+ # TruffleHog - scan for secrets
42
+ # Note: Requires truffleHog to be installed
43
+ # Install: brew install truffleHog (macOS) or pip install truffleHog
44
+ CustomScript:
45
+ enabled: true
46
+ description: 'Scanning for secrets with TruffleHog'
47
+ required: false # Optional since it requires external installation
48
+ command: ['sh', '-c', 'if command -v trufflehog >/dev/null 2>&1; then trufflehog filesystem . --only-verified --fail; else echo "TruffleHog not installed - skipping secret scan"; fi']
49
+
50
+ # Run these hooks after checkout
51
+ PostCheckout:
52
+ BundleInstall:
53
+ enabled: true
54
+ description: 'Running bundle install after checkout'
55
+ required: false
data/CHANGELOG.md CHANGED
@@ -5,49 +5,122 @@ All notable changes to this project will be documented in this file.
5
5
  The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
6
6
  and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
7
7
 
8
- ## [Unreleased]
8
+ ## [1.0.0] - 2025-11-03
9
9
 
10
10
  ### Added
11
- - Policy generator (`rails g simple_authorize:policy ModelName`) with support for:
12
- - Namespaced models (e.g., `Admin::Post`)
13
- - RSpec or Minitest test generation
14
- - Automatic test scaffolding with CRUD and scope tests
15
- - Policy caching for performance optimization:
16
- - Request-level memoization of policy instances
17
- - Automatic scoping by user, record, and policy class
18
- - Configurable via `config.enable_policy_cache`
19
- - `clear_policy_cache` method for manual cache clearing
20
- - Automatic cache clearing in `reset_authorization` for tests
21
- - Instrumentation and audit logging via ActiveSupport::Notifications:
22
- - Emits events for `authorize`, `authorize_headless`, and `policy_scope` calls
23
- - Rich payload with user, record, query, result, and timing information
24
- - Enabled by default, configurable via `config.enable_instrumentation`
25
- - Perfect for security audits, debugging, and monitoring
26
- - Initial release of SimpleAuthorize
27
- - Policy-based authorization system
28
- - Controller concern with authorization methods
29
- - Base policy class with default deny-all policies
30
- - Policy scope support for filtering collections
31
- - Strong parameters integration via `permitted_attributes` and `policy_params`
32
- - Automatic verification module (opt-in)
33
- - Headless policy support for policies without models
34
- - Namespace support for policies
35
- - Role-based helper methods (`admin_user?`, `contributor_user?`, `viewer_user?`)
36
- - Custom error handling with `NotAuthorizedError`
37
- - Install generator (`rails generate simple_authorize:install`)
38
- - Configuration system via initializer
39
- - Comprehensive documentation and examples
40
- - Test helper methods for easy testing
41
- - Backwards compatibility aliases for Pundit-style usage
42
-
43
- ## [0.1.0] - 2025-11-01
11
+
12
+ #### Core Authorization
13
+ - **Policy Generator** - Rails generator for creating policy classes (`rails g simple_authorize:policy ModelName`)
14
+ - **Install Generator** - Setup wizard creating initializer and base policy (`rails g simple_authorize:install`)
15
+ - **Headless Policies** - Authorization for actions without a specific record
16
+ - **Batch Authorization** - Efficiently authorize multiple records with `authorize_all`, `authorized_records`, and `partition_records`
17
+
18
+ #### Performance & Caching
19
+ - **Policy Caching** - Request-level memoization to reduce database queries and improve performance
20
+ - **Configurable Cache** - Enable/disable policy caching via `config.enable_policy_cache`
21
+
22
+ #### Instrumentation & Monitoring
23
+ - **ActiveSupport::Notifications** - Comprehensive instrumentation for authorization events
24
+ - **Audit Logging** - Track authorization attempts, denials, and policy scope usage
25
+ - **Custom Event Subscribers** - Hook into `authorize.simple_authorize` and `policy_scope.simple_authorize` events
26
+
27
+ #### API Support
28
+ - **JSON/XML Error Responses** - Automatic API-friendly error responses with proper HTTP status codes
29
+ - **API Request Detection** - Intelligent detection of API requests (JSON/XML format and headers)
30
+ - **Configurable Error Details** - Control error detail level with `config.api_error_details`
31
+ - **Status Code Handling** - 401 Unauthorized vs 403 Forbidden based on authentication state
32
+
33
+ #### Attribute-Level Authorization
34
+ - **Visible Attributes** - Control which attributes users can view (`visible_attributes`, `visible_attributes_for_action`)
35
+ - **Editable Attributes** - Control which attributes users can modify (`editable_attributes`, `editable_attributes_for_action`)
36
+ - **Filter Helpers** - Automatically filter attribute hashes based on policy rules
37
+ - **Strong Parameters Integration** - `policy_params` method for seamless Rails strong parameters integration
38
+
39
+ #### Testing Support
40
+ - **RSpec Matchers** - `permit_action`, `forbid_action`, `permit_mass_assignment`, `forbid_mass_assignment`
41
+ - **RSpec Helpers** - `permit_editing`, `forbid_editing`, `permit_viewing`, `forbid_viewing`
42
+ - **Minitest Helpers** - `assert_permit_action`, `assert_forbid_action` for Minitest users
43
+ - **Policy Testing** - Comprehensive test helpers for both testing frameworks
44
+
45
+ #### Internationalization
46
+ - **I18n Support** - Configurable error messages with internationalization support
47
+ - **Custom Translations** - Per-policy and per-action error message translations
48
+ - **Configurable Scope** - Customize I18n scope with `config.i18n_scope`
49
+ - **Fallback Messages** - Graceful fallback to default messages when translations are missing
50
+
51
+ #### Security & Best Practices
52
+ - **Authorization Verification** - `verify_authorized` and `verify_policy_scoped` to catch missing authorization
53
+ - **Skip Authorization** - Explicit `skip_authorization` and `skip_policy_scope` methods
54
+ - **Auto-Verify Module** - Optional automatic verification with `include SimpleAuthorize::Controller::AutoVerify`
55
+ - **Safe Redirects** - Security-conscious redirect handling preventing open redirect vulnerabilities
56
+
57
+ #### Developer Experience
58
+ - **Comprehensive Documentation** - Extensive README with examples and best practices
59
+ - **Error Messages** - Clear, actionable error messages for common mistakes
60
+ - **Helper Methods** - View helpers automatically included (`policy`, `policy_scope`, `authorized_user`)
61
+ - **Role Helpers** - Convenient `admin_user?`, `contributor_user?`, `viewer_user?` methods
62
+
63
+ ### Changed
64
+ - Improved error handling with detailed exception information
65
+ - Enhanced policy class resolution with namespace support
66
+ - Better cache key generation for policy instances
67
+
68
+ ### Fixed
69
+ - Policy scope resolution for collection classes
70
+ - Safe referrer path handling for redirects
71
+ - API request detection edge cases
72
+
73
+ ### Security
74
+ - Added protection against open redirect vulnerabilities in `safe_referrer_path`
75
+ - Implemented proper HTTP status codes (401 vs 403) for API errors
76
+ - Enhanced authorization verification to prevent bypass attempts
77
+
78
+ ## [0.1.0] - Initial Development
44
79
 
45
80
  ### Added
46
- - Initial gem structure
47
- - Core authorization framework extracted from production Rails application
48
- - MIT license
49
- - README with comprehensive documentation
50
- - Generator templates for installation
81
+ - Basic policy-based authorization
82
+ - Core authorization methods (`authorize`, `policy`, `policy_scope`)
83
+ - Integration with Rails controllers
84
+ - Basic test helpers
85
+ - Initial documentation
86
+
87
+ ---
88
+
89
+ ## Upgrading
90
+
91
+ ### From 0.1.0 to 1.0.0
92
+
93
+ **Breaking Changes:**
94
+ None - v1.0.0 is fully backward compatible with 0.1.0.
95
+
96
+ **New Features:**
97
+ All features listed above are opt-in and won't affect existing implementations.
98
+
99
+ **Recommended Updates:**
100
+ 1. Run `rails g simple_authorize:install` to generate the configuration file
101
+ 2. Enable policy caching for better performance: `config.enable_policy_cache = true`
102
+ 3. Enable instrumentation for monitoring: `config.enable_instrumentation = true`
103
+ 4. Add RSpec matchers to your spec_helper: `require 'simple_authorize/rspec'`
104
+
105
+ **Configuration:**
106
+ ```ruby
107
+ # config/initializers/simple_authorize.rb
108
+ SimpleAuthorize.configure do |config|
109
+ config.enable_policy_cache = true # Enable request-level policy caching
110
+ config.enable_instrumentation = true # Enable ActiveSupport::Notifications
111
+ config.api_error_details = false # Exclude sensitive details in API errors
112
+ config.i18n_enabled = true # Enable I18n support
113
+ config.i18n_scope = "simple_authorize" # I18n translation scope
114
+ config.default_error_message = "You are not authorized to perform this action."
115
+ end
116
+ ```
117
+
118
+ ## Support
119
+
120
+ - **Documentation**: [README.md](README.md)
121
+ - **Issues**: [GitHub Issues](https://github.com/scottlaplant/simple_authorize/issues)
122
+ - **Security**: [SECURITY.md](SECURITY.md)
123
+ - **Contributing**: [CONTRIBUTING.md](CONTRIBUTING.md)
51
124
 
52
- [Unreleased]: https://github.com/scottlaplant/simple_authorize/compare/v0.1.0...HEAD
125
+ [1.0.0]: https://github.com/scottlaplant/simple_authorize/releases/tag/v1.0.0
53
126
  [0.1.0]: https://github.com/scottlaplant/simple_authorize/releases/tag/v0.1.0
@@ -0,0 +1,129 @@
1
+ # Contributor Covenant Code of Conduct
2
+
3
+ ## Our Pledge
4
+
5
+ We as members, contributors, and leaders pledge to make participation in our
6
+ community a harassment-free experience for everyone, regardless of age, body
7
+ size, visible or invisible disability, ethnicity, sex characteristics, gender
8
+ identity and expression, level of experience, education, socio-economic status,
9
+ nationality, personal appearance, race, religion, or sexual identity
10
+ and orientation.
11
+
12
+ We pledge to act and interact in ways that contribute to an open, welcoming,
13
+ diverse, inclusive, and healthy community.
14
+
15
+ ## Our Standards
16
+
17
+ Examples of behavior that contributes to a positive environment for our
18
+ community include:
19
+
20
+ * Demonstrating empathy and kindness toward other people
21
+ * Being respectful of differing opinions, viewpoints, and experiences
22
+ * Giving and gracefully accepting constructive feedback
23
+ * Accepting responsibility and apologizing to those affected by our mistakes,
24
+ and learning from the experience
25
+ * Focusing on what is best not just for us as individuals, but for the
26
+ overall community
27
+
28
+ Examples of unacceptable behavior include:
29
+
30
+ * The use of sexualized language or imagery, and sexual attention or
31
+ advances of any kind
32
+ * Trolling, insulting or derogatory comments, and personal or political attacks
33
+ * Public or private harassment
34
+ * Publishing others' private information, such as a physical or email
35
+ address, without their explicit permission
36
+ * Other conduct which could reasonably be considered inappropriate in a
37
+ professional setting
38
+
39
+ ## Enforcement Responsibilities
40
+
41
+ Community leaders are responsible for clarifying and enforcing our standards of
42
+ acceptable behavior and will take appropriate and fair corrective action in
43
+ response to any behavior that they deem inappropriate, threatening, offensive,
44
+ or harmful.
45
+
46
+ Community leaders have the right and responsibility to remove, edit, or reject
47
+ comments, commits, code, wiki edits, issues, and other contributions that are
48
+ not aligned to this Code of Conduct, and will communicate reasons for moderation
49
+ decisions when appropriate.
50
+
51
+ ## Scope
52
+
53
+ This Code of Conduct applies within all community spaces, and also applies when
54
+ an individual is officially representing the community in public spaces.
55
+ Examples of representing our community include using an official e-mail address,
56
+ posting via an official social media account, or acting as an appointed
57
+ representative at an online or offline event.
58
+
59
+ ## Enforcement
60
+
61
+ Instances of abusive, harassing, or otherwise unacceptable behavior may be
62
+ reported to the community leaders responsible for enforcement at
63
+ **simpleauthorize@gmail.com**.
64
+
65
+ All complaints will be reviewed and investigated promptly and fairly.
66
+
67
+ All community leaders are obligated to respect the privacy and security of the
68
+ reporter of any incident.
69
+
70
+ ## Enforcement Guidelines
71
+
72
+ Community leaders will follow these Community Impact Guidelines in determining
73
+ the consequences for any action they deem in violation of this Code of Conduct:
74
+
75
+ ### 1. Correction
76
+
77
+ **Community Impact**: Use of inappropriate language or other behavior deemed
78
+ unprofessional or unwelcome in the community.
79
+
80
+ **Consequence**: A private, written warning from community leaders, providing
81
+ clarity around the nature of the violation and an explanation of why the
82
+ behavior was inappropriate. A public apology may be requested.
83
+
84
+ ### 2. Warning
85
+
86
+ **Community Impact**: A violation through a single incident or series
87
+ of actions.
88
+
89
+ **Consequence**: A warning with consequences for continued behavior. No
90
+ interaction with the people involved, including unsolicited interaction with
91
+ those enforcing the Code of Conduct, for a specified period of time. This
92
+ includes avoiding interactions in community spaces as well as external channels
93
+ like social media. Violating these terms may lead to a temporary or
94
+ permanent ban.
95
+
96
+ ### 3. Temporary Ban
97
+
98
+ **Community Impact**: A serious violation of community standards, including
99
+ sustained inappropriate behavior.
100
+
101
+ **Consequence**: A temporary ban from any sort of interaction or public
102
+ communication with the community for a specified period of time. No public or
103
+ private interaction with the people involved, including unsolicited interaction
104
+ with those enforcing the Code of Conduct, is allowed during this period.
105
+ Violating these terms may lead to a permanent ban.
106
+
107
+ ### 4. Permanent Ban
108
+
109
+ **Community Impact**: Demonstrating a pattern of violation of community
110
+ standards, including sustained inappropriate behavior, harassment of an
111
+ individual, or aggression toward or disparagement of classes of individuals.
112
+
113
+ **Consequence**: A permanent ban from any sort of public interaction within
114
+ the community.
115
+
116
+ ## Attribution
117
+
118
+ This Code of Conduct is adapted from the [Contributor Covenant][homepage],
119
+ version 2.0, available at
120
+ https://www.contributor-covenant.org/version/2/0/code_of_conduct.html.
121
+
122
+ Community Impact Guidelines were inspired by [Mozilla's code of conduct
123
+ enforcement ladder](https://github.com/mozilla/diversity).
124
+
125
+ [homepage]: https://www.contributor-covenant.org
126
+
127
+ For answers to common questions about this code of conduct, see the FAQ at
128
+ https://www.contributor-covenant.org/faq. Translations are available at
129
+ https://www.contributor-covenant.org/translations.
data/CONTRIBUTING.md ADDED
@@ -0,0 +1,182 @@
1
+ # Contributing to SimpleAuthorize
2
+
3
+ Thank you for your interest in contributing to SimpleAuthorize! We welcome contributions from everyone.
4
+
5
+ ## Code of Conduct
6
+
7
+ This project and everyone participating in it is governed by our [Code of Conduct](CODE_OF_CONDUCT.md). By participating, you are expected to uphold this code. Please report unacceptable behavior to simpleauthorize@gmail.com.
8
+
9
+ ## How Can I Contribute?
10
+
11
+ ### Reporting Bugs
12
+
13
+ Before creating bug reports, please check the existing issues to avoid duplicates. When creating a bug report, include as many details as possible:
14
+
15
+ * **Use a clear and descriptive title**
16
+ * **Describe the exact steps to reproduce the problem**
17
+ * **Provide specific examples** to demonstrate the steps
18
+ * **Describe the behavior you observed** and what you expected
19
+ * **Include Ruby version, Rails version, and gem version**
20
+ * **Include any error messages or stack traces**
21
+
22
+ ### Suggesting Enhancements
23
+
24
+ Enhancement suggestions are tracked as GitHub issues. When creating an enhancement suggestion:
25
+
26
+ * **Use a clear and descriptive title**
27
+ * **Provide a step-by-step description** of the suggested enhancement
28
+ * **Explain why this enhancement would be useful**
29
+ * **List any alternative solutions** you've considered
30
+
31
+ ### Pull Requests
32
+
33
+ * Fill in the pull request template
34
+ * Follow the Ruby style guide (RuboCop will check this)
35
+ * Include tests for new features or bug fixes
36
+ * Update documentation as needed
37
+ * Ensure all tests pass (`bundle exec rake test` and `bundle exec rspec`)
38
+ * Ensure RuboCop passes (`bundle exec rubocop`)
39
+
40
+ ## Development Setup
41
+
42
+ 1. **Fork and clone the repository**
43
+ ```bash
44
+ git clone https://github.com/YOUR_USERNAME/simple_authorize.git
45
+ cd simple_authorize
46
+ ```
47
+
48
+ 2. **Install dependencies**
49
+ ```bash
50
+ bundle install
51
+ ```
52
+
53
+ 3. **Set up git hooks with Overcommit**
54
+ ```bash
55
+ # Install git hooks
56
+ bundle exec overcommit --install
57
+
58
+ # (Optional) Install TruffleHog for secret scanning
59
+ # macOS: brew install truffleHog
60
+ # Linux: pip install truffleHog
61
+ ```
62
+
63
+ This sets up automatic checks before commits and pushes:
64
+ * **Pre-commit**: RuboCop, trailing whitespace, YAML syntax
65
+ * **Pre-push**: RuboCop, Minitest, RSpec, TruffleHog (if installed)
66
+ * **Post-checkout**: Automatic bundle install
67
+
68
+ To skip hooks temporarily (not recommended):
69
+ ```bash
70
+ git push --no-verify
71
+ ```
72
+
73
+ 4. **Run tests**
74
+ ```bash
75
+ # Run Minitest suite
76
+ bundle exec rake test
77
+
78
+ # Run RSpec suite
79
+ bundle exec rspec
80
+
81
+ # Run RuboCop
82
+ bundle exec rubocop
83
+
84
+ # Run all checks
85
+ bundle exec rake
86
+ ```
87
+
88
+ 5. **Create a feature branch**
89
+ ```bash
90
+ git checkout -b my-new-feature
91
+ ```
92
+
93
+ ## Testing
94
+
95
+ We maintain high test coverage (89%+) and use both Minitest and RSpec:
96
+
97
+ * **Minitest**: `test/` directory - for integration and controller tests
98
+ * **RSpec**: `spec/` directory - for unit tests and matchers
99
+
100
+ Please ensure your changes include appropriate tests:
101
+
102
+ ```ruby
103
+ # Minitest example
104
+ test "authorize succeeds when policy allows" do
105
+ result = controller.authorize(post, :show?)
106
+ assert_equal post, result
107
+ end
108
+
109
+ # RSpec example
110
+ it "permits action when policy allows" do
111
+ expect { policy.show? }.to permit_action
112
+ end
113
+ ```
114
+
115
+ ## Code Style
116
+
117
+ We follow the Ruby Style Guide and enforce it with RuboCop:
118
+
119
+ * Use 2 spaces for indentation
120
+ * Use double quotes for strings
121
+ * Keep lines under 120 characters
122
+ * Write descriptive method and variable names
123
+ * Add comments for complex logic
124
+
125
+ Run RuboCop with:
126
+ ```bash
127
+ bundle exec rubocop
128
+ ```
129
+
130
+ Auto-fix issues with:
131
+ ```bash
132
+ bundle exec rubocop -a
133
+ ```
134
+
135
+ ## Documentation
136
+
137
+ * Update README.md if you add features
138
+ * Add YARD documentation to public methods
139
+ * Update CHANGELOG.md with your changes
140
+ * Keep comments up-to-date with code changes
141
+
142
+ ## Commit Messages
143
+
144
+ * Use present tense ("Add feature" not "Added feature")
145
+ * Use imperative mood ("Move cursor to..." not "Moves cursor to...")
146
+ * Limit first line to 72 characters
147
+ * Reference issues and pull requests after the first line
148
+
149
+ Example:
150
+ ```
151
+ Add policy caching for improved performance
152
+
153
+ Implements request-level memoization for policy instances
154
+ to reduce database queries and improve response times.
155
+
156
+ Fixes #123
157
+ ```
158
+
159
+ ## Release Process
160
+
161
+ Maintainers will handle releases:
162
+
163
+ 1. Update version in `lib/simple_authorize/version.rb`
164
+ 2. Update CHANGELOG.md with release notes
165
+ 3. Commit changes
166
+ 4. Run `bundle exec rake release`
167
+
168
+ ## Questions?
169
+
170
+ Feel free to:
171
+ * Open an issue for questions
172
+ * Email us at simpleauthorize@gmail.com
173
+ * Check existing documentation in the README
174
+
175
+ ## Recognition
176
+
177
+ Contributors will be:
178
+ * Listed in the CHANGELOG for their contributions
179
+ * Credited in release notes
180
+ * Added to a CONTRIBUTORS file (if created)
181
+
182
+ Thank you for contributing to SimpleAuthorize! 🎉
data/SECURITY.md CHANGED
@@ -6,7 +6,8 @@ We release patches for security vulnerabilities. Currently supported versions:
6
6
 
7
7
  | Version | Supported |
8
8
  | ------- | ------------------ |
9
- | 0.1.x | :white_check_mark: |
9
+ | 1.0.x | :white_check_mark: |
10
+ | < 1.0 | :x: |
10
11
 
11
12
  ## Reporting a Vulnerability
12
13
 
@@ -14,8 +15,11 @@ We take the security of SimpleAuthorize seriously. If you discover a security vu
14
15
 
15
16
  ### How to Report
16
17
 
17
- 1. **DO NOT** open a public GitHub issue for security vulnerabilities
18
- 2. Use GitHub's private vulnerability reporting feature (see "Security" tab in the repository)
18
+ **Please DO NOT open a public GitHub issue for security vulnerabilities.**
19
+
20
+ Please report security vulnerabilities to: **simpleauthorize@gmail.com**
21
+
22
+ Alternatively, you can use GitHub's private vulnerability reporting feature (see "Security" tab in the repository).
19
23
 
20
24
  ### What to Include
21
25
 
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module SimpleAuthorize
4
- VERSION = "1.0.0"
4
+ VERSION = "1.0.1"
5
5
  end
data/spec/examples.txt CHANGED
@@ -1,51 +1,51 @@
1
1
  example_id | status | run_time |
2
2
  -------------------------------------- | ------ | --------------- |
3
- ./spec/rspec_matchers_spec.rb[1:1:1:1] | passed | 0.00004 seconds |
4
- ./spec/rspec_matchers_spec.rb[1:1:1:2] | passed | 0.00004 seconds |
3
+ ./spec/rspec_matchers_spec.rb[1:1:1:1] | passed | 0.00003 seconds |
4
+ ./spec/rspec_matchers_spec.rb[1:1:1:2] | passed | 0.00003 seconds |
5
5
  ./spec/rspec_matchers_spec.rb[1:1:1:3] | passed | 0.00004 seconds |
6
6
  ./spec/rspec_matchers_spec.rb[1:1:2:1] | passed | 0.00004 seconds |
7
7
  ./spec/rspec_matchers_spec.rb[1:1:2:2] | passed | 0.00004 seconds |
8
- ./spec/rspec_matchers_spec.rb[1:1:3:1] | passed | 0.00005 seconds |
8
+ ./spec/rspec_matchers_spec.rb[1:1:3:1] | passed | 0.00004 seconds |
9
9
  ./spec/rspec_matchers_spec.rb[1:1:3:2] | passed | 0.00004 seconds |
10
- ./spec/rspec_matchers_spec.rb[1:1:4:1] | passed | 0.00004 seconds |
11
- ./spec/rspec_matchers_spec.rb[1:1:4:2] | passed | 0.00004 seconds |
12
- ./spec/rspec_matchers_spec.rb[1:2:1:1] | passed | 0.00004 seconds |
10
+ ./spec/rspec_matchers_spec.rb[1:1:4:1] | passed | 0.00003 seconds |
11
+ ./spec/rspec_matchers_spec.rb[1:1:4:2] | passed | 0.00012 seconds |
12
+ ./spec/rspec_matchers_spec.rb[1:2:1:1] | passed | 0.00003 seconds |
13
13
  ./spec/rspec_matchers_spec.rb[1:2:1:2] | passed | 0.00004 seconds |
14
- ./spec/rspec_matchers_spec.rb[1:2:2:1] | passed | 0.00005 seconds |
15
- ./spec/rspec_matchers_spec.rb[1:2:2:2] | passed | 0.00011 seconds |
16
- ./spec/rspec_matchers_spec.rb[1:2:3:1] | passed | 0.00005 seconds |
17
- ./spec/rspec_matchers_spec.rb[1:2:3:2] | passed | 0.00007 seconds |
14
+ ./spec/rspec_matchers_spec.rb[1:2:2:1] | passed | 0.00004 seconds |
15
+ ./spec/rspec_matchers_spec.rb[1:2:2:2] | passed | 0.00003 seconds |
16
+ ./spec/rspec_matchers_spec.rb[1:2:3:1] | passed | 0.00004 seconds |
17
+ ./spec/rspec_matchers_spec.rb[1:2:3:2] | passed | 0.00004 seconds |
18
18
  ./spec/rspec_matchers_spec.rb[1:2:4:1] | passed | 0.00003 seconds |
19
- ./spec/rspec_matchers_spec.rb[1:2:4:2] | passed | 0.00004 seconds |
19
+ ./spec/rspec_matchers_spec.rb[1:2:4:2] | passed | 0.00003 seconds |
20
20
  ./spec/rspec_matchers_spec.rb[1:3:1:1] | passed | 0.00004 seconds |
21
- ./spec/rspec_matchers_spec.rb[1:3:1:2] | passed | 0.00004 seconds |
22
- ./spec/rspec_matchers_spec.rb[1:3:1:3] | passed | 0.00004 seconds |
21
+ ./spec/rspec_matchers_spec.rb[1:3:1:2] | passed | 0.00011 seconds |
22
+ ./spec/rspec_matchers_spec.rb[1:3:1:3] | passed | 0.00005 seconds |
23
23
  ./spec/rspec_matchers_spec.rb[1:3:2:1] | passed | 0.00004 seconds |
24
- ./spec/rspec_matchers_spec.rb[1:3:3:1] | passed | 0.00005 seconds |
25
- ./spec/rspec_matchers_spec.rb[1:3:3:2] | passed | 0.00004 seconds |
24
+ ./spec/rspec_matchers_spec.rb[1:3:3:1] | passed | 0.00004 seconds |
25
+ ./spec/rspec_matchers_spec.rb[1:3:3:2] | passed | 0.00005 seconds |
26
26
  ./spec/rspec_matchers_spec.rb[1:3:4:1] | passed | 0.00003 seconds |
27
- ./spec/rspec_matchers_spec.rb[1:3:4:2] | passed | 0.00004 seconds |
28
- ./spec/rspec_matchers_spec.rb[1:4:1:1] | passed | 0.00004 seconds |
29
- ./spec/rspec_matchers_spec.rb[1:4:2:1] | passed | 0.00004 seconds |
27
+ ./spec/rspec_matchers_spec.rb[1:3:4:2] | passed | 0.00003 seconds |
28
+ ./spec/rspec_matchers_spec.rb[1:4:1:1] | passed | 0.00003 seconds |
29
+ ./spec/rspec_matchers_spec.rb[1:4:2:1] | passed | 0.00003 seconds |
30
30
  ./spec/rspec_matchers_spec.rb[1:4:2:2] | passed | 0.00004 seconds |
31
- ./spec/rspec_matchers_spec.rb[1:4:3:1] | passed | 0.00005 seconds |
31
+ ./spec/rspec_matchers_spec.rb[1:4:3:1] | passed | 0.00004 seconds |
32
32
  ./spec/rspec_matchers_spec.rb[1:4:4:1] | passed | 0.00003 seconds |
33
- ./spec/rspec_matchers_spec.rb[1:4:4:2] | passed | 0.00004 seconds |
34
- ./spec/rspec_matchers_spec.rb[1:5:1:1] | passed | 0.00004 seconds |
35
- ./spec/rspec_matchers_spec.rb[1:5:1:2] | passed | 0.00004 seconds |
33
+ ./spec/rspec_matchers_spec.rb[1:4:4:2] | passed | 0.00003 seconds |
34
+ ./spec/rspec_matchers_spec.rb[1:5:1:1] | passed | 0.00003 seconds |
35
+ ./spec/rspec_matchers_spec.rb[1:5:1:2] | passed | 0.00003 seconds |
36
36
  ./spec/rspec_matchers_spec.rb[1:5:2:1] | passed | 0.00004 seconds |
37
- ./spec/rspec_matchers_spec.rb[1:5:3:1] | passed | 0.00005 seconds |
38
- ./spec/rspec_matchers_spec.rb[1:5:3:2] | passed | 0.00004 seconds |
39
- ./spec/rspec_matchers_spec.rb[1:5:4:1] | passed | 0.00004 seconds |
40
- ./spec/rspec_matchers_spec.rb[1:5:4:2] | passed | 0.00004 seconds |
41
- ./spec/rspec_matchers_spec.rb[1:6:1:1] | passed | 0.00004 seconds |
42
- ./spec/rspec_matchers_spec.rb[1:6:2:1] | passed | 0.00004 seconds |
37
+ ./spec/rspec_matchers_spec.rb[1:5:3:1] | passed | 0.00004 seconds |
38
+ ./spec/rspec_matchers_spec.rb[1:5:3:2] | passed | 0.00003 seconds |
39
+ ./spec/rspec_matchers_spec.rb[1:5:4:1] | passed | 0.00003 seconds |
40
+ ./spec/rspec_matchers_spec.rb[1:5:4:2] | passed | 0.00003 seconds |
41
+ ./spec/rspec_matchers_spec.rb[1:6:1:1] | passed | 0.00003 seconds |
42
+ ./spec/rspec_matchers_spec.rb[1:6:2:1] | passed | 0.00003 seconds |
43
43
  ./spec/rspec_matchers_spec.rb[1:6:2:2] | passed | 0.00004 seconds |
44
44
  ./spec/rspec_matchers_spec.rb[1:6:3:1] | passed | 0.00004 seconds |
45
- ./spec/rspec_matchers_spec.rb[1:6:3:2] | passed | 0.00005 seconds |
45
+ ./spec/rspec_matchers_spec.rb[1:6:3:2] | passed | 0.00004 seconds |
46
46
  ./spec/rspec_matchers_spec.rb[1:6:4:1] | passed | 0.00003 seconds |
47
47
  ./spec/rspec_matchers_spec.rb[1:6:4:2] | passed | 0.00003 seconds |
48
48
  ./spec/rspec_matchers_spec.rb[1:7:1:1] | passed | 0.00004 seconds |
49
- ./spec/rspec_matchers_spec.rb[1:7:1:2] | passed | 0.00005 seconds |
50
- ./spec/rspec_matchers_spec.rb[1:7:1:3] | passed | 0.00003 seconds |
51
- ./spec/rspec_matchers_spec.rb[1:7:2:1] | passed | 0.00156 seconds |
49
+ ./spec/rspec_matchers_spec.rb[1:7:1:2] | passed | 0.00004 seconds |
50
+ ./spec/rspec_matchers_spec.rb[1:7:1:3] | passed | 0.00005 seconds |
51
+ ./spec/rspec_matchers_spec.rb[1:7:2:1] | passed | 0.00118 seconds |
data/spec/spec_helper.rb CHANGED
@@ -1,9 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- # Start SimpleCov before anything else
4
- require "simplecov"
5
- SimpleCov.command_name "RSpec"
6
-
7
3
  $LOAD_PATH.unshift File.expand_path("../lib", __dir__)
8
4
  require "simple_authorize"
9
5
  require "simple_authorize/rspec"
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: simple_authorize
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.0
4
+ version: 1.0.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Scott
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2025-11-03 00:00:00.000000000 Z
11
+ date: 2025-11-04 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activesupport
@@ -80,31 +80,20 @@ dependencies:
80
80
  - - "~>"
81
81
  - !ruby/object:Gem::Version
82
82
  version: '3.0'
83
- - !ruby/object:Gem::Dependency
84
- name: simplecov
85
- requirement: !ruby/object:Gem::Requirement
86
- requirements:
87
- - - "~>"
88
- - !ruby/object:Gem::Version
89
- version: '0.22'
90
- type: :development
91
- prerelease: false
92
- version_requirements: !ruby/object:Gem::Requirement
93
- requirements:
94
- - - "~>"
95
- - !ruby/object:Gem::Version
96
- version: '0.22'
97
83
  description: SimpleAuthorize is a lightweight authorization framework for Rails that
98
84
  provides policy-based access control, role management, and scope filtering without
99
85
  requiring external gems. Inspired by Pundit but completely standalone.
100
86
  email:
101
- - scottlaplant@users.noreply.github.com
87
+ - simpleauthorize@gmail.com
102
88
  executables: []
103
89
  extensions: []
104
90
  extra_rdoc_files: []
105
91
  files:
92
+ - ".overcommit.yml"
106
93
  - ".simplecov"
107
94
  - CHANGELOG.md
95
+ - CODE_OF_CONDUCT.md
96
+ - CONTRIBUTING.md
108
97
  - LICENSE.txt
109
98
  - README.md
110
99
  - Rakefile
@@ -137,6 +126,7 @@ metadata:
137
126
  source_code_uri: https://github.com/scottlaplant/simple_authorize
138
127
  changelog_uri: https://github.com/scottlaplant/simple_authorize/blob/main/CHANGELOG.md
139
128
  bug_tracker_uri: https://github.com/scottlaplant/simple_authorize/issues
129
+ documentation_uri: https://github.com/scottlaplant/simple_authorize/wiki
140
130
  rubygems_mfa_required: 'true'
141
131
  post_install_message:
142
132
  rdoc_options: []