has_scope 0.8.1 → 0.8.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/MIT-LICENSE +2 -1
- data/README.md +3 -1
- data/lib/has_scope/railtie.rb +10 -0
- data/lib/has_scope/version.rb +1 -1
- data/lib/has_scope.rb +7 -1
- metadata +8 -7
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 9d8bb7a042f13833e2cba867d438e10c9b1b9555ff30d53758a172afa1ae1fc5
|
4
|
+
data.tar.gz: 482aa7b28c64ddaa012484b739ba8cc48a45db76bd3025cc38c338e61e41747f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 850f88a22e0133f0659a088c06c2a047e8be951d6b0bda70f0de36c149002b9a5b3390134a2d0dc5b9fb64866c6fd4bdc5c1e30d4fdea020b9e6494fb5cc0453
|
7
|
+
data.tar.gz: 82964c1b89c8d8e8f0356edf1733eba4f9e2cb703a9b600188884cf9dfb5043162bf0b55a77f4113222dbc6fb130a65347f6c2c06eab8b70553208a86b845018
|
data/MIT-LICENSE
CHANGED
@@ -1,4 +1,5 @@
|
|
1
|
-
Copyright
|
1
|
+
Copyright (c) 2020-2023 Rafael França, Carlos Antônio da Silva
|
2
|
+
Copyright (c) 2009-2019 Plataformatec
|
2
3
|
|
3
4
|
Permission is hereby granted, free of charge, to any person obtaining
|
4
5
|
a copy of this software and associated documentation files (the
|
data/README.md
CHANGED
@@ -297,4 +297,6 @@ and [Rails](https://guides.rubyonrails.org/maintenance_policy.html) maintenance
|
|
297
297
|
|
298
298
|
If you discover any bugs or want to drop a line, feel free to create an issue on GitHub.
|
299
299
|
|
300
|
-
|
300
|
+
## License
|
301
|
+
|
302
|
+
MIT License. Copyright 2020-2023 Rafael França, Carlos Antônio da Silva. Copyright 2009-2019 Plataformatec.
|
data/lib/has_scope/version.rb
CHANGED
data/lib/has_scope.rb
CHANGED
@@ -11,6 +11,10 @@ module HasScope
|
|
11
11
|
default: [[ String, Numeric ]],
|
12
12
|
}
|
13
13
|
|
14
|
+
def self.deprecator
|
15
|
+
@deprecator ||= ActiveSupport::Deprecation.new("1.0", "HasScope")
|
16
|
+
end
|
17
|
+
|
14
18
|
def self.included(base)
|
15
19
|
base.class_eval do
|
16
20
|
extend ClassMethods
|
@@ -201,7 +205,7 @@ module HasScope
|
|
201
205
|
def applicable?(string_proc_or_symbol, expected) #:nodoc:
|
202
206
|
case string_proc_or_symbol
|
203
207
|
when String
|
204
|
-
|
208
|
+
HasScope.deprecator.warn <<-DEPRECATION.squish
|
205
209
|
[HasScope] Passing a string to determine if the scope should be applied
|
206
210
|
is deprecated and it will be removed in a future version of HasScope.
|
207
211
|
DEPRECATION
|
@@ -222,6 +226,8 @@ module HasScope
|
|
222
226
|
end
|
223
227
|
end
|
224
228
|
|
229
|
+
require 'has_scope/railtie' if defined?(Rails)
|
230
|
+
|
225
231
|
ActiveSupport.on_load :action_controller do
|
226
232
|
include HasScope
|
227
233
|
helper_method :current_scopes if respond_to?(:helper_method)
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: has_scope
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.8.
|
4
|
+
version: 0.8.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- José Valim
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2023-
|
11
|
+
date: 2023-10-11 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: actionpack
|
@@ -56,16 +56,16 @@ dependencies:
|
|
56
56
|
name: mocha
|
57
57
|
requirement: !ruby/object:Gem::Requirement
|
58
58
|
requirements:
|
59
|
-
- - "
|
59
|
+
- - ">="
|
60
60
|
- !ruby/object:Gem::Version
|
61
|
-
version:
|
61
|
+
version: '0'
|
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: '0'
|
69
69
|
description: Maps controller filters to your resource scopes
|
70
70
|
email: opensource@plataformatec.com.br
|
71
71
|
executables: []
|
@@ -76,6 +76,7 @@ files:
|
|
76
76
|
- MIT-LICENSE
|
77
77
|
- README.md
|
78
78
|
- lib/has_scope.rb
|
79
|
+
- lib/has_scope/railtie.rb
|
79
80
|
- lib/has_scope/version.rb
|
80
81
|
homepage: http://github.com/plataformatec/has_scope
|
81
82
|
licenses:
|
@@ -101,7 +102,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
101
102
|
- !ruby/object:Gem::Version
|
102
103
|
version: '0'
|
103
104
|
requirements: []
|
104
|
-
rubygems_version: 3.4.
|
105
|
+
rubygems_version: 3.4.10
|
105
106
|
signing_key:
|
106
107
|
specification_version: 4
|
107
108
|
summary: Maps controller filters to your resource scopes.
|