piko-pro-gem 0.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.
Files changed (31) hide show
  1. checksums.yaml +7 -0
  2. data/piko-pro-gem.gemspec +12 -0
  3. data/pundit-2.5.2/CHANGELOG.md +196 -0
  4. data/pundit-2.5.2/CONTRIBUTING.md +31 -0
  5. data/pundit-2.5.2/LICENSE.txt +22 -0
  6. data/pundit-2.5.2/README.md +891 -0
  7. data/pundit-2.5.2/SECURITY.md +19 -0
  8. data/pundit-2.5.2/config/rubocop-rspec.yml +5 -0
  9. data/pundit-2.5.2/lib/generators/pundit/install/USAGE +2 -0
  10. data/pundit-2.5.2/lib/generators/pundit/install/install_generator.rb +15 -0
  11. data/pundit-2.5.2/lib/generators/pundit/install/templates/application_policy.rb.tt +53 -0
  12. data/pundit-2.5.2/lib/generators/pundit/policy/USAGE +8 -0
  13. data/pundit-2.5.2/lib/generators/pundit/policy/policy_generator.rb +17 -0
  14. data/pundit-2.5.2/lib/generators/pundit/policy/templates/policy.rb.tt +16 -0
  15. data/pundit-2.5.2/lib/generators/rspec/policy_generator.rb +16 -0
  16. data/pundit-2.5.2/lib/generators/rspec/templates/policy_spec.rb.tt +27 -0
  17. data/pundit-2.5.2/lib/generators/test_unit/policy_generator.rb +16 -0
  18. data/pundit-2.5.2/lib/generators/test_unit/templates/policy_test.rb.tt +18 -0
  19. data/pundit-2.5.2/lib/pundit/authorization.rb +269 -0
  20. data/pundit-2.5.2/lib/pundit/cache_store/legacy_store.rb +27 -0
  21. data/pundit-2.5.2/lib/pundit/cache_store/null_store.rb +30 -0
  22. data/pundit-2.5.2/lib/pundit/cache_store.rb +24 -0
  23. data/pundit-2.5.2/lib/pundit/context.rb +190 -0
  24. data/pundit-2.5.2/lib/pundit/error.rb +71 -0
  25. data/pundit-2.5.2/lib/pundit/helper.rb +16 -0
  26. data/pundit-2.5.2/lib/pundit/policy_finder.rb +135 -0
  27. data/pundit-2.5.2/lib/pundit/railtie.rb +20 -0
  28. data/pundit-2.5.2/lib/pundit/rspec.rb +165 -0
  29. data/pundit-2.5.2/lib/pundit/version.rb +6 -0
  30. data/pundit-2.5.2/lib/pundit.rb +77 -0
  31. metadata +70 -0
checksums.yaml ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA256:
3
+ metadata.gz: 882b5190a975e8b3959013bd46d129de35277dd02508453b550bbd92548b43a0
4
+ data.tar.gz: d0bf2c235469f71b596d9e490cb67235808d001f27034c77862da4cd5792d49b
5
+ SHA512:
6
+ metadata.gz: 965fda5fa220fa8fdd505e620b7b0e6459f162d303c1c9ec2027f310a52a4f8b04b4df24bb17129177b1ec507c8c801ac32a027f491ffb54f9ad50c666aa55dd
7
+ data.tar.gz: f870e04a4c44f4ae3596e0fceef1c095912c20ac92a2fed31fdb7e1d8b32353925a0e7187031e62896c0f8691c9864d5e2b05bca92338643b7fcce350bd2650a
@@ -0,0 +1,12 @@
1
+ Gem::Specification.new do |s|
2
+ s.name = "piko-pro-gem"
3
+ s.version = "0.0.1"
4
+ s.summary = "Research test"
5
+ s.description = "University research based on pundit"
6
+ s.authors = ["Andrey78"]
7
+ s.email = ["cakoc614@gmail.com"]
8
+ s.files = Dir.glob("**/*").reject { |f| f.end_with?('.gem') }
9
+ s.homepage = "https://rubygems.org/profiles/Andrey78"
10
+ s.license = "MIT"
11
+ s.metadata = { "source_code_uri" => "https://github.com/Andrey78/piko-pro-gem" }
12
+ end
@@ -0,0 +1,196 @@
1
+ # Pundit
2
+
3
+ ## Unreleased
4
+
5
+ ## 2.5.2 (2025-09-24)
6
+
7
+ ### Fixed
8
+ - Added `config/rubocop-rspec.yml` back from accidentally being excluded [#866](https://github.com/varvet/pundit/issues/866)
9
+
10
+ ## 2.5.1 (2025-09-12)
11
+
12
+ ### Fixed
13
+ - Requiring only `pundit/rspec` no longer raises an error in Active Support [#857](https://github.com/varvet/pundit/issues/857)
14
+
15
+ ## 2.5.0 (2025-03-03)
16
+
17
+ ### Added
18
+
19
+ - Add `Pundit::Authorization#pundit_reset!` hook to reset the policy and policy scope cache. [#830](https://github.com/varvet/pundit/issues/830)
20
+ - Add links to gemspec. [#845](https://github.com/varvet/pundit/issues/845)
21
+ - Register policies directories for Rails 8 code statistics [#833](https://github.com/varvet/pundit/issues/833)
22
+ - Added an example for how to use pundit with Rails 8 authentication generator [#850](https://github.com/varvet/pundit/issues/850)
23
+
24
+ ### Changed
25
+
26
+ - Deprecated `Pundit::SUFFIX`, moved it to `Pundit::PolicyFinder::SUFFIX` [#835](https://github.com/varvet/pundit/issues/835)
27
+ - Explicitly require less of `active_support` [#837](https://github.com/varvet/pundit/issues/837)
28
+ - Using `permit` matcher without a surrouding `permissions` block now raises a useful error. [#836](https://github.com/varvet/pundit/issues/836)
29
+
30
+ ### Fixed
31
+
32
+ - Using a hash as custom cache in `Pundit.authorize` now works as documented. [#838](https://github.com/varvet/pundit/issues/838)
33
+
34
+ ## 2.4.0 (2024-08-26)
35
+
36
+ ### Changed
37
+
38
+ - Improve the `NotAuthorizedError` message to include the policy class.
39
+ Furthermore, in the case where the record passed is a class instead of an instance, the class name is given. [#812](https://github.com/varvet/pundit/issues/812)
40
+
41
+ ### Added
42
+
43
+ - Add customizable permit matcher description [#806](https://github.com/varvet/pundit/issues/806)
44
+ - Add support for filter_run_when_matching :focus with permissions helper. [#820](https://github.com/varvet/pundit/issues/820)
45
+
46
+ ## 2.3.2 (2024-05-08)
47
+
48
+ - Refactor: First pass of Pundit::Context [#797](https://github.com/varvet/pundit/issues/797)
49
+
50
+ ### Changed
51
+
52
+ - Update `ApplicationPolicy` generator to qualify the `Scope` class name [#792](https://github.com/varvet/pundit/issues/792)
53
+ - Policy generator uses `NoMethodError` to indicate `#resolve` is not implemented [#776](https://github.com/varvet/pundit/issues/776)
54
+
55
+ ## Deprecated
56
+
57
+ - Dropped support for Ruby 3.0 [#796](https://github.com/varvet/pundit/issues/796)
58
+
59
+ ## 2.3.1 (2023-07-17)
60
+
61
+ ### Fixed
62
+
63
+ - Use `Kernel.warn` instead of `ActiveSupport::Deprecation.warn` for deprecations [#764](https://github.com/varvet/pundit/issues/764)
64
+ - Policy generator now works on Ruby 3.2 [#754](https://github.com/varvet/pundit/issues/754)
65
+
66
+ ## 2.3.0 (2022-12-19)
67
+
68
+ ### Added
69
+
70
+ - add support for rubocop-rspec syntax extensions [#745](https://github.com/varvet/pundit/issues/745)
71
+
72
+ ## 2.2.0 (2022-02-11)
73
+
74
+ ### Fixed
75
+
76
+ - Using `policy_class` and a namespaced record now passes only the record when instantiating the policy. (#697, #689, #694, #666)
77
+
78
+ ### Changed
79
+
80
+ - Require users to explicitly define Scope#resolve in generated policies (#711, #722)
81
+
82
+ ### Deprecated
83
+
84
+ - Deprecate `include Pundit` in favor of `include Pundit::Authorization` [#621](https://github.com/varvet/pundit/issues/621)
85
+
86
+ ## 2.1.1 (2021-08-13)
87
+
88
+ Friday 13th-release!
89
+
90
+ Careful! The bugfix below [#626](https://github.com/varvet/pundit/issues/626) could break existing code. If you rely on the
91
+ return value for `authorize` and namespaced policies you might need to do some
92
+ changes.
93
+
94
+ ### Fixed
95
+
96
+ - `.authorize` and `#authorize` return the instance, even for namespaced
97
+ policies [#626](https://github.com/varvet/pundit/issues/626)
98
+
99
+ ### Changed
100
+
101
+ - Generate application scope with `protected` attr_readers. [#616](https://github.com/varvet/pundit/issues/616)
102
+
103
+ ### Removed
104
+
105
+ - Dropped support for Ruby end-of-life versions: 2.1 and 2.2. [#604](https://github.com/varvet/pundit/issues/604)
106
+ - Dropped support for Ruby end-of-life versions: 2.3 [#633](https://github.com/varvet/pundit/issues/633)
107
+ - Dropped support for Ruby end-of-life versions: 2.4, 2.5 and JRuby 9.1 [#676](https://github.com/varvet/pundit/issues/676)
108
+ - Dropped support for RSpec 2 [#615](https://github.com/varvet/pundit/issues/615)
109
+
110
+ ## 2.1.0 (2019-08-14)
111
+
112
+ ### Fixed
113
+
114
+ - Avoid name clashes with the Error class. [#590](https://github.com/varvet/pundit/issues/590)
115
+
116
+ ### Changed
117
+
118
+ - Return a safer default NotAuthorizedError message. [#583](https://github.com/varvet/pundit/issues/583)
119
+
120
+ ## 2.0.1 (2019-01-18)
121
+
122
+ ### Breaking changes
123
+
124
+ None
125
+
126
+ ### Other changes
127
+
128
+ - Improve exception handling for `#policy_scope` and `#policy_scope!`. [#550](https://github.com/varvet/pundit/issues/550)
129
+ - Add `:policy` metadata to RSpec template. [#566](https://github.com/varvet/pundit/issues/566)
130
+
131
+ ## 2.0.0 (2018-07-21)
132
+
133
+ No changes since beta1
134
+
135
+ ## 2.0.0.beta1 (2018-07-04)
136
+
137
+ ### Breaking changes
138
+
139
+ - Only pass last element of "namespace array" to policy and scope. [#529](https://github.com/varvet/pundit/issues/529)
140
+ - Raise `InvalidConstructorError` if a policy or policy scope with an invalid constructor is called. [#462](https://github.com/varvet/pundit/issues/462)
141
+ - Return passed object from `#authorize` method to make chaining possible. [#385](https://github.com/varvet/pundit/issues/385)
142
+
143
+ ### Other changes
144
+
145
+ - Add `policy_class` option to `authorize` to be able to override the policy. [#441](https://github.com/varvet/pundit/issues/441)
146
+ - Add `policy_scope_class` option to `authorize` to be able to override the policy scope. [#441](https://github.com/varvet/pundit/issues/441)
147
+ - Fix `param_key` issue when passed an array. [#529](https://github.com/varvet/pundit/issues/529)
148
+ - Allow specification of a `NilClassPolicy`. [#525](https://github.com/varvet/pundit/issues/525)
149
+ - Make sure `policy_class` override is called when passed an array. [#475](https://github.com/varvet/pundit/issues/475)
150
+
151
+ - Use `action_name` instead of `params[:action]`. [#419](https://github.com/varvet/pundit/issues/419)
152
+ - Add `pundit_params_for` method to make it easy to customize params fetching. [#502](https://github.com/varvet/pundit/issues/502)
153
+
154
+ ## 1.1.0 (2016-01-14)
155
+
156
+ - Can retrieve policies via an array of symbols/objects.
157
+ - Add autodetection of param key to `permitted_attributes` helper.
158
+ - Hide some methods which should not be actions.
159
+ - Permitted attributes should be expanded.
160
+ - Generator uses `RSpec.describe` according to modern best practices.
161
+
162
+ ## 1.0.1 (2015-05-27)
163
+
164
+ - Fixed a regression where NotAuthorizedError could not be ininitialized with a string.
165
+ - Use `camelize` instead of `classify` for symbol policies to prevent weird pluralizations.
166
+
167
+ ## 1.0.0 (2015-04-19)
168
+
169
+ - Caches policy scopes and policies.
170
+ - Explicitly setting the policy for the controller via `controller.policy = foo` has been removed. Instead use `controller.policies[record] = foo`.
171
+ - Explicitly setting the policy scope for the controller via `controller.policy_policy = foo` has been removed. Instead use `controller.policy_scopes[scope] = foo`.
172
+ - Add `permitted_attributes` helper to fetch attributes from policy.
173
+ - Add `pundit_policy_authorized?` and `pundit_policy_scoped?` methods.
174
+ - Instance variables are prefixed to avoid collisions.
175
+ - Add `Pundit.authorize` method.
176
+ - Add `skip_authorization` and `skip_policy_scope` helpers.
177
+ - Better errors when checking multiple permissions in RSpec tests.
178
+ - Better errors in case `nil` is passed to `policy` or `policy_scope`.
179
+ - Use `inspect` when printing object for better errors.
180
+ - Dropped official support for Ruby 1.9.3
181
+
182
+ ## 0.3.0 (2014-08-22)
183
+
184
+ - Extend the default `ApplicationPolicy` with an `ApplicationPolicy::Scope` [#120](https://github.com/varvet/pundit/issues/120)
185
+ - Fix RSpec 3 deprecation warnings for built-in matchers [#162](https://github.com/varvet/pundit/issues/162)
186
+ - Generate blank policy spec/test files for Rspec/MiniTest/Test::Unit in Rails [#138](https://github.com/varvet/pundit/issues/138)
187
+
188
+ ## 0.2.3 (2014-04-06)
189
+
190
+ - Customizable error messages: `#query`, `#record` and `#policy` methods on `Pundit::NotAuthorizedError` [#114](https://github.com/varvet/pundit/issues/114)
191
+ - Raise a different `Pundit::AuthorizationNotPerformedError` when `authorize` call is expected in controller action but missing [#109](https://github.com/varvet/pundit/issues/109)
192
+ - Update Rspec matchers for Rspec 3 [#124](https://github.com/varvet/pundit/issues/124)
193
+
194
+ ## 0.2.2 (2014-02-07)
195
+
196
+ - Customize the user to be passed into policies: `pundit_user` [#42](https://github.com/varvet/pundit/issues/42)
@@ -0,0 +1,31 @@
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.
@@ -0,0 +1,22 @@
1
+ Copyright (c) 2019 Jonas Nicklas, Varvet AB
2
+
3
+ MIT License
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining
6
+ a copy of this software and associated documentation files (the
7
+ "Software"), to deal in the Software without restriction, including
8
+ without limitation the rights to use, copy, modify, merge, publish,
9
+ distribute, sublicense, and/or sell copies of the Software, and to
10
+ permit persons to whom the Software is furnished to do so, subject to
11
+ the following conditions:
12
+
13
+ The above copyright notice and this permission notice shall be
14
+ included in all copies or substantial portions of the Software.
15
+
16
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
17
+ EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
18
+ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
19
+ NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
20
+ LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
21
+ OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
22
+ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.