kant 0.0.5 → 0.0.6
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +5 -5
- data/.travis.yml +14 -0
- data/README.md +1 -1
- data/kant.gemspec +4 -4
- data/lib/kant/all_access.rb +1 -1
- data/lib/kant/version.rb +1 -1
- data/spec/kant/policy_access_spec.rb +4 -1
- metadata +16 -16
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: 68ec4aab07bd2a439486323f6786768abd9cc88d70f52c52123ee8a51106cdca
|
4
|
+
data.tar.gz: 562cda2f7eacf2dc4503c74affc2e93aae25589bd7c8556d0dac15f636b06cfb
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 84c9056712e89db73be4428943c572dc4a778ec4c6415cb01b095d9cf981b92fe32cbd4920b6c15421bb3f0449bd5c4c56ac8606eba35845460ba5aae2927b44
|
7
|
+
data.tar.gz: aa16b2826f4defef93aa6a00c50fd65d7e806d973030cf38ca0b03e85ca56e726cf10eb3af21c68627d60f5e644502ccca86e6adb27b43081bc73c7ea220ae86
|
data/.travis.yml
ADDED
data/README.md
CHANGED
data/kant.gemspec
CHANGED
@@ -18,10 +18,10 @@ Gem::Specification.new do |spec|
|
|
18
18
|
spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
|
19
19
|
spec.require_paths = ["lib"]
|
20
20
|
|
21
|
-
spec.add_development_dependency "bundler", "
|
21
|
+
spec.add_development_dependency "bundler", ">= 1.7"
|
22
22
|
spec.add_development_dependency "rake", "~> 10.0"
|
23
23
|
spec.add_development_dependency "rspec", "~> 3.1.0"
|
24
|
-
spec.add_development_dependency "with_model", "~>
|
25
|
-
spec.add_development_dependency "sqlite3", "
|
26
|
-
spec.add_development_dependency "activerecord", "
|
24
|
+
spec.add_development_dependency "with_model", "~> 2.1"
|
25
|
+
spec.add_development_dependency "sqlite3", ">= 1.4"
|
26
|
+
spec.add_development_dependency "activerecord", "~> 6.1"
|
27
27
|
end
|
data/lib/kant/all_access.rb
CHANGED
data/lib/kant/version.rb
CHANGED
@@ -193,7 +193,10 @@ describe Kant::PolicyAccess do
|
|
193
193
|
# end
|
194
194
|
# end
|
195
195
|
todo_policy = Class.new do
|
196
|
-
define_singleton_method(:readable_as_owner) do |todos, user,
|
196
|
+
define_singleton_method(:readable_as_owner) do |todos, user, options = {}|
|
197
|
+
project = options[:project]
|
198
|
+
fail ArgumentError if !project
|
199
|
+
|
197
200
|
if project.owner_id == user.id
|
198
201
|
todos.where(project_id: project.id, completed: true)
|
199
202
|
else
|
metadata
CHANGED
@@ -1,27 +1,27 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: kant
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.6
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Mark Przepiora
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2022-08-25 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
15
15
|
requirement: !ruby/object:Gem::Requirement
|
16
16
|
requirements:
|
17
|
-
- - "
|
17
|
+
- - ">="
|
18
18
|
- !ruby/object:Gem::Version
|
19
19
|
version: '1.7'
|
20
20
|
type: :development
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
|
-
- - "
|
24
|
+
- - ">="
|
25
25
|
- !ruby/object:Gem::Version
|
26
26
|
version: '1.7'
|
27
27
|
- !ruby/object:Gem::Dependency
|
@@ -58,42 +58,42 @@ dependencies:
|
|
58
58
|
requirements:
|
59
59
|
- - "~>"
|
60
60
|
- !ruby/object:Gem::Version
|
61
|
-
version:
|
61
|
+
version: '2.1'
|
62
62
|
type: :development
|
63
63
|
prerelease: false
|
64
64
|
version_requirements: !ruby/object:Gem::Requirement
|
65
65
|
requirements:
|
66
66
|
- - "~>"
|
67
67
|
- !ruby/object:Gem::Version
|
68
|
-
version:
|
68
|
+
version: '2.1'
|
69
69
|
- !ruby/object:Gem::Dependency
|
70
70
|
name: sqlite3
|
71
71
|
requirement: !ruby/object:Gem::Requirement
|
72
72
|
requirements:
|
73
|
-
- - "
|
73
|
+
- - ">="
|
74
74
|
- !ruby/object:Gem::Version
|
75
|
-
version: 1.
|
75
|
+
version: '1.4'
|
76
76
|
type: :development
|
77
77
|
prerelease: false
|
78
78
|
version_requirements: !ruby/object:Gem::Requirement
|
79
79
|
requirements:
|
80
|
-
- - "
|
80
|
+
- - ">="
|
81
81
|
- !ruby/object:Gem::Version
|
82
|
-
version: 1.
|
82
|
+
version: '1.4'
|
83
83
|
- !ruby/object:Gem::Dependency
|
84
84
|
name: activerecord
|
85
85
|
requirement: !ruby/object:Gem::Requirement
|
86
86
|
requirements:
|
87
|
-
- - "
|
87
|
+
- - "~>"
|
88
88
|
- !ruby/object:Gem::Version
|
89
|
-
version: '
|
89
|
+
version: '6.1'
|
90
90
|
type: :development
|
91
91
|
prerelease: false
|
92
92
|
version_requirements: !ruby/object:Gem::Requirement
|
93
93
|
requirements:
|
94
|
-
- - "
|
94
|
+
- - "~>"
|
95
95
|
- !ruby/object:Gem::Version
|
96
|
-
version: '
|
96
|
+
version: '6.1'
|
97
97
|
description: Kant is a tiny authorization library for your Ruby (especially Rails
|
98
98
|
and/or ActiveRecord) projects.
|
99
99
|
email:
|
@@ -103,6 +103,7 @@ extensions: []
|
|
103
103
|
extra_rdoc_files: []
|
104
104
|
files:
|
105
105
|
- ".gitignore"
|
106
|
+
- ".travis.yml"
|
106
107
|
- Gemfile
|
107
108
|
- LICENSE.txt
|
108
109
|
- README.md
|
@@ -142,8 +143,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
142
143
|
- !ruby/object:Gem::Version
|
143
144
|
version: '0'
|
144
145
|
requirements: []
|
145
|
-
|
146
|
-
rubygems_version: 2.4.5.1
|
146
|
+
rubygems_version: 3.1.6
|
147
147
|
signing_key:
|
148
148
|
specification_version: 4
|
149
149
|
summary: A tiny, non-magical authorization library
|