pundit 2.5.0 → 2.5.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.
Files changed (82) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +5 -0
  3. data/README.md +1 -1
  4. data/lib/pundit/authorization.rb +18 -0
  5. data/lib/pundit/cache_store/legacy_store.rb +3 -0
  6. data/lib/pundit/cache_store/null_store.rb +3 -0
  7. data/lib/pundit/cache_store.rb +2 -0
  8. data/lib/pundit/context.rb +13 -0
  9. data/lib/pundit/error.rb +71 -0
  10. data/lib/pundit/helper.rb +16 -0
  11. data/lib/pundit/policy_finder.rb +11 -0
  12. data/lib/pundit/railtie.rb +1 -0
  13. data/lib/pundit/rspec.rb +2 -0
  14. data/lib/pundit/version.rb +1 -1
  15. data/lib/pundit.rb +10 -69
  16. metadata +4 -68
  17. data/.github/ISSUE_TEMPLATE/bug_report.md +0 -20
  18. data/.github/ISSUE_TEMPLATE/feature_request.md +0 -26
  19. data/.github/PULL_REQUEST_TEMPLATE/gem_release_template.md +0 -8
  20. data/.github/pull_request_template.md +0 -9
  21. data/.github/workflows/main.yml +0 -147
  22. data/.github/workflows/push_gem.yml +0 -33
  23. data/.gitignore +0 -19
  24. data/.rubocop.yml +0 -73
  25. data/.rubocop_ignore_git.yml +0 -7
  26. data/.yardopts +0 -1
  27. data/CODE_OF_CONDUCT.md +0 -28
  28. data/CONTRIBUTING.md +0 -31
  29. data/Gemfile +0 -28
  30. data/Rakefile +0 -21
  31. data/config/rubocop-rspec.yml +0 -5
  32. data/pundit.gemspec +0 -31
  33. data/spec/authorization_spec.rb +0 -331
  34. data/spec/generators_spec.rb +0 -43
  35. data/spec/policies/post_policy_spec.rb +0 -49
  36. data/spec/policy_finder_spec.rb +0 -191
  37. data/spec/pundit/helper_spec.rb +0 -18
  38. data/spec/pundit_spec.rb +0 -474
  39. data/spec/rspec_dsl_spec.rb +0 -81
  40. data/spec/simple_cov_check_action_formatter.rb +0 -79
  41. data/spec/spec_helper.rb +0 -35
  42. data/spec/support/lib/controller.rb +0 -38
  43. data/spec/support/lib/custom_cache.rb +0 -19
  44. data/spec/support/lib/instance_tracking.rb +0 -20
  45. data/spec/support/models/article.rb +0 -4
  46. data/spec/support/models/article_tag.rb +0 -7
  47. data/spec/support/models/artificial_blog.rb +0 -7
  48. data/spec/support/models/blog.rb +0 -4
  49. data/spec/support/models/comment.rb +0 -5
  50. data/spec/support/models/comment_four_five_six.rb +0 -5
  51. data/spec/support/models/comment_scope.rb +0 -13
  52. data/spec/support/models/comments_relation.rb +0 -15
  53. data/spec/support/models/customer/post.rb +0 -11
  54. data/spec/support/models/default_scope_contains_error.rb +0 -5
  55. data/spec/support/models/dummy_current_user.rb +0 -7
  56. data/spec/support/models/foo.rb +0 -4
  57. data/spec/support/models/post.rb +0 -25
  58. data/spec/support/models/post_four_five_six.rb +0 -9
  59. data/spec/support/models/project_one_two_three/avatar_four_five_six.rb +0 -7
  60. data/spec/support/models/project_one_two_three/tag_four_five_six.rb +0 -11
  61. data/spec/support/models/wiki.rb +0 -4
  62. data/spec/support/policies/article_tag_other_name_policy.rb +0 -13
  63. data/spec/support/policies/base_policy.rb +0 -23
  64. data/spec/support/policies/blog_policy.rb +0 -5
  65. data/spec/support/policies/comment_policy.rb +0 -11
  66. data/spec/support/policies/criteria_policy.rb +0 -5
  67. data/spec/support/policies/default_scope_contains_error_policy.rb +0 -10
  68. data/spec/support/policies/denier_policy.rb +0 -7
  69. data/spec/support/policies/dummy_current_user_policy.rb +0 -9
  70. data/spec/support/policies/nil_class_policy.rb +0 -17
  71. data/spec/support/policies/post_policy.rb +0 -36
  72. data/spec/support/policies/project/admin/comment_policy.rb +0 -15
  73. data/spec/support/policies/project/comment_policy.rb +0 -17
  74. data/spec/support/policies/project/criteria_policy.rb +0 -7
  75. data/spec/support/policies/project/post_policy.rb +0 -13
  76. data/spec/support/policies/project_one_two_three/avatar_four_five_six_policy.rb +0 -6
  77. data/spec/support/policies/project_one_two_three/comment_four_five_six_policy.rb +0 -6
  78. data/spec/support/policies/project_one_two_three/criteria_four_five_six_policy.rb +0 -6
  79. data/spec/support/policies/project_one_two_three/post_four_five_six_policy.rb +0 -6
  80. data/spec/support/policies/project_one_two_three/tag_four_five_six_policy.rb +0 -6
  81. data/spec/support/policies/publication_policy.rb +0 -13
  82. data/spec/support/policies/wiki_policy.rb +0 -8
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: pundit
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.5.0
4
+ version: 2.5.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jonas Nicklas
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2025-03-03 00:00:00.000000000 Z
12
+ date: 2025-09-12 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: activesupport
@@ -33,25 +33,10 @@ executables: []
33
33
  extensions: []
34
34
  extra_rdoc_files: []
35
35
  files:
36
- - ".github/ISSUE_TEMPLATE/bug_report.md"
37
- - ".github/ISSUE_TEMPLATE/feature_request.md"
38
- - ".github/PULL_REQUEST_TEMPLATE/gem_release_template.md"
39
- - ".github/pull_request_template.md"
40
- - ".github/workflows/main.yml"
41
- - ".github/workflows/push_gem.yml"
42
- - ".gitignore"
43
- - ".rubocop.yml"
44
- - ".rubocop_ignore_git.yml"
45
- - ".yardopts"
46
36
  - CHANGELOG.md
47
- - CODE_OF_CONDUCT.md
48
- - CONTRIBUTING.md
49
- - Gemfile
50
37
  - LICENSE.txt
51
38
  - README.md
52
- - Rakefile
53
39
  - SECURITY.md
54
- - config/rubocop-rspec.yml
55
40
  - lib/generators/pundit/install/USAGE
56
41
  - lib/generators/pundit/install/install_generator.rb
57
42
  - lib/generators/pundit/install/templates/application_policy.rb.tt
@@ -68,61 +53,12 @@ files:
68
53
  - lib/pundit/cache_store/legacy_store.rb
69
54
  - lib/pundit/cache_store/null_store.rb
70
55
  - lib/pundit/context.rb
56
+ - lib/pundit/error.rb
57
+ - lib/pundit/helper.rb
71
58
  - lib/pundit/policy_finder.rb
72
59
  - lib/pundit/railtie.rb
73
60
  - lib/pundit/rspec.rb
74
61
  - lib/pundit/version.rb
75
- - pundit.gemspec
76
- - spec/authorization_spec.rb
77
- - spec/generators_spec.rb
78
- - spec/policies/post_policy_spec.rb
79
- - spec/policy_finder_spec.rb
80
- - spec/pundit/helper_spec.rb
81
- - spec/pundit_spec.rb
82
- - spec/rspec_dsl_spec.rb
83
- - spec/simple_cov_check_action_formatter.rb
84
- - spec/spec_helper.rb
85
- - spec/support/lib/controller.rb
86
- - spec/support/lib/custom_cache.rb
87
- - spec/support/lib/instance_tracking.rb
88
- - spec/support/models/article.rb
89
- - spec/support/models/article_tag.rb
90
- - spec/support/models/artificial_blog.rb
91
- - spec/support/models/blog.rb
92
- - spec/support/models/comment.rb
93
- - spec/support/models/comment_four_five_six.rb
94
- - spec/support/models/comment_scope.rb
95
- - spec/support/models/comments_relation.rb
96
- - spec/support/models/customer/post.rb
97
- - spec/support/models/default_scope_contains_error.rb
98
- - spec/support/models/dummy_current_user.rb
99
- - spec/support/models/foo.rb
100
- - spec/support/models/post.rb
101
- - spec/support/models/post_four_five_six.rb
102
- - spec/support/models/project_one_two_three/avatar_four_five_six.rb
103
- - spec/support/models/project_one_two_three/tag_four_five_six.rb
104
- - spec/support/models/wiki.rb
105
- - spec/support/policies/article_tag_other_name_policy.rb
106
- - spec/support/policies/base_policy.rb
107
- - spec/support/policies/blog_policy.rb
108
- - spec/support/policies/comment_policy.rb
109
- - spec/support/policies/criteria_policy.rb
110
- - spec/support/policies/default_scope_contains_error_policy.rb
111
- - spec/support/policies/denier_policy.rb
112
- - spec/support/policies/dummy_current_user_policy.rb
113
- - spec/support/policies/nil_class_policy.rb
114
- - spec/support/policies/post_policy.rb
115
- - spec/support/policies/project/admin/comment_policy.rb
116
- - spec/support/policies/project/comment_policy.rb
117
- - spec/support/policies/project/criteria_policy.rb
118
- - spec/support/policies/project/post_policy.rb
119
- - spec/support/policies/project_one_two_three/avatar_four_five_six_policy.rb
120
- - spec/support/policies/project_one_two_three/comment_four_five_six_policy.rb
121
- - spec/support/policies/project_one_two_three/criteria_four_five_six_policy.rb
122
- - spec/support/policies/project_one_two_three/post_four_five_six_policy.rb
123
- - spec/support/policies/project_one_two_three/tag_four_five_six_policy.rb
124
- - spec/support/policies/publication_policy.rb
125
- - spec/support/policies/wiki_policy.rb
126
62
  homepage: https://github.com/varvet/pundit
127
63
  licenses:
128
64
  - MIT
@@ -1,20 +0,0 @@
1
- ---
2
- name: Bug report
3
- about: Create a bug report to report a problem
4
- title: ''
5
- labels: problem
6
- assignees: ''
7
-
8
- ---
9
-
10
- **Describe the bug**
11
- A clear and concise description of what the bug is.
12
-
13
- **To Reproduce**
14
- Steps or runnable code to reproduce the problem.
15
-
16
- **Expected behavior**
17
- A clear and concise description of what you expected to happen.
18
-
19
- **Additional context**
20
- Add any other context about the problem here.
@@ -1,26 +0,0 @@
1
- ---
2
- name: Feature request
3
- about: Suggest an idea
4
- title: ''
5
- labels: ['feature request']
6
- assignees: ''
7
- ---
8
-
9
- **Please consider**
10
- - Could this feature break backwards-compatibility?
11
- - Could this feature benefit the many who use Pundit?
12
- - Could this feature be useful in _most_ projects that use Pundit?
13
- - Would this feature require Rails?
14
- - Am I open to creating a Pull Request with the necessary changes?
15
-
16
- **Is your feature request related to a problem? Please describe.**
17
- A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
18
-
19
- **Describe the solution you'd like**
20
- A clear and concise description of how you'd like to approach solving the problem.
21
-
22
- **Describe alternatives you've considered**
23
- A clear and concise description of any alternative solutions or features you've considered.
24
-
25
- **Additional context**
26
- Add any other context. Ex. if you've solved this problem in your own projects already, how that worked, and why the feature should be moved and maintained in Pundit instead.
@@ -1,8 +0,0 @@
1
- ## To do
2
-
3
- - [ ] Make changes:
4
- - [ ] Bump `Pundit::VERSION` in `lib/pundit/version.rb`.
5
- - [ ] Update `CHANGELOG.md`.
6
- - [ ] Open pull request 🚀 and merge it.
7
- - [ ] Run [push gem](https://github.com/varvet/pundit/actions/workflows/push_gem.yml) GitHub Action.
8
- - [ ] Make an announcement in [Pundit discussions](https://github.com/varvet/pundit/discussions/categories/announcements)
@@ -1,9 +0,0 @@
1
- ## To do
2
-
3
- - [ ] I have read the [contributing guidelines](https://github.com/varvet/pundit/contribute).
4
- - [ ] I have added relevant tests.
5
- - [ ] I have adjusted relevant documentation.
6
- - [ ] I have made sure the individual commits are meaningful.
7
- - [ ] I have added relevant lines to the CHANGELOG.
8
-
9
- PS: Thank you for contributing to Pundit ❤️
@@ -1,147 +0,0 @@
1
- name: Main
2
-
3
- on:
4
- push:
5
- branches: ["main"]
6
- pull_request:
7
- workflow_dispatch:
8
-
9
- permissions:
10
- contents: read
11
-
12
- env:
13
- CC_TEST_REPORTER_ID: "ac477089fe20ab4fc7e0d304cab75f72d73d58a7596d366935d18fcc7d51f8f9"
14
-
15
- # `github.ref` points to the *merge commit* when running tests on a pull request, which will be a commit
16
- # that doesn't exists in our code base. Since this workflow triggers from a PR, we use the HEAD SHA instead.
17
- #
18
- # NOTE: These are both used by Code Climate (cc-test-reporter).
19
- GIT_COMMIT_SHA: ${{ github.event.pull_request.head.sha }}
20
- GIT_BRANCH: ${{ github.head_ref }}
21
-
22
- jobs:
23
- matrix-test:
24
- runs-on: ubuntu-latest
25
- continue-on-error: ${{ matrix.allow-failure || false }}
26
- strategy:
27
- fail-fast: false
28
- matrix:
29
- ruby-version:
30
- - "3.1"
31
- - "3.2"
32
- - "3.3"
33
- - "jruby-9.3.15"
34
- - "jruby"
35
- include: # HEAD-versions
36
- - ruby-version: "head"
37
- allow-failure: true
38
- - ruby-version: "jruby-head"
39
- allow-failure: true
40
- - ruby-version: "truffleruby-head"
41
- allow-failure: true
42
-
43
- steps:
44
- - uses: actions/checkout@v4
45
- - name: Set up Ruby
46
- uses: ruby/setup-ruby@v1
47
- with:
48
- rubygems: latest
49
- ruby-version: ${{ matrix.ruby-version }}
50
- bundler-cache: true
51
- - name: Run tests
52
- run: bundle exec rspec
53
-
54
- test:
55
- runs-on: ubuntu-latest
56
- steps:
57
- - uses: actions/checkout@v4
58
- - name: Set up Ruby
59
- uses: ruby/setup-ruby@v1
60
- with:
61
- rubygems: latest
62
- ruby-version: "ruby"
63
- bundler-cache: true
64
- - name: "Download cc-test-reporter from codeclimate.com"
65
- run: |
66
- curl -L https://codeclimate.com/downloads/test-reporter/test-reporter-latest-linux-amd64 > ./cc-test-reporter
67
- chmod +x ./cc-test-reporter
68
- - name: "Report to Code Climate that we will send a coverage report."
69
- run: ./cc-test-reporter before-build
70
- - name: Run tests
71
- run: bundle exec rspec
72
- env:
73
- COVERAGE: 1
74
- - name: Upload coverage results
75
- uses: actions/upload-artifact@v4
76
- with:
77
- include-hidden-files: true
78
- name: coverage-results
79
- path: coverage
80
- retention-days: 1
81
- - name: Upload code coverage to Code Climate
82
- run: |
83
- ./cc-test-reporter after-build \
84
- --coverage-input-type simplecov \
85
- ./coverage/.resultset.json
86
-
87
- coverage-check:
88
- permissions:
89
- contents: read
90
- checks: write
91
- needs: test
92
- runs-on: ubuntu-latest
93
- steps:
94
- - uses: actions/checkout@v4
95
- - name: Download coverage results
96
- uses: actions/download-artifact@v4
97
- with:
98
- name: coverage-results
99
- path: coverage
100
- - uses: joshmfrankel/simplecov-check-action@be89e11889202cc59efb14aab2a7091622fa9aad
101
- with:
102
- github_token: ${{ secrets.GITHUB_TOKEN }}
103
- minimum_suite_coverage: 100
104
- minimum_file_coverage: 100
105
- coverage_json_path: coverage/simplecov-check-action.json
106
-
107
- rubocop:
108
- runs-on: ubuntu-latest
109
- steps:
110
- - uses: actions/checkout@v4
111
- - name: Set up Ruby
112
- uses: ruby/setup-ruby@v1
113
- with:
114
- rubygems: default
115
- ruby-version: "ruby"
116
- bundler-cache: false
117
- - run: bundle install
118
- - name: Run RuboCop
119
- run: bundle exec rubocop
120
-
121
- docs:
122
- runs-on: ubuntu-latest
123
- steps:
124
- - uses: actions/checkout@v4
125
- - name: Set up Ruby
126
- uses: ruby/setup-ruby@v1
127
- with:
128
- rubygems: default
129
- ruby-version: "ruby"
130
- bundler-cache: false
131
- - run: bundle install
132
- - run: rake yard
133
-
134
- required-checks:
135
- runs-on: ubuntu-latest
136
- if: ${{ always() }}
137
- needs:
138
- - test
139
- - matrix-test
140
- - docs
141
- - rubocop
142
- steps:
143
- - name: failure
144
- if: ${{ failure() || contains(needs.*.result, 'failure') }}
145
- run: exit 1
146
- - name: success
147
- run: exit 0
@@ -1,33 +0,0 @@
1
- name: Push Gem
2
-
3
- on:
4
- workflow_dispatch:
5
-
6
- permissions:
7
- contents: read
8
-
9
- jobs:
10
- push:
11
- if: github.repository == 'varvet/pundit'
12
- runs-on: ubuntu-latest
13
-
14
- permissions:
15
- contents: write
16
- id-token: write
17
-
18
- steps:
19
- # Set up
20
- - name: Harden Runner
21
- uses: step-security/harden-runner@5c7944e73c4c2a096b17a9cb74d65b6c2bbafbde # v2.9.1
22
- with:
23
- egress-policy: audit
24
-
25
- - uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
26
- - name: Set up Ruby
27
- uses: ruby/setup-ruby@a6e6f86333f0a2523ece813039b8b4be04560854 # v1.190.0
28
- with:
29
- bundler-cache: true
30
- ruby-version: ruby
31
-
32
- # Release
33
- - uses: rubygems/release-gem@612653d273a73bdae1df8453e090060bb4db5f31 # v1+ unreleased
data/.gitignore DELETED
@@ -1,19 +0,0 @@
1
- *.gem
2
- *.rbc
3
- .bundle
4
- .config
5
- .coverage
6
- .yardoc
7
- Gemfile.lock
8
- InstalledFiles
9
- _yardoc
10
- coverage
11
- doc/
12
- lib/bundler/man
13
- pkg
14
- rdoc
15
- spec/reports
16
- test/tmp
17
- test/version_tmp
18
- tmp
19
- bin
data/.rubocop.yml DELETED
@@ -1,73 +0,0 @@
1
- inherit_from: .rubocop_ignore_git.yml
2
-
3
- AllCops:
4
- TargetRubyVersion: 3.1
5
- SuggestExtensions: false
6
- NewCops: disable
7
-
8
- Gemspec/DeprecatedAttributeAssignment:
9
- Enabled: true
10
-
11
- Gemspec/DevelopmentDependencies:
12
- Enabled: true
13
-
14
- Metrics/BlockLength:
15
- Exclude:
16
- - "**/*_spec.rb"
17
- - pundit.gemspec
18
-
19
- Metrics/MethodLength:
20
- Max: 40
21
-
22
- Metrics/ModuleLength:
23
- Max: 200
24
- Exclude:
25
- - "**/*_spec.rb"
26
-
27
- Layout/LineLength:
28
- Max: 120
29
-
30
- Gemspec/RequiredRubyVersion:
31
- Enabled: false
32
-
33
- Layout/ParameterAlignment:
34
- EnforcedStyle: with_fixed_indentation
35
-
36
- Layout/CaseIndentation:
37
- EnforcedStyle: case
38
- SupportedStyles:
39
- - case
40
- - end
41
- IndentOneStep: true
42
-
43
- Layout/FirstArrayElementIndentation:
44
- EnforcedStyle: consistent
45
-
46
- Layout/FirstHashElementIndentation:
47
- EnforcedStyle: consistent
48
-
49
- Layout/EndAlignment:
50
- EnforcedStyleAlignWith: variable
51
-
52
- Style/PercentLiteralDelimiters:
53
- PreferredDelimiters:
54
- "%w": "[]"
55
- "%W": "[]"
56
-
57
- Style/StringLiterals:
58
- EnforcedStyle: double_quotes
59
-
60
- Style/StringLiteralsInInterpolation:
61
- EnforcedStyle: double_quotes
62
-
63
- Style/StructInheritance:
64
- Enabled: false
65
-
66
- Style/DoubleNegation:
67
- Enabled: false
68
-
69
- Style/Documentation:
70
- Enabled: false # TODO: Enable again once we have more docs
71
-
72
- Style/HashSyntax:
73
- EnforcedShorthandSyntax: never
@@ -1,7 +0,0 @@
1
- # This is here so we can keep YAML syntax highlight in the main file.
2
- AllCops:
3
- Exclude:
4
- - "lib/generators/**/templates/**/*"
5
- <% `git status --ignored --porcelain`.lines.grep(/^!! /).each do |path| %>
6
- - <%= path.sub(/^!! /, '').sub(/\/$/, '/**/*') %>
7
- <% end %>
data/.yardopts DELETED
@@ -1 +0,0 @@
1
- --no-private --private --protected --hide-void-return --markup markdown --fail-on-warning
data/CODE_OF_CONDUCT.md DELETED
@@ -1,28 +0,0 @@
1
- # Contributor Code of Conduct
2
-
3
- As contributors and maintainers of this project, we pledge to respect all
4
- people who contribute through reporting issues, posting feature requests,
5
- updating documentation, submitting pull requests or patches, and other
6
- activities.
7
-
8
- We are committed to making participation in this project a harassment-free
9
- experience for everyone, regardless of level of experience, gender, gender
10
- identity and expression, sexual orientation, disability, personal appearance,
11
- body size, race, age, or religion.
12
-
13
- Examples of unacceptable behavior by participants include the use of sexual
14
- language or imagery, derogatory comments or personal attacks, trolling, public
15
- or private harassment, insults, or other unprofessional conduct.
16
-
17
- Project maintainers have the right and responsibility to remove, edit, or
18
- reject comments, commits, code, wiki edits, issues, and other contributions
19
- that are not aligned to this Code of Conduct. Project maintainers who do not
20
- follow the Code of Conduct may be removed from the project team.
21
-
22
- Instances of abusive, harassing, or otherwise unacceptable behavior may be
23
- reported by opening an issue or contacting one or more of the project
24
- maintainers.
25
-
26
- This Code of Conduct is adapted from the [Contributor
27
- Covenant](http:contributor-covenant.org), version 1.0.0, available at
28
- [https://contributor-covenant.org/version/1/0/0/](https://contributor-covenant.org/version/1/0/0/)
data/CONTRIBUTING.md DELETED
@@ -1,31 +0,0 @@
1
- ## Security issues
2
-
3
- If you have found a security related issue, please do not file an issue on GitHub or send a PR addressing the issue. Refer to [SECURITY.md](./SECURITY.md) for instructions.
4
-
5
- ## Reporting issues
6
-
7
- Please try to answer the following questions in your bug report:
8
-
9
- - What did you do?
10
- - What did you expect to happen?
11
- - What happened instead?
12
-
13
- Make sure to include as much relevant information as possible. Ruby version,
14
- Pundit version, OS version and any stack traces you have are very valuable.
15
-
16
- ## Pull Requests
17
-
18
- - **Add tests!** Your patch won't be accepted if it doesn't have tests.
19
-
20
- - **Document any change in behaviour**. Make sure the README and any other
21
- relevant documentation are kept up-to-date.
22
-
23
- - **Create topic branches**. Please don't ask us to pull from your main branch.
24
-
25
- - **One pull request per feature**. If you want to do more than one thing, send
26
- multiple pull requests.
27
-
28
- - **Send coherent history**. Make sure each individual commit in your pull
29
- request is meaningful. If you had to make multiple intermediate commits while
30
- developing, please squash them before sending them to us.
31
- - **Update the CHANGELOG.** Don't forget to add your new changes to the CHANGELOG.
data/Gemfile DELETED
@@ -1,28 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- source "https://rubygems.org"
4
-
5
- gemspec
6
-
7
- # Rails-related - for testing purposes
8
- gem "actionpack", ">= 3.0.0" # Used to test strong parameters
9
- gem "activemodel", ">= 3.0.0" # Used to test ActiveModel::Naming
10
- gem "railties", ">= 3.0.0" # Used to test generators
11
-
12
- # Testing
13
- gem "rspec", ">= 3.0.0"
14
- gem "simplecov", ">= 0.17.0"
15
-
16
- # Development tools
17
- gem "bundler"
18
- gem "rake"
19
- gem "rubocop"
20
- gem "rubocop-performance"
21
- gem "rubocop-rspec"
22
- gem "yard"
23
- gem "zeitwerk"
24
-
25
- # Affects us on JRuby 9.3.15.
26
- #
27
- # @see https://github.com/rails/rails/issues/54260
28
- gem "logger"
data/Rakefile DELETED
@@ -1,21 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- require "rubygems"
4
- require "bundler/gem_tasks"
5
- require "rspec/core/rake_task"
6
- require "yard"
7
- require "rubocop/rake_task"
8
-
9
- RuboCop::RakeTask.new
10
-
11
- desc "Run all examples"
12
- RSpec::Core::RakeTask.new(:spec) do |t|
13
- t.rspec_opts = %w[--color]
14
- end
15
-
16
- YARD::Rake::YardocTask.new do |t|
17
- t.files = ["lib/**/*.rb"]
18
- t.stats_options = ["--list-undoc"]
19
- end
20
-
21
- task default: :spec
@@ -1,5 +0,0 @@
1
- RSpec:
2
- Language:
3
- ExampleGroups:
4
- Regular:
5
- - permissions
data/pundit.gemspec DELETED
@@ -1,31 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- lib = File.expand_path("lib", __dir__)
4
- $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
5
- require "pundit/version"
6
-
7
- Gem::Specification.new do |gem|
8
- gem.name = "pundit"
9
- gem.version = Pundit::VERSION
10
- gem.authors = ["Jonas Nicklas", "Varvet AB"]
11
- gem.email = ["jonas.nicklas@gmail.com", "info@varvet.com"]
12
- gem.description = "Object oriented authorization for Rails applications"
13
- gem.summary = "OO authorization for Rails"
14
- gem.homepage = "https://github.com/varvet/pundit"
15
- gem.license = "MIT"
16
-
17
- gem.files = `git ls-files`.split($INPUT_RECORD_SEPARATOR)
18
- gem.executables = gem.files.grep(%r{^bin/}).map { |f| File.basename(f) }
19
- gem.require_paths = ["lib"]
20
-
21
- gem.metadata = {
22
- "rubygems_mfa_required" => "true",
23
- "bug_tracker_uri" => "https://github.com/varvet/pundit/issues",
24
- "changelog_uri" => "https://github.com/varvet/pundit/blob/main/CHANGELOG.md",
25
- "documentation_uri" => "https://github.com/varvet/pundit/blob/main/README.md",
26
- "homepage_uri" => "https://github.com/varvet/pundit",
27
- "source_code_uri" => "https://github.com/varvet/pundit"
28
- }
29
-
30
- gem.add_dependency "activesupport", ">= 3.0.0"
31
- end