authorized_persona 0.9.1 → 0.11.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 83c7b75e101248119260f84dc0cfabd9dc6db7a079cacf89de689d7863e12028
4
- data.tar.gz: 9d1e4c231c66e743650ae5566192a5a5aa640974d616c3f508b0f08a981ed592
3
+ metadata.gz: 1ed24355127dcd3b98f5763e523d65e578fdafb0957d4eebd51655d6c1fac4d5
4
+ data.tar.gz: f529b2dd701b51e85257a07e0b451c1c6271e714a622f90620a318d3709970db
5
5
  SHA512:
6
- metadata.gz: db6b39f1ca8cadb3e9180e17bf36eb33467c5d929144444ac9d17d2e949d13697c36a21241f4e168367c0013569699299e6322b2e85d1548ef2360c9377ff890
7
- data.tar.gz: 6300f79ee516294b170acd149d555b80c23033a29513d667511ef447e8025abccff942faf9ab55823dedc3d871daa17326c691ef4ef969d544c2958451bd5794
6
+ metadata.gz: d28d814d7f2238c6b4bfc41eb64713890bc1a5f9bd6917e4a2719df0b80fc615d366936bb3955d61ddb0d2b626ae8dd845395c7967e754b4aefd7c0d486e6287
7
+ data.tar.gz: 986de5cc04424cfdfb5662a0ba8114922b46344083e1134510c8ee844f7b5c8220cd92eb094d3e94e431691b32c0068af390a6d38acb8548a08bbfab1f09d3a3
@@ -8,11 +8,11 @@ jobs:
8
8
  strategy:
9
9
  fail-fast: false
10
10
  matrix:
11
- ruby: ['2.7', '3.0']
11
+ ruby: ['3.0', '3.2']
12
12
  gemfile:
13
- - gemfiles/rails_6_0.gemfile
14
13
  - gemfiles/rails_6_1.gemfile
15
14
  - gemfiles/rails_7_0.gemfile
15
+ - gemfiles/rails_7_1.gemfile
16
16
  steps:
17
17
  - uses: actions/checkout@v2
18
18
  - uses: ruby/setup-ruby@v1
data/.gitignore CHANGED
@@ -9,6 +9,3 @@
9
9
 
10
10
  # rspec failure tracking
11
11
  .rspec_status
12
-
13
- /Gemfile.lock
14
- *.gemfile.lock
data/.rubocop.yml CHANGED
@@ -3,3 +3,6 @@ inherit_from: .rubocop_todo.yml
3
3
  inherit_gem:
4
4
  betterlint:
5
5
  - config/default.yml
6
+
7
+ AllCops:
8
+ TargetRubyVersion: 3.0
data/.ruby-version CHANGED
@@ -1 +1 @@
1
- 3.0.6
1
+ 3.2.2
data/Appraisals CHANGED
@@ -1,7 +1,4 @@
1
- appraise 'rails-6-0' do
2
- gem 'railties', '~> 6.0.0'
3
- gem 'activemodel', '~>6.0.0'
4
- end
1
+ # frozen_string_literal: true
5
2
 
6
3
  appraise 'rails-6-1' do
7
4
  gem 'railties', '~> 6.1.0'
@@ -12,3 +9,8 @@ appraise 'rails-7-0' do
12
9
  gem 'railties', '~> 7.0.0'
13
10
  gem 'activemodel', '~>7.0.0'
14
11
  end
12
+
13
+ appraise 'rails-7-1' do
14
+ gem 'railties', '~> 7.1.0'
15
+ gem 'activemodel', '~>7.1.0'
16
+ end
data/Gemfile.lock ADDED
@@ -0,0 +1,155 @@
1
+ PATH
2
+ remote: .
3
+ specs:
4
+ authorized_persona (0.11.0)
5
+ railties (>= 6.1, < 7.2)
6
+
7
+ GEM
8
+ remote: https://rubygems.org/
9
+ specs:
10
+ actionpack (7.0.8.4)
11
+ actionview (= 7.0.8.4)
12
+ activesupport (= 7.0.8.4)
13
+ rack (~> 2.0, >= 2.2.4)
14
+ rack-test (>= 0.6.3)
15
+ rails-dom-testing (~> 2.0)
16
+ rails-html-sanitizer (~> 1.0, >= 1.2.0)
17
+ actionview (7.0.8.4)
18
+ activesupport (= 7.0.8.4)
19
+ builder (~> 3.1)
20
+ erubi (~> 1.4)
21
+ rails-dom-testing (~> 2.0)
22
+ rails-html-sanitizer (~> 1.1, >= 1.2.0)
23
+ activemodel (7.0.8.4)
24
+ activesupport (= 7.0.8.4)
25
+ activesupport (7.0.8.4)
26
+ concurrent-ruby (~> 1.0, >= 1.0.2)
27
+ i18n (>= 1.6, < 2)
28
+ minitest (>= 5.1)
29
+ tzinfo (~> 2.0)
30
+ appraisal (2.5.0)
31
+ bundler
32
+ rake
33
+ thor (>= 0.14.0)
34
+ ast (2.4.2)
35
+ betterlint (1.7.0)
36
+ rubocop (> 1.0)
37
+ rubocop-performance
38
+ rubocop-rails
39
+ rubocop-rake
40
+ rubocop-rspec (>= 2.24)
41
+ builder (3.3.0)
42
+ concurrent-ruby (1.3.4)
43
+ crass (1.0.6)
44
+ diff-lcs (1.5.0)
45
+ erubi (1.13.0)
46
+ i18n (1.14.5)
47
+ concurrent-ruby (~> 1.0)
48
+ json (2.7.1)
49
+ language_server-protocol (3.17.0.3)
50
+ loofah (2.22.0)
51
+ crass (~> 1.0.2)
52
+ nokogiri (>= 1.12.0)
53
+ method_source (1.0.0)
54
+ minitest (5.25.1)
55
+ nokogiri (1.16.7-arm64-darwin)
56
+ racc (~> 1.4)
57
+ nokogiri (1.16.7-x86_64-darwin)
58
+ racc (~> 1.4)
59
+ nokogiri (1.16.7-x86_64-linux)
60
+ racc (~> 1.4)
61
+ parallel (1.24.0)
62
+ parser (3.2.2.4)
63
+ ast (~> 2.4.1)
64
+ racc
65
+ racc (1.8.1)
66
+ rack (2.2.9)
67
+ rack-test (2.1.0)
68
+ rack (>= 1.3)
69
+ rails-dom-testing (2.2.0)
70
+ activesupport (>= 5.0.0)
71
+ minitest
72
+ nokogiri (>= 1.6)
73
+ rails-html-sanitizer (1.6.0)
74
+ loofah (~> 2.21)
75
+ nokogiri (~> 1.14)
76
+ railties (7.0.8.4)
77
+ actionpack (= 7.0.8.4)
78
+ activesupport (= 7.0.8.4)
79
+ method_source
80
+ rake (>= 12.2)
81
+ thor (~> 1.0)
82
+ zeitwerk (~> 2.5)
83
+ rainbow (3.1.1)
84
+ rake (13.1.0)
85
+ regexp_parser (2.8.3)
86
+ rexml (3.3.6)
87
+ strscan
88
+ rspec (3.12.0)
89
+ rspec-core (~> 3.12.0)
90
+ rspec-expectations (~> 3.12.0)
91
+ rspec-mocks (~> 3.12.0)
92
+ rspec-core (3.12.2)
93
+ rspec-support (~> 3.12.0)
94
+ rspec-expectations (3.12.3)
95
+ diff-lcs (>= 1.2.0, < 2.0)
96
+ rspec-support (~> 3.12.0)
97
+ rspec-mocks (3.12.6)
98
+ diff-lcs (>= 1.2.0, < 2.0)
99
+ rspec-support (~> 3.12.0)
100
+ rspec-support (3.12.1)
101
+ rubocop (1.59.0)
102
+ json (~> 2.3)
103
+ language_server-protocol (>= 3.17.0)
104
+ parallel (~> 1.10)
105
+ parser (>= 3.2.2.4)
106
+ rainbow (>= 2.2.2, < 4.0)
107
+ regexp_parser (>= 1.8, < 3.0)
108
+ rexml (>= 3.2.5, < 4.0)
109
+ rubocop-ast (>= 1.30.0, < 2.0)
110
+ ruby-progressbar (~> 1.7)
111
+ unicode-display_width (>= 2.4.0, < 3.0)
112
+ rubocop-ast (1.30.0)
113
+ parser (>= 3.2.1.0)
114
+ rubocop-capybara (2.19.0)
115
+ rubocop (~> 1.41)
116
+ rubocop-factory_bot (2.24.0)
117
+ rubocop (~> 1.33)
118
+ rubocop-performance (1.20.1)
119
+ rubocop (>= 1.48.1, < 2.0)
120
+ rubocop-ast (>= 1.30.0, < 2.0)
121
+ rubocop-rails (2.23.1)
122
+ activesupport (>= 4.2.0)
123
+ rack (>= 1.1)
124
+ rubocop (>= 1.33.0, < 2.0)
125
+ rubocop-ast (>= 1.30.0, < 2.0)
126
+ rubocop-rake (0.6.0)
127
+ rubocop (~> 1.0)
128
+ rubocop-rspec (2.25.0)
129
+ rubocop (~> 1.40)
130
+ rubocop-capybara (~> 2.17)
131
+ rubocop-factory_bot (~> 2.22)
132
+ ruby-progressbar (1.13.0)
133
+ strscan (3.1.0)
134
+ thor (1.3.0)
135
+ tzinfo (2.0.6)
136
+ concurrent-ruby (~> 1.0)
137
+ unicode-display_width (2.5.0)
138
+ zeitwerk (2.6.12)
139
+
140
+ PLATFORMS
141
+ arm64-darwin-22
142
+ x86_64-darwin-22
143
+ x86_64-linux
144
+
145
+ DEPENDENCIES
146
+ activemodel (>= 6.1, < 7.2)
147
+ appraisal
148
+ authorized_persona!
149
+ betterlint
150
+ bundler
151
+ rake
152
+ rspec (~> 3.0)
153
+
154
+ BUNDLED WITH
155
+ 2.4.21
data/README.md CHANGED
@@ -186,7 +186,7 @@ class BillSearch
186
186
  end
187
187
 
188
188
  def bills
189
- # AuthorizedPersona::Persona provides #[tier]_and_above? methods for all defined tiers
189
+ # AuthorizedPersona::Persona provides #[tier]_or_above? methods for all defined tiers
190
190
  relation = searcher.admin_or_above? ? Bills.all : Bills.nonsensitive
191
191
  relation.where('title like ?', query)
192
192
  end
data/Rakefile CHANGED
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  require "bundler/gem_tasks"
2
4
  require "rspec/core/rake_task"
3
5
 
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  lib = File.expand_path('lib', __dir__)
2
4
  $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
3
5
  require "authorized_persona/version"
@@ -11,18 +13,19 @@ Gem::Specification.new do |spec|
11
13
  spec.summary = "the simplest authorization library you will ever love"
12
14
  spec.description = "AuthorizedPersona is a rails implementation of Betterment's Persona Centric Authorization pattern"
13
15
  spec.homepage = "https://github.com/Betterment/authorized_persona"
14
- spec.license = "MIT"
16
+ spec.license = "MIT"
17
+ spec.required_ruby_version = ">= 3.0"
15
18
 
16
19
  # Specify which files should be added to the gem when it is released.
17
20
  # The `git ls-files -z` loads the files in the RubyGem that have been added into git.
18
- spec.files = Dir.chdir(File.expand_path(__dir__)) do
21
+ spec.files = Dir.chdir(File.expand_path(__dir__)) do
19
22
  `git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(test|spec|features)/}) }
20
23
  end
21
24
  spec.bindir = "exe"
22
25
  spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
23
26
  spec.require_paths = ["lib"]
24
27
 
25
- rails_version_range = [">= 5.1.6.2", "< 7.1"]
28
+ rails_version_range = [">= 6.1", "< 7.2"]
26
29
 
27
30
  spec.add_dependency "railties", *rails_version_range
28
31
 
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  # This file was generated by Appraisal
2
4
 
3
5
  source "https://rubygems.org"
@@ -0,0 +1,152 @@
1
+ PATH
2
+ remote: ..
3
+ specs:
4
+ authorized_persona (0.11.0)
5
+ railties (>= 6.1, < 7.2)
6
+
7
+ GEM
8
+ remote: https://rubygems.org/
9
+ specs:
10
+ actionpack (6.1.7.6)
11
+ actionview (= 6.1.7.6)
12
+ activesupport (= 6.1.7.6)
13
+ rack (~> 2.0, >= 2.0.9)
14
+ rack-test (>= 0.6.3)
15
+ rails-dom-testing (~> 2.0)
16
+ rails-html-sanitizer (~> 1.0, >= 1.2.0)
17
+ actionview (6.1.7.6)
18
+ activesupport (= 6.1.7.6)
19
+ builder (~> 3.1)
20
+ erubi (~> 1.4)
21
+ rails-dom-testing (~> 2.0)
22
+ rails-html-sanitizer (~> 1.1, >= 1.2.0)
23
+ activemodel (6.1.7.6)
24
+ activesupport (= 6.1.7.6)
25
+ activesupport (6.1.7.6)
26
+ concurrent-ruby (~> 1.0, >= 1.0.2)
27
+ i18n (>= 1.6, < 2)
28
+ minitest (>= 5.1)
29
+ tzinfo (~> 2.0)
30
+ zeitwerk (~> 2.3)
31
+ appraisal (2.5.0)
32
+ bundler
33
+ rake
34
+ thor (>= 0.14.0)
35
+ ast (2.4.2)
36
+ betterlint (1.7.0)
37
+ rubocop (> 1.0)
38
+ rubocop-performance
39
+ rubocop-rails
40
+ rubocop-rake
41
+ rubocop-rspec (>= 2.24)
42
+ builder (3.2.4)
43
+ concurrent-ruby (1.2.2)
44
+ crass (1.0.6)
45
+ diff-lcs (1.5.0)
46
+ erubi (1.12.0)
47
+ i18n (1.14.1)
48
+ concurrent-ruby (~> 1.0)
49
+ json (2.7.1)
50
+ language_server-protocol (3.17.0.3)
51
+ loofah (2.22.0)
52
+ crass (~> 1.0.2)
53
+ nokogiri (>= 1.12.0)
54
+ method_source (1.0.0)
55
+ minitest (5.20.0)
56
+ nokogiri (1.15.5-arm64-darwin)
57
+ racc (~> 1.4)
58
+ nokogiri (1.15.5-x86_64-darwin)
59
+ racc (~> 1.4)
60
+ parallel (1.24.0)
61
+ parser (3.2.2.4)
62
+ ast (~> 2.4.1)
63
+ racc
64
+ racc (1.7.3)
65
+ rack (2.2.8)
66
+ rack-test (2.1.0)
67
+ rack (>= 1.3)
68
+ rails-dom-testing (2.2.0)
69
+ activesupport (>= 5.0.0)
70
+ minitest
71
+ nokogiri (>= 1.6)
72
+ rails-html-sanitizer (1.6.0)
73
+ loofah (~> 2.21)
74
+ nokogiri (~> 1.14)
75
+ railties (6.1.7.6)
76
+ actionpack (= 6.1.7.6)
77
+ activesupport (= 6.1.7.6)
78
+ method_source
79
+ rake (>= 12.2)
80
+ thor (~> 1.0)
81
+ rainbow (3.1.1)
82
+ rake (13.1.0)
83
+ regexp_parser (2.8.3)
84
+ rexml (3.2.6)
85
+ rspec (3.12.0)
86
+ rspec-core (~> 3.12.0)
87
+ rspec-expectations (~> 3.12.0)
88
+ rspec-mocks (~> 3.12.0)
89
+ rspec-core (3.12.2)
90
+ rspec-support (~> 3.12.0)
91
+ rspec-expectations (3.12.3)
92
+ diff-lcs (>= 1.2.0, < 2.0)
93
+ rspec-support (~> 3.12.0)
94
+ rspec-mocks (3.12.6)
95
+ diff-lcs (>= 1.2.0, < 2.0)
96
+ rspec-support (~> 3.12.0)
97
+ rspec-support (3.12.1)
98
+ rubocop (1.59.0)
99
+ json (~> 2.3)
100
+ language_server-protocol (>= 3.17.0)
101
+ parallel (~> 1.10)
102
+ parser (>= 3.2.2.4)
103
+ rainbow (>= 2.2.2, < 4.0)
104
+ regexp_parser (>= 1.8, < 3.0)
105
+ rexml (>= 3.2.5, < 4.0)
106
+ rubocop-ast (>= 1.30.0, < 2.0)
107
+ ruby-progressbar (~> 1.7)
108
+ unicode-display_width (>= 2.4.0, < 3.0)
109
+ rubocop-ast (1.30.0)
110
+ parser (>= 3.2.1.0)
111
+ rubocop-capybara (2.19.0)
112
+ rubocop (~> 1.41)
113
+ rubocop-factory_bot (2.24.0)
114
+ rubocop (~> 1.33)
115
+ rubocop-performance (1.20.1)
116
+ rubocop (>= 1.48.1, < 2.0)
117
+ rubocop-ast (>= 1.30.0, < 2.0)
118
+ rubocop-rails (2.23.1)
119
+ activesupport (>= 4.2.0)
120
+ rack (>= 1.1)
121
+ rubocop (>= 1.33.0, < 2.0)
122
+ rubocop-ast (>= 1.30.0, < 2.0)
123
+ rubocop-rake (0.6.0)
124
+ rubocop (~> 1.0)
125
+ rubocop-rspec (2.25.0)
126
+ rubocop (~> 1.40)
127
+ rubocop-capybara (~> 2.17)
128
+ rubocop-factory_bot (~> 2.22)
129
+ ruby-progressbar (1.13.0)
130
+ thor (1.3.0)
131
+ tzinfo (2.0.6)
132
+ concurrent-ruby (~> 1.0)
133
+ unicode-display_width (2.5.0)
134
+ zeitwerk (2.6.12)
135
+
136
+ PLATFORMS
137
+ arm64-darwin-22
138
+ x86_64-darwin-22
139
+ x86_64-linux
140
+
141
+ DEPENDENCIES
142
+ activemodel (~> 6.1.0)
143
+ appraisal
144
+ authorized_persona!
145
+ betterlint
146
+ bundler
147
+ railties (~> 6.1.0)
148
+ rake
149
+ rspec (~> 3.0)
150
+
151
+ BUNDLED WITH
152
+ 2.4.21
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  # This file was generated by Appraisal
2
4
 
3
5
  source "https://rubygems.org"
@@ -0,0 +1,152 @@
1
+ PATH
2
+ remote: ..
3
+ specs:
4
+ authorized_persona (0.11.0)
5
+ railties (>= 6.1, < 7.2)
6
+
7
+ GEM
8
+ remote: https://rubygems.org/
9
+ specs:
10
+ actionpack (7.0.8)
11
+ actionview (= 7.0.8)
12
+ activesupport (= 7.0.8)
13
+ rack (~> 2.0, >= 2.2.4)
14
+ rack-test (>= 0.6.3)
15
+ rails-dom-testing (~> 2.0)
16
+ rails-html-sanitizer (~> 1.0, >= 1.2.0)
17
+ actionview (7.0.8)
18
+ activesupport (= 7.0.8)
19
+ builder (~> 3.1)
20
+ erubi (~> 1.4)
21
+ rails-dom-testing (~> 2.0)
22
+ rails-html-sanitizer (~> 1.1, >= 1.2.0)
23
+ activemodel (7.0.8)
24
+ activesupport (= 7.0.8)
25
+ activesupport (7.0.8)
26
+ concurrent-ruby (~> 1.0, >= 1.0.2)
27
+ i18n (>= 1.6, < 2)
28
+ minitest (>= 5.1)
29
+ tzinfo (~> 2.0)
30
+ appraisal (2.5.0)
31
+ bundler
32
+ rake
33
+ thor (>= 0.14.0)
34
+ ast (2.4.2)
35
+ betterlint (1.7.0)
36
+ rubocop (> 1.0)
37
+ rubocop-performance
38
+ rubocop-rails
39
+ rubocop-rake
40
+ rubocop-rspec (>= 2.24)
41
+ builder (3.2.4)
42
+ concurrent-ruby (1.2.2)
43
+ crass (1.0.6)
44
+ diff-lcs (1.5.0)
45
+ erubi (1.12.0)
46
+ i18n (1.14.1)
47
+ concurrent-ruby (~> 1.0)
48
+ json (2.7.1)
49
+ language_server-protocol (3.17.0.3)
50
+ loofah (2.22.0)
51
+ crass (~> 1.0.2)
52
+ nokogiri (>= 1.12.0)
53
+ method_source (1.0.0)
54
+ minitest (5.20.0)
55
+ nokogiri (1.15.5-arm64-darwin)
56
+ racc (~> 1.4)
57
+ nokogiri (1.15.5-x86_64-darwin)
58
+ racc (~> 1.4)
59
+ parallel (1.24.0)
60
+ parser (3.2.2.4)
61
+ ast (~> 2.4.1)
62
+ racc
63
+ racc (1.7.3)
64
+ rack (2.2.8)
65
+ rack-test (2.1.0)
66
+ rack (>= 1.3)
67
+ rails-dom-testing (2.2.0)
68
+ activesupport (>= 5.0.0)
69
+ minitest
70
+ nokogiri (>= 1.6)
71
+ rails-html-sanitizer (1.6.0)
72
+ loofah (~> 2.21)
73
+ nokogiri (~> 1.14)
74
+ railties (7.0.8)
75
+ actionpack (= 7.0.8)
76
+ activesupport (= 7.0.8)
77
+ method_source
78
+ rake (>= 12.2)
79
+ thor (~> 1.0)
80
+ zeitwerk (~> 2.5)
81
+ rainbow (3.1.1)
82
+ rake (13.1.0)
83
+ regexp_parser (2.8.3)
84
+ rexml (3.2.6)
85
+ rspec (3.12.0)
86
+ rspec-core (~> 3.12.0)
87
+ rspec-expectations (~> 3.12.0)
88
+ rspec-mocks (~> 3.12.0)
89
+ rspec-core (3.12.2)
90
+ rspec-support (~> 3.12.0)
91
+ rspec-expectations (3.12.3)
92
+ diff-lcs (>= 1.2.0, < 2.0)
93
+ rspec-support (~> 3.12.0)
94
+ rspec-mocks (3.12.6)
95
+ diff-lcs (>= 1.2.0, < 2.0)
96
+ rspec-support (~> 3.12.0)
97
+ rspec-support (3.12.1)
98
+ rubocop (1.59.0)
99
+ json (~> 2.3)
100
+ language_server-protocol (>= 3.17.0)
101
+ parallel (~> 1.10)
102
+ parser (>= 3.2.2.4)
103
+ rainbow (>= 2.2.2, < 4.0)
104
+ regexp_parser (>= 1.8, < 3.0)
105
+ rexml (>= 3.2.5, < 4.0)
106
+ rubocop-ast (>= 1.30.0, < 2.0)
107
+ ruby-progressbar (~> 1.7)
108
+ unicode-display_width (>= 2.4.0, < 3.0)
109
+ rubocop-ast (1.30.0)
110
+ parser (>= 3.2.1.0)
111
+ rubocop-capybara (2.19.0)
112
+ rubocop (~> 1.41)
113
+ rubocop-factory_bot (2.24.0)
114
+ rubocop (~> 1.33)
115
+ rubocop-performance (1.20.1)
116
+ rubocop (>= 1.48.1, < 2.0)
117
+ rubocop-ast (>= 1.30.0, < 2.0)
118
+ rubocop-rails (2.23.1)
119
+ activesupport (>= 4.2.0)
120
+ rack (>= 1.1)
121
+ rubocop (>= 1.33.0, < 2.0)
122
+ rubocop-ast (>= 1.30.0, < 2.0)
123
+ rubocop-rake (0.6.0)
124
+ rubocop (~> 1.0)
125
+ rubocop-rspec (2.25.0)
126
+ rubocop (~> 1.40)
127
+ rubocop-capybara (~> 2.17)
128
+ rubocop-factory_bot (~> 2.22)
129
+ ruby-progressbar (1.13.0)
130
+ thor (1.3.0)
131
+ tzinfo (2.0.6)
132
+ concurrent-ruby (~> 1.0)
133
+ unicode-display_width (2.5.0)
134
+ zeitwerk (2.6.12)
135
+
136
+ PLATFORMS
137
+ arm64-darwin-22
138
+ x86_64-darwin-22
139
+ x86_64-linux
140
+
141
+ DEPENDENCIES
142
+ activemodel (~> 7.0.0)
143
+ appraisal
144
+ authorized_persona!
145
+ betterlint
146
+ bundler
147
+ railties (~> 7.0.0)
148
+ rake
149
+ rspec (~> 3.0)
150
+
151
+ BUNDLED WITH
152
+ 2.4.21
@@ -1,8 +1,10 @@
1
+ # frozen_string_literal: true
2
+
1
3
  # This file was generated by Appraisal
2
4
 
3
5
  source "https://rubygems.org"
4
6
 
5
- gem "activemodel", "~>6.0.0"
6
- gem "railties", "~> 6.0.0"
7
+ gem "activemodel", "~>7.1.0"
8
+ gem "railties", "~> 7.1.0"
7
9
 
8
10
  gemspec path: "../"
@@ -0,0 +1,184 @@
1
+ PATH
2
+ remote: ..
3
+ specs:
4
+ authorized_persona (0.11.0)
5
+ railties (>= 6.1, < 7.2)
6
+
7
+ GEM
8
+ remote: https://rubygems.org/
9
+ specs:
10
+ actionpack (7.1.3.2)
11
+ actionview (= 7.1.3.2)
12
+ activesupport (= 7.1.3.2)
13
+ nokogiri (>= 1.8.5)
14
+ racc
15
+ rack (>= 2.2.4)
16
+ rack-session (>= 1.0.1)
17
+ rack-test (>= 0.6.3)
18
+ rails-dom-testing (~> 2.2)
19
+ rails-html-sanitizer (~> 1.6)
20
+ actionview (7.1.3.2)
21
+ activesupport (= 7.1.3.2)
22
+ builder (~> 3.1)
23
+ erubi (~> 1.11)
24
+ rails-dom-testing (~> 2.2)
25
+ rails-html-sanitizer (~> 1.6)
26
+ activemodel (7.1.3.2)
27
+ activesupport (= 7.1.3.2)
28
+ activesupport (7.1.3.2)
29
+ base64
30
+ bigdecimal
31
+ concurrent-ruby (~> 1.0, >= 1.0.2)
32
+ connection_pool (>= 2.2.5)
33
+ drb
34
+ i18n (>= 1.6, < 2)
35
+ minitest (>= 5.1)
36
+ mutex_m
37
+ tzinfo (~> 2.0)
38
+ appraisal (2.5.0)
39
+ bundler
40
+ rake
41
+ thor (>= 0.14.0)
42
+ ast (2.4.2)
43
+ base64 (0.2.0)
44
+ betterlint (1.10.1)
45
+ rubocop (~> 1.62.0)
46
+ rubocop-performance (~> 1.21.0)
47
+ rubocop-rails (~> 2.24.0)
48
+ rubocop-rake (~> 0.6.0)
49
+ rubocop-rspec (~> 2.28.0)
50
+ bigdecimal (3.1.7)
51
+ builder (3.2.4)
52
+ concurrent-ruby (1.2.3)
53
+ connection_pool (2.4.1)
54
+ crass (1.0.6)
55
+ diff-lcs (1.5.1)
56
+ drb (2.2.1)
57
+ erubi (1.12.0)
58
+ i18n (1.14.4)
59
+ concurrent-ruby (~> 1.0)
60
+ io-console (0.7.2)
61
+ irb (1.12.0)
62
+ rdoc
63
+ reline (>= 0.4.2)
64
+ json (2.7.2)
65
+ language_server-protocol (3.17.0.3)
66
+ loofah (2.22.0)
67
+ crass (~> 1.0.2)
68
+ nokogiri (>= 1.12.0)
69
+ minitest (5.22.3)
70
+ mutex_m (0.2.0)
71
+ nokogiri (1.16.4-arm64-darwin)
72
+ racc (~> 1.4)
73
+ nokogiri (1.16.4-x86_64-linux)
74
+ racc (~> 1.4)
75
+ parallel (1.24.0)
76
+ parser (3.3.0.5)
77
+ ast (~> 2.4.1)
78
+ racc
79
+ psych (5.1.2)
80
+ stringio
81
+ racc (1.7.3)
82
+ rack (3.0.10)
83
+ rack-session (2.0.0)
84
+ rack (>= 3.0.0)
85
+ rack-test (2.1.0)
86
+ rack (>= 1.3)
87
+ rackup (2.1.0)
88
+ rack (>= 3)
89
+ webrick (~> 1.8)
90
+ rails-dom-testing (2.2.0)
91
+ activesupport (>= 5.0.0)
92
+ minitest
93
+ nokogiri (>= 1.6)
94
+ rails-html-sanitizer (1.6.0)
95
+ loofah (~> 2.21)
96
+ nokogiri (~> 1.14)
97
+ railties (7.1.3.2)
98
+ actionpack (= 7.1.3.2)
99
+ activesupport (= 7.1.3.2)
100
+ irb
101
+ rackup (>= 1.0.0)
102
+ rake (>= 12.2)
103
+ thor (~> 1.0, >= 1.2.2)
104
+ zeitwerk (~> 2.6)
105
+ rainbow (3.1.1)
106
+ rake (13.2.1)
107
+ rdoc (6.6.3.1)
108
+ psych (>= 4.0.0)
109
+ regexp_parser (2.9.0)
110
+ reline (0.5.3)
111
+ io-console (~> 0.5)
112
+ rexml (3.2.6)
113
+ rspec (3.13.0)
114
+ rspec-core (~> 3.13.0)
115
+ rspec-expectations (~> 3.13.0)
116
+ rspec-mocks (~> 3.13.0)
117
+ rspec-core (3.13.0)
118
+ rspec-support (~> 3.13.0)
119
+ rspec-expectations (3.13.0)
120
+ diff-lcs (>= 1.2.0, < 2.0)
121
+ rspec-support (~> 3.13.0)
122
+ rspec-mocks (3.13.0)
123
+ diff-lcs (>= 1.2.0, < 2.0)
124
+ rspec-support (~> 3.13.0)
125
+ rspec-support (3.13.1)
126
+ rubocop (1.62.1)
127
+ json (~> 2.3)
128
+ language_server-protocol (>= 3.17.0)
129
+ parallel (~> 1.10)
130
+ parser (>= 3.3.0.2)
131
+ rainbow (>= 2.2.2, < 4.0)
132
+ regexp_parser (>= 1.8, < 3.0)
133
+ rexml (>= 3.2.5, < 4.0)
134
+ rubocop-ast (>= 1.31.1, < 2.0)
135
+ ruby-progressbar (~> 1.7)
136
+ unicode-display_width (>= 2.4.0, < 3.0)
137
+ rubocop-ast (1.31.2)
138
+ parser (>= 3.3.0.4)
139
+ rubocop-capybara (2.20.0)
140
+ rubocop (~> 1.41)
141
+ rubocop-factory_bot (2.25.1)
142
+ rubocop (~> 1.41)
143
+ rubocop-performance (1.21.0)
144
+ rubocop (>= 1.48.1, < 2.0)
145
+ rubocop-ast (>= 1.31.1, < 2.0)
146
+ rubocop-rails (2.24.1)
147
+ activesupport (>= 4.2.0)
148
+ rack (>= 1.1)
149
+ rubocop (>= 1.33.0, < 2.0)
150
+ rubocop-ast (>= 1.31.1, < 2.0)
151
+ rubocop-rake (0.6.0)
152
+ rubocop (~> 1.0)
153
+ rubocop-rspec (2.28.0)
154
+ rubocop (~> 1.40)
155
+ rubocop-capybara (~> 2.17)
156
+ rubocop-factory_bot (~> 2.22)
157
+ rubocop-rspec_rails (~> 2.28)
158
+ rubocop-rspec_rails (2.28.3)
159
+ rubocop (~> 1.40)
160
+ ruby-progressbar (1.13.0)
161
+ stringio (3.1.0)
162
+ thor (1.3.1)
163
+ tzinfo (2.0.6)
164
+ concurrent-ruby (~> 1.0)
165
+ unicode-display_width (2.5.0)
166
+ webrick (1.8.1)
167
+ zeitwerk (2.6.13)
168
+
169
+ PLATFORMS
170
+ arm64-darwin-22
171
+ x86_64-linux
172
+
173
+ DEPENDENCIES
174
+ activemodel (~> 7.1.0)
175
+ appraisal
176
+ authorized_persona!
177
+ betterlint
178
+ bundler
179
+ railties (~> 7.1.0)
180
+ rake
181
+ rspec (~> 3.0)
182
+
183
+ BUNDLED WITH
184
+ 2.4.21
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module AuthorizedPersona
2
4
  module Authorization
3
5
  extend ActiveSupport::Concern
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module AuthorizedPersona
2
4
  module Persona
3
5
  extend ActiveSupport::Concern
@@ -47,7 +49,7 @@ module AuthorizedPersona
47
49
 
48
50
  instance_methods.module_eval do
49
51
  tiers.keys.each do |tier|
50
- define_method "#{tier}_or_above?" do
52
+ define_method :"#{tier}_or_above?" do
51
53
  authorization_tier_at_or_above?(tier)
52
54
  end
53
55
  end
@@ -59,7 +61,7 @@ module AuthorizedPersona
59
61
 
60
62
  class_methods.module_eval do
61
63
  tiers.keys.each do |tier|
62
- define_method "#{tier}_or_above" do
64
+ define_method :"#{tier}_or_above" do
63
65
  with_authorization_tier_at_or_above(tier)
64
66
  end
65
67
  end
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module AuthorizedPersona
2
4
  class Railtie < Rails::Railtie
3
5
  initializer "authorized_persona.view_helpers" do
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module AuthorizedPersona
2
- VERSION = "0.9.1".freeze
4
+ VERSION = "0.11.0"
3
5
  end
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module AuthorizedPersona
2
4
  module ViewHelpers
3
5
  def authorized_to?(action, resource)
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  require "authorized_persona/version"
2
4
 
3
5
  require "rails"
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: authorized_persona
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.9.1
4
+ version: 0.11.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - John Mileham
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2023-05-11 00:00:00.000000000 Z
11
+ date: 2024-11-20 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: railties
@@ -16,40 +16,40 @@ dependencies:
16
16
  requirements:
17
17
  - - ">="
18
18
  - !ruby/object:Gem::Version
19
- version: 5.1.6.2
19
+ version: '6.1'
20
20
  - - "<"
21
21
  - !ruby/object:Gem::Version
22
- version: '7.1'
22
+ version: '7.2'
23
23
  type: :runtime
24
24
  prerelease: false
25
25
  version_requirements: !ruby/object:Gem::Requirement
26
26
  requirements:
27
27
  - - ">="
28
28
  - !ruby/object:Gem::Version
29
- version: 5.1.6.2
29
+ version: '6.1'
30
30
  - - "<"
31
31
  - !ruby/object:Gem::Version
32
- version: '7.1'
32
+ version: '7.2'
33
33
  - !ruby/object:Gem::Dependency
34
34
  name: activemodel
35
35
  requirement: !ruby/object:Gem::Requirement
36
36
  requirements:
37
37
  - - ">="
38
38
  - !ruby/object:Gem::Version
39
- version: 5.1.6.2
39
+ version: '6.1'
40
40
  - - "<"
41
41
  - !ruby/object:Gem::Version
42
- version: '7.1'
42
+ version: '7.2'
43
43
  type: :development
44
44
  prerelease: false
45
45
  version_requirements: !ruby/object:Gem::Requirement
46
46
  requirements:
47
47
  - - ">="
48
48
  - !ruby/object:Gem::Version
49
- version: 5.1.6.2
49
+ version: '6.1'
50
50
  - - "<"
51
51
  - !ruby/object:Gem::Version
52
- version: '7.1'
52
+ version: '7.2'
53
53
  - !ruby/object:Gem::Dependency
54
54
  name: appraisal
55
55
  requirement: !ruby/object:Gem::Requirement
@@ -137,15 +137,19 @@ files:
137
137
  - Appraisals
138
138
  - CODE_OF_CONDUCT.md
139
139
  - Gemfile
140
+ - Gemfile.lock
140
141
  - LICENSE.txt
141
142
  - README.md
142
143
  - Rakefile
143
144
  - authorized_persona.gemspec
144
145
  - bin/console
145
146
  - bin/setup
146
- - gemfiles/rails_6_0.gemfile
147
147
  - gemfiles/rails_6_1.gemfile
148
+ - gemfiles/rails_6_1.gemfile.lock
148
149
  - gemfiles/rails_7_0.gemfile
150
+ - gemfiles/rails_7_0.gemfile.lock
151
+ - gemfiles/rails_7_1.gemfile
152
+ - gemfiles/rails_7_1.gemfile.lock
149
153
  - lib/authorized_persona.rb
150
154
  - lib/authorized_persona/authorization.rb
151
155
  - lib/authorized_persona/persona.rb
@@ -165,14 +169,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
165
169
  requirements:
166
170
  - - ">="
167
171
  - !ruby/object:Gem::Version
168
- version: '0'
172
+ version: '3.0'
169
173
  required_rubygems_version: !ruby/object:Gem::Requirement
170
174
  requirements:
171
175
  - - ">="
172
176
  - !ruby/object:Gem::Version
173
177
  version: '0'
174
178
  requirements: []
175
- rubygems_version: 3.4.12
179
+ rubygems_version: 3.5.23
176
180
  signing_key:
177
181
  specification_version: 4
178
182
  summary: the simplest authorization library you will ever love