simple_authorize 1.1.0 → 1.1.2

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: 1e7ec7dc4e13ab781a1379671cb043b2a03956c29e32554ff00624ee57cd009a
4
- data.tar.gz: d0fb3ae9757d4ccd93250a09847630e5f4958c32498bff21047cf1e903cc4c19
3
+ metadata.gz: d7cac68cb5e079e85692c4c66db6bfa9dad982034b215fad992c2bef9a3edbee
4
+ data.tar.gz: 1169e220c001ae24ee1a121b4b5dcc0eb0038f30675bdcfde281c3a8736f6d49
5
5
  SHA512:
6
- metadata.gz: ca8717f9564cdbe1fe7873e7c5c7f10452a8825d83170565f306272e9b5cfcbd18adf181081e3603c58e206eb743e6ee4b4b8d1a4fd477a11d5946a5bd793fea
7
- data.tar.gz: cbe20818849f24ee61dec25ec75f08ba22c1bf75f5c9c2c1021cdaea3548aa01b084e009d16391c60568897148f13d2ba95e1c2817ae6c9697dea29fec9983a8
6
+ metadata.gz: '003297705b5a590b92ffaa273e5d16ce9fbbc5c70f2a3b6f9eabf2bb75f9f9685378c3ff4b7556023c86c9d599cba8b318219bea56b318854d10e1032e4c9b79'
7
+ data.tar.gz: c3dbd9bb4c31a9ee0fc494410501c14b9710508485c4fd7d9110c2b43a33bcc0fa784738f522ea36dded888398f0629d721b3d3ac1905a6c5954f552f5fcd76d
data/CHANGELOG.md CHANGED
@@ -5,6 +5,19 @@ 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
+ ## [1.1.2] - 2025-11-05
9
+
10
+ ### Fixed
11
+ - RuboCop compliance for all new policy modules
12
+ - Method naming convention (`standard_permissions` instead of `standard_permissions?`)
13
+ - Simplified conditional logic in Approvable module
14
+ - Code style improvements across test files
15
+
16
+ ## [1.1.1] - 2025-11-05
17
+
18
+ ### Added
19
+ - Initial release of Policy Composition and Context-Aware Policies (incomplete)
20
+
8
21
  ## [1.1.0] - 2025-11-05
9
22
 
10
23
  ### Added
data/CLAUDE.md ADDED
@@ -0,0 +1 @@
1
+ - do not automatically commit or push to the repo, please
@@ -0,0 +1,117 @@
1
+ # frozen_string_literal: true
2
+
3
+ module SimpleAuthorize
4
+ module PolicyModules
5
+ # Provides approval workflow authorization methods
6
+ #
7
+ # Include this module for content that requires approval:
8
+ #
9
+ # class DocumentPolicy < SimpleAuthorize::Policy
10
+ # include SimpleAuthorize::PolicyModules::Approvable
11
+ #
12
+ # def update?
13
+ # not_approved? && (owner? || admin?)
14
+ # end
15
+ # end
16
+ #
17
+ # Assumes records have approval-related fields like approved, approved_at,
18
+ # approval_status, pending_approval, etc.
19
+ module Approvable
20
+ protected
21
+
22
+ # Check if the record is approved
23
+ def approved?
24
+ return false unless record
25
+
26
+ if record.respond_to?(:approved?)
27
+ record.approved?
28
+ elsif record.respond_to?(:approved)
29
+ record.approved == true
30
+ elsif record.respond_to?(:approval_status)
31
+ record.approval_status == "approved"
32
+ elsif record.respond_to?(:approved_at)
33
+ record.approved_at.present?
34
+ else
35
+ false
36
+ end
37
+ end
38
+
39
+ # Check if the record is pending approval
40
+ def pending_approval?
41
+ return false unless record
42
+
43
+ if record.respond_to?(:pending_approval?)
44
+ record.pending_approval?
45
+ elsif record.respond_to?(:pending_approval)
46
+ record.pending_approval == true
47
+ elsif record.respond_to?(:approval_status)
48
+ record.approval_status == "pending"
49
+ elsif record.respond_to?(:submitted_for_approval_at)
50
+ record.submitted_for_approval_at.present? && !approved? && !rejected?
51
+ else
52
+ false
53
+ end
54
+ end
55
+
56
+ # Check if the record is rejected
57
+ def rejected?
58
+ return false unless record
59
+
60
+ if record.respond_to?(:rejected?)
61
+ record.rejected?
62
+ elsif record.respond_to?(:rejected)
63
+ record.rejected == true
64
+ elsif record.respond_to?(:approval_status)
65
+ record.approval_status == "rejected"
66
+ elsif record.respond_to?(:rejected_at)
67
+ record.rejected_at.present?
68
+ else
69
+ false
70
+ end
71
+ end
72
+
73
+ # Check if the record is not approved
74
+ def not_approved?
75
+ !approved?
76
+ end
77
+
78
+ # Check if user can approve (cannot approve own content)
79
+ def can_approve?
80
+ return false unless logged_in?
81
+
82
+ if admin?
83
+ true
84
+ elsif contributor?
85
+ # Contributors can approve others' content but not their own
86
+ !owner?
87
+ else
88
+ false
89
+ end
90
+ end
91
+
92
+ # Check if user can reject
93
+ def can_reject?
94
+ can_approve?
95
+ end
96
+
97
+ # Check if user can submit for approval
98
+ def can_submit_for_approval?
99
+ owner? && not_approved? && !pending_approval?
100
+ end
101
+
102
+ # Check if user can withdraw from approval
103
+ def can_withdraw_approval?
104
+ owner? && pending_approval?
105
+ end
106
+
107
+ # Check if content can be edited (typically not after approval)
108
+ def can_edit_with_approval?
109
+ if approved?
110
+ admin? # Only admins can edit approved content
111
+ else
112
+ owner? || admin? # Owner can edit rejected or unapproved content
113
+ end
114
+ end
115
+ end
116
+ end
117
+ end
@@ -0,0 +1,65 @@
1
+ # frozen_string_literal: true
2
+
3
+ module SimpleAuthorize
4
+ module PolicyModules
5
+ # Provides ownership-based authorization methods
6
+ #
7
+ # Include this module in your policy to add owner-based permissions:
8
+ #
9
+ # class PostPolicy < SimpleAuthorize::Policy
10
+ # include SimpleAuthorize::PolicyModules::Ownable
11
+ #
12
+ # def show?
13
+ # published? || owner_or_admin?
14
+ # end
15
+ # end
16
+ #
17
+ # This module assumes your record has a `user_id` field that matches
18
+ # the user's ID. Override the `owner?` method if you need different logic.
19
+ module Ownable
20
+ protected
21
+
22
+ # Check if the current user owns the record
23
+ def owner?
24
+ return false unless user && record
25
+
26
+ if record.respond_to?(:user_id)
27
+ record.user_id == user.id
28
+ elsif record.respond_to?(:user)
29
+ record.user == user
30
+ elsif record.respond_to?(:owner_id)
31
+ record.owner_id == user.id
32
+ elsif record.respond_to?(:owner)
33
+ record.owner == user
34
+ else
35
+ false
36
+ end
37
+ end
38
+
39
+ # Check if the user is the owner or an admin
40
+ def owner_or_admin?
41
+ owner? || admin?
42
+ end
43
+
44
+ # Check if the user is the owner or a contributor
45
+ def owner_or_contributor?
46
+ owner? || contributor?
47
+ end
48
+
49
+ # Common pattern: owners and admins can modify
50
+ def can_modify?
51
+ owner_or_admin?
52
+ end
53
+
54
+ # Common pattern: anyone can view, but only owners/admins can modify
55
+ def standard_permissions
56
+ {
57
+ show: true,
58
+ create: logged_in?,
59
+ update: owner_or_admin?,
60
+ destroy: owner_or_admin?
61
+ }
62
+ end
63
+ end
64
+ end
65
+ end
@@ -0,0 +1,81 @@
1
+ # frozen_string_literal: true
2
+
3
+ module SimpleAuthorize
4
+ module PolicyModules
5
+ # Provides publishing workflow authorization methods
6
+ #
7
+ # Include this module for content that has draft/published states:
8
+ #
9
+ # class ArticlePolicy < SimpleAuthorize::Policy
10
+ # include SimpleAuthorize::PolicyModules::Publishable
11
+ #
12
+ # def show?
13
+ # published? || can_preview?
14
+ # end
15
+ # end
16
+ #
17
+ # This module assumes your record responds to `published?` or has a
18
+ # `published` boolean field, and optionally `published_at` timestamp.
19
+ module Publishable
20
+ protected
21
+
22
+ # Check if the record is published
23
+ def published?
24
+ return false unless record
25
+
26
+ if record.respond_to?(:published?)
27
+ record.published?
28
+ elsif record.respond_to?(:published)
29
+ record.published == true
30
+ elsif record.respond_to?(:status)
31
+ record.status == "published"
32
+ elsif record.respond_to?(:published_at)
33
+ record.published_at && record.published_at <= Time.current
34
+ else
35
+ false
36
+ end
37
+ end
38
+
39
+ # Check if the record is a draft
40
+ def draft?
41
+ !published?
42
+ end
43
+
44
+ # Check if user can publish content
45
+ def can_publish?
46
+ admin? || (contributor? && owner?)
47
+ end
48
+
49
+ # Check if user can unpublish content
50
+ def can_unpublish?
51
+ admin? || (owner? && contributor?)
52
+ end
53
+
54
+ # Check if user can preview unpublished content
55
+ def can_preview?
56
+ owner? || admin? || contributor?
57
+ end
58
+
59
+ # Check if user can schedule publication
60
+ def can_schedule?
61
+ return false unless record.respond_to?(:scheduled_at) || record.respond_to?(:publish_at)
62
+
63
+ can_publish?
64
+ end
65
+
66
+ # Filter attributes based on published state
67
+ def publishable_visible_attributes(base_attributes = [])
68
+ if published? || can_preview?
69
+ base_attributes
70
+ else
71
+ base_attributes - sensitive_draft_attributes
72
+ end
73
+ end
74
+
75
+ # Attributes that should be hidden in draft state
76
+ def sensitive_draft_attributes
77
+ %i[internal_notes draft_notes review_comments]
78
+ end
79
+ end
80
+ end
81
+ end
@@ -0,0 +1,88 @@
1
+ # frozen_string_literal: true
2
+
3
+ module SimpleAuthorize
4
+ module PolicyModules
5
+ # Provides soft deletion authorization methods
6
+ #
7
+ # Include this module for records that support soft deletion:
8
+ #
9
+ # class CommentPolicy < SimpleAuthorize::Policy
10
+ # include SimpleAuthorize::PolicyModules::SoftDeletable
11
+ #
12
+ # def destroy?
13
+ # soft_deletable? && (owner? || admin?)
14
+ # end
15
+ # end
16
+ #
17
+ # Assumes records have a deleted_at timestamp or similar field.
18
+ module SoftDeletable
19
+ protected
20
+
21
+ # Check if the record is soft deleted
22
+ def soft_deleted?
23
+ return false unless record
24
+
25
+ if record.respond_to?(:deleted?)
26
+ record.deleted?
27
+ elsif record.respond_to?(:deleted_at)
28
+ record.deleted_at.present?
29
+ elsif record.respond_to?(:trashed?)
30
+ record.trashed?
31
+ elsif record.respond_to?(:archived?)
32
+ record.archived?
33
+ else
34
+ false
35
+ end
36
+ end
37
+
38
+ # Check if the record is not soft deleted
39
+ def not_deleted?
40
+ !soft_deleted?
41
+ end
42
+
43
+ # Check if the record supports soft deletion
44
+ def soft_deletable?
45
+ record && (
46
+ record.respond_to?(:deleted_at) ||
47
+ record.respond_to?(:deleted?) ||
48
+ record.respond_to?(:trash!) ||
49
+ record.respond_to?(:archive!)
50
+ )
51
+ end
52
+
53
+ # Check if user can restore soft deleted records
54
+ def can_restore?
55
+ soft_deleted? && (admin? || (owner? && within_restore_window?))
56
+ end
57
+
58
+ # Check if user can permanently delete
59
+ def can_permanently_destroy?
60
+ admin?
61
+ end
62
+
63
+ # Check if we're within the restore window (default 30 days)
64
+ def within_restore_window?(days = 30)
65
+ return true unless soft_deleted?
66
+ return true unless record.respond_to?(:deleted_at)
67
+
68
+ record.deleted_at > days.days.ago
69
+ end
70
+
71
+ # Check if user can view soft deleted records
72
+ def can_view_deleted?
73
+ admin? || (owner? && within_restore_window?)
74
+ end
75
+
76
+ # Standard destroy that respects soft delete
77
+ def safe_destroy?
78
+ if soft_deletable?
79
+ # Soft delete if supported
80
+ owner_or_admin?
81
+ else
82
+ # Hard delete requires admin
83
+ admin?
84
+ end
85
+ end
86
+ end
87
+ end
88
+ end
@@ -0,0 +1,104 @@
1
+ # frozen_string_literal: true
2
+
3
+ module SimpleAuthorize
4
+ module PolicyModules
5
+ # Provides time-based authorization methods
6
+ #
7
+ # Include this module for time-sensitive permissions:
8
+ #
9
+ # class EventPolicy < SimpleAuthorize::Policy
10
+ # include SimpleAuthorize::PolicyModules::Timestamped
11
+ #
12
+ # def update?
13
+ # not_expired? && (owner? || admin?)
14
+ # end
15
+ # end
16
+ #
17
+ # Works with records that have timestamp fields like expired_at,
18
+ # starts_at, ends_at, valid_until, etc.
19
+ module Timestamped
20
+ protected
21
+
22
+ # Check if the record has expired
23
+ def expired?
24
+ return false unless record
25
+
26
+ if record.respond_to?(:expired_at)
27
+ record.expired_at && record.expired_at < Time.current
28
+ elsif record.respond_to?(:expires_at)
29
+ record.expires_at && record.expires_at < Time.current
30
+ elsif record.respond_to?(:valid_until)
31
+ record.valid_until && record.valid_until < Time.current
32
+ elsif record.respond_to?(:ends_at)
33
+ record.ends_at && record.ends_at < Time.current
34
+ else
35
+ false
36
+ end
37
+ end
38
+
39
+ # Check if the record is not expired
40
+ def not_expired?
41
+ !expired?
42
+ end
43
+
44
+ # Check if the record is active (started but not ended)
45
+ def active?
46
+ started? && !ended?
47
+ end
48
+
49
+ # Check if the record has started
50
+ def started?
51
+ return true unless record
52
+
53
+ if record.respond_to?(:starts_at)
54
+ record.starts_at.nil? || record.starts_at <= Time.current
55
+ elsif record.respond_to?(:available_from)
56
+ record.available_from.nil? || record.available_from <= Time.current
57
+ elsif record.respond_to?(:valid_from)
58
+ record.valid_from.nil? || record.valid_from <= Time.current
59
+ else
60
+ true
61
+ end
62
+ end
63
+
64
+ # Check if the record has ended
65
+ def ended?
66
+ expired?
67
+ end
68
+
69
+ # Check if record is within a time window
70
+ def within_time_window?
71
+ started? && not_expired?
72
+ end
73
+
74
+ # Check if the record is locked (cannot be modified)
75
+ def locked?
76
+ return false unless record
77
+
78
+ if record.respond_to?(:locked_at)
79
+ record.locked_at && record.locked_at < Time.current
80
+ elsif record.respond_to?(:locked?)
81
+ record.locked?
82
+ elsif record.respond_to?(:frozen_at)
83
+ record.frozen_at && record.frozen_at < Time.current
84
+ else
85
+ false
86
+ end
87
+ end
88
+
89
+ # Check if record can be modified (not locked or expired)
90
+ def can_modify_time_based?
91
+ !locked? && not_expired?
92
+ end
93
+
94
+ # Business hours check (useful with context)
95
+ def within_business_hours?(time = Time.current)
96
+ hour = time.hour
97
+ weekday = time.wday
98
+
99
+ # Monday-Friday, 9 AM - 5 PM
100
+ weekday.between?(1, 5) && hour >= 9 && hour < 17
101
+ end
102
+ end
103
+ end
104
+ end
@@ -0,0 +1,27 @@
1
+ # frozen_string_literal: true
2
+
3
+ # Require all policy modules
4
+ require_relative "policy_modules/ownable"
5
+ require_relative "policy_modules/publishable"
6
+ require_relative "policy_modules/timestamped"
7
+ require_relative "policy_modules/approvable"
8
+ require_relative "policy_modules/soft_deletable"
9
+
10
+ module SimpleAuthorize
11
+ # Collection of reusable policy modules for common authorization patterns
12
+ #
13
+ # These modules can be mixed into your policy classes to add common
14
+ # authorization functionality without duplicating code.
15
+ #
16
+ # Example:
17
+ # class ArticlePolicy < SimpleAuthorize::Policy
18
+ # include SimpleAuthorize::PolicyModules::Ownable
19
+ # include SimpleAuthorize::PolicyModules::Publishable
20
+ #
21
+ # def show?
22
+ # published? || owner_or_admin?
23
+ # end
24
+ # end
25
+ module PolicyModules
26
+ end
27
+ end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module SimpleAuthorize
4
- VERSION = "1.1.0"
4
+ VERSION = "1.1.2"
5
5
  end
data/spec/examples.txt CHANGED
@@ -1,51 +1,51 @@
1
1
  example_id | status | run_time |
2
2
  -------------------------------------- | ------ | --------------- |
3
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
- ./spec/rspec_matchers_spec.rb[1:1:1:3] | passed | 0.00004 seconds |
6
- ./spec/rspec_matchers_spec.rb[1:1:2:1] | passed | 0.00004 seconds |
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.00004 seconds |
9
- ./spec/rspec_matchers_spec.rb[1:1:3:2] | passed | 0.00004 seconds |
4
+ ./spec/rspec_matchers_spec.rb[1:1:1:2] | passed | 0.00004 seconds |
5
+ ./spec/rspec_matchers_spec.rb[1:1:1:3] | passed | 0.00003 seconds |
6
+ ./spec/rspec_matchers_spec.rb[1:1:2:1] | passed | 0.00005 seconds |
7
+ ./spec/rspec_matchers_spec.rb[1:1:2:2] | passed | 0.00012 seconds |
8
+ ./spec/rspec_matchers_spec.rb[1:1:3:1] | passed | 0.00017 seconds |
9
+ ./spec/rspec_matchers_spec.rb[1:1:3:2] | passed | 0.00007 seconds |
10
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 |
11
+ ./spec/rspec_matchers_spec.rb[1:1:4:2] | passed | 0.00003 seconds |
12
+ ./spec/rspec_matchers_spec.rb[1:2:1:1] | passed | 0.00004 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.00004 seconds |
14
+ ./spec/rspec_matchers_spec.rb[1:2:2:1] | passed | 0.00003 seconds |
15
15
  ./spec/rspec_matchers_spec.rb[1:2:2:2] | passed | 0.00003 seconds |
16
16
  ./spec/rspec_matchers_spec.rb[1:2:3:1] | passed | 0.00004 seconds |
17
17
  ./spec/rspec_matchers_spec.rb[1:2:3:2] | passed | 0.00004 seconds |
18
- ./spec/rspec_matchers_spec.rb[1:2:4:1] | passed | 0.00003 seconds |
18
+ ./spec/rspec_matchers_spec.rb[1:2:4:1] | passed | 0.00004 seconds |
19
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.00011 seconds |
22
- ./spec/rspec_matchers_spec.rb[1:3:1:3] | passed | 0.00005 seconds |
23
- ./spec/rspec_matchers_spec.rb[1:3:2:1] | passed | 0.00004 seconds |
21
+ ./spec/rspec_matchers_spec.rb[1:3:1:2] | passed | 0.00003 seconds |
22
+ ./spec/rspec_matchers_spec.rb[1:3:1:3] | passed | 0.00003 seconds |
23
+ ./spec/rspec_matchers_spec.rb[1:3:2:1] | passed | 0.00003 seconds |
24
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 |
25
+ ./spec/rspec_matchers_spec.rb[1:3:3:2] | passed | 0.00003 seconds |
26
26
  ./spec/rspec_matchers_spec.rb[1:3:4:1] | passed | 0.00003 seconds |
27
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 |
28
+ ./spec/rspec_matchers_spec.rb[1:4:1:1] | passed | 0.00005 seconds |
29
+ ./spec/rspec_matchers_spec.rb[1:4:2:1] | passed | 0.00004 seconds |
30
30
  ./spec/rspec_matchers_spec.rb[1:4:2:2] | passed | 0.00004 seconds |
31
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
33
  ./spec/rspec_matchers_spec.rb[1:4:4:2] | passed | 0.00003 seconds |
34
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 |
35
+ ./spec/rspec_matchers_spec.rb[1:5:1:2] | passed | 0.00004 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.00004 seconds |
38
- ./spec/rspec_matchers_spec.rb[1:5:3:2] | passed | 0.00003 seconds |
37
+ ./spec/rspec_matchers_spec.rb[1:5:3:1] | passed | 0.00003 seconds |
38
+ ./spec/rspec_matchers_spec.rb[1:5:3:2] | passed | 0.00004 seconds |
39
39
  ./spec/rspec_matchers_spec.rb[1:5:4:1] | passed | 0.00003 seconds |
40
40
  ./spec/rspec_matchers_spec.rb[1:5:4:2] | passed | 0.00003 seconds |
41
41
  ./spec/rspec_matchers_spec.rb[1:6:1:1] | passed | 0.00003 seconds |
42
42
  ./spec/rspec_matchers_spec.rb[1:6:2:1] | passed | 0.00003 seconds |
43
- ./spec/rspec_matchers_spec.rb[1:6:2:2] | passed | 0.00004 seconds |
43
+ ./spec/rspec_matchers_spec.rb[1:6:2:2] | passed | 0.00003 seconds |
44
44
  ./spec/rspec_matchers_spec.rb[1:6:3:1] | passed | 0.00004 seconds |
45
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
- ./spec/rspec_matchers_spec.rb[1:7:1:1] | passed | 0.00004 seconds |
48
+ ./spec/rspec_matchers_spec.rb[1:7:1:1] | passed | 0.00003 seconds |
49
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 |
50
+ ./spec/rspec_matchers_spec.rb[1:7:1:3] | passed | 0.00004 seconds |
51
+ ./spec/rspec_matchers_spec.rb[1:7:2:1] | passed | 0.00096 seconds |
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: simple_authorize
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.1.0
4
+ version: 1.1.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Scott
@@ -92,6 +92,7 @@ files:
92
92
  - ".overcommit.yml"
93
93
  - ".simplecov"
94
94
  - CHANGELOG.md
95
+ - CLAUDE.md
95
96
  - CODE_OF_CONDUCT.md
96
97
  - CONTRIBUTING.md
97
98
  - LICENSE.txt
@@ -110,6 +111,12 @@ files:
110
111
  - lib/simple_authorize/configuration.rb
111
112
  - lib/simple_authorize/controller.rb
112
113
  - lib/simple_authorize/policy.rb
114
+ - lib/simple_authorize/policy_modules.rb
115
+ - lib/simple_authorize/policy_modules/approvable.rb
116
+ - lib/simple_authorize/policy_modules/ownable.rb
117
+ - lib/simple_authorize/policy_modules/publishable.rb
118
+ - lib/simple_authorize/policy_modules/soft_deletable.rb
119
+ - lib/simple_authorize/policy_modules/timestamped.rb
113
120
  - lib/simple_authorize/railtie.rb
114
121
  - lib/simple_authorize/rspec.rb
115
122
  - lib/simple_authorize/test_helpers.rb