ae_declarative_authorization 1.0.0 → 1.2.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: 25a8212f21bb76701233314163ecdc43a91245dda378125f45f0dd819637f933
4
- data.tar.gz: 1f91baaa43b7c905f0e263c5ac6a5824d7754764806d13e5da8e7f8ebd5d0b40
3
+ metadata.gz: caa500b6aa8d1cae25c644f1378138d8f638f8ce8a61ac0889c4a37dd10fe631
4
+ data.tar.gz: 00d2f33f960bd9e3adeb82755a7792d4308c35924986d850416c4061f667f4db
5
5
  SHA512:
6
- metadata.gz: 34e5b75e9ab125ade50e801701982cb7a2db33aaab837246fb03900b7edcaba2ec39d981a3fcc94821de54190adbe9e6eed5bd29146f3732b867dc3625e6cc02
7
- data.tar.gz: bc6fc502242c55259f8b2736bdd0fa221b21fde64c288e3a16b7baa1451d0c13b754012ab159bea47969838287c89db69b12c3746fb6bdd7465a9ebc2aebc5fe
6
+ metadata.gz: b1f87bbeef702e7b285c8f41e77b9f4db377e3519cda8d19ca41e86d58cf23e40c943f5255c8737343a88b4add9981a6e32e24818544ee9f00b601b8ac30cb09
7
+ data.tar.gz: e3144232138e1876fe86d682c978c4a3d046994377f112cea9d87fcdb21fba10757bfe6687ddd881f8598b4b674b363b342d8f4e4d3c24999fa7bc1853110a22
data/LICENSE.txt CHANGED
@@ -1,4 +1,4 @@
1
- Copyright (c) 2017-2022 AppFolio, Inc., Steffen Bartsch
1
+ Copyright (c) 2017-2023 AppFolio, Inc., Steffen Bartsch
2
2
 
3
3
  Permission is hereby granted, free of charge, to any person obtaining
4
4
  a copy of this software and associated documentation files (the
@@ -19,5 +19,5 @@ Gem::Specification.new do |spec|
19
19
  spec.metadata['allowed_push_host'] = 'https://rubygems.org'
20
20
 
21
21
  spec.add_dependency('blockenspiel', ['>= 0.5', '< 1'])
22
- spec.add_dependency('rails', ['>= 4.2.5.2', '< 7.1'])
22
+ spec.add_dependency('rails', ['>= 6.1', '< 7.2'])
23
23
  end
@@ -46,13 +46,7 @@ module Authorization
46
46
  def initialize(model, options)
47
47
  @finder_options = {}
48
48
 
49
- if Rails.version >= "5.2"
50
- super(model, table: model.table_name)
51
- elsif Rails.version >= "5"
52
- super(model, model.table_name, nil)
53
- else
54
- super(model, model.table_name)
55
- end
49
+ super(model, table: model.table_name)
56
50
  end
57
51
 
58
52
  def scope
@@ -134,7 +134,7 @@ module DeclarativeAuthorization
134
134
 
135
135
  def access_tests(&block)
136
136
  @access_tests_defined = true
137
- file_output ||= [ 'test/profiles/access_checking', ENV['TEST_ENV_NUMBER'] ].compact.join('.')
137
+ file_output ||= [ Dir.tmpdir + '/test/profiles/access_checking', ENV['TEST_ENV_NUMBER'] ].compact.join('.')
138
138
  unless File.exist?(file_output)
139
139
  FileUtils.mkdir_p(File.dirname(file_output))
140
140
  end
@@ -1,3 +1,3 @@
1
1
  module DeclarativeAuthorization
2
- VERSION = '1.0.0'.freeze
2
+ VERSION = '1.2.0'.freeze
3
3
  end
@@ -8,11 +8,6 @@ if defined?(ActiveRecord)
8
8
  require File.join(%w{declarative_authorization obligation_scope})
9
9
  end
10
10
 
11
- min_rails_version = Gem::Version.new('4.2.5.2')
12
- if Gem::Version.new(Rails::VERSION::STRING) < min_rails_version
13
- raise "ae_declarative_authorization requires Rails #{min_rails_version}. You are using #{Rails::VERSION::STRING}."
14
- end
15
-
16
11
  require File.join(%w{declarative_authorization railsengine}) if defined?(::Rails::Engine)
17
12
 
18
13
  if defined?(ActionController)
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ae_declarative_authorization
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.0
4
+ version: 1.2.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - AppFolio
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2022-02-23 00:00:00.000000000 Z
11
+ date: 2023-10-24 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: blockenspiel
@@ -36,20 +36,20 @@ dependencies:
36
36
  requirements:
37
37
  - - ">="
38
38
  - !ruby/object:Gem::Version
39
- version: 4.2.5.2
39
+ version: '6.1'
40
40
  - - "<"
41
41
  - !ruby/object:Gem::Version
42
- version: '7.1'
42
+ version: '7.2'
43
43
  type: :runtime
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: 4.2.5.2
49
+ version: '6.1'
50
50
  - - "<"
51
51
  - !ruby/object:Gem::Version
52
- version: '7.1'
52
+ version: '7.2'
53
53
  description: Rails gem for maintainable authorization based on readable authorization
54
54
  rules.
55
55
  email: opensource@appfolio.com
@@ -98,7 +98,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
98
98
  - !ruby/object:Gem::Version
99
99
  version: '0'
100
100
  requirements: []
101
- rubygems_version: 3.3.3
101
+ rubygems_version: 3.4.17
102
102
  signing_key:
103
103
  specification_version: 4
104
104
  summary: Rails gem for maintainable authorization based on readable authorization