has_scope 0.8.1 → 0.9.0

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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: abf0ad461389302c6eef573bc313b2f0753a7dfaa02c23fdf685acce47be111c
4
- data.tar.gz: 79209897cf738ba373be55f2b9fe4543d15880ae466c9a577e23cc1abb06ee3d
3
+ metadata.gz: 1f7609e5db68fc3849062e1d86d1822525e96c22152c8d60cc21829fc5fe631d
4
+ data.tar.gz: a8aa969e70e116330e441cd9e71975ca7b033985e415acec8bcb93e7dc6b6dd9
5
5
  SHA512:
6
- metadata.gz: 04a17d0ea9ee72e18ad98fa79c9d4e3a856219673fe066d1326df8b12af29a22f80282f0ec4cb8de9e25653d5f1179137fa4a8475d5fd8bf247ff12f3ab8c20e
7
- data.tar.gz: 87978f08fed8aec6fe006b0d9faee4704b831a11b8b61b1c1211537965d4cd59a85784229d0e3260c49bd7f1313591ba48ac2feb0580417cb69ca1c60d435ad4
6
+ metadata.gz: a6970b45b2669e792e84266c96486d7a9524769566b51e7b4823abc31777787ffddf97494173ba9a39eddae10cb4f42470fd00d89fe7e4a71a6b29b12525e61f
7
+ data.tar.gz: e5a55e29f5153fe9043c55f98b02928551c5d118406326a2780c1d24195de1ea0ac31c566e97e6166031ef609eca7c3174fad42286358024efe4bb5f3cfdd02b
data/MIT-LICENSE CHANGED
@@ -1,4 +1,5 @@
1
- Copyright 2009-2017 Plataforma Tecnologia. http://blog.plataformatec.com.br
1
+ Copyright (c) 2020-2025 Rafael França, Carlos Antonio 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,8 @@ 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
- MIT License. Copyright 2009-2019 Plataformatec. http://blog.plataformatec.com.br
300
+ ## License
301
+
302
+ MIT License.
303
+ Copyright 2020-2025 Rafael França, Carlos Antonio da Silva.
304
+ Copyright 2009-2019 Plataformatec.
@@ -0,0 +1,10 @@
1
+ require 'rails/railtie'
2
+
3
+ module HasScope
4
+ class Railtie < Rails::Railtie
5
+ initializer "has_scope.deprecator" do |app|
6
+ app.deprecators[:has_scope] = HasScope.deprecator if app.respond_to?(:deprecators)
7
+ end
8
+ end
9
+ end
10
+
@@ -1,3 +1,3 @@
1
1
  module HasScope
2
- VERSION = "0.8.1"
2
+ VERSION = "0.9.0"
3
3
  end
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
- ActiveSupport::Deprecation.warn <<-DEPRECATION.squish
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,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: has_scope
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.8.1
4
+ version: 0.9.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - José Valim
8
- autorequire:
9
8
  bindir: bin
10
9
  cert_chain: []
11
- date: 2023-02-04 00:00:00.000000000 Z
10
+ date: 1980-01-02 00:00:00.000000000 Z
12
11
  dependencies:
13
12
  - !ruby/object:Gem::Dependency
14
13
  name: actionpack
@@ -16,28 +15,28 @@ dependencies:
16
15
  requirements:
17
16
  - - ">="
18
17
  - !ruby/object:Gem::Version
19
- version: '5.2'
18
+ version: '7.0'
20
19
  type: :runtime
21
20
  prerelease: false
22
21
  version_requirements: !ruby/object:Gem::Requirement
23
22
  requirements:
24
23
  - - ">="
25
24
  - !ruby/object:Gem::Version
26
- version: '5.2'
25
+ version: '7.0'
27
26
  - !ruby/object:Gem::Dependency
28
27
  name: activesupport
29
28
  requirement: !ruby/object:Gem::Requirement
30
29
  requirements:
31
30
  - - ">="
32
31
  - !ruby/object:Gem::Version
33
- version: '5.2'
32
+ version: '7.0'
34
33
  type: :runtime
35
34
  prerelease: false
36
35
  version_requirements: !ruby/object:Gem::Requirement
37
36
  requirements:
38
37
  - - ">="
39
38
  - !ruby/object:Gem::Version
40
- version: '5.2'
39
+ version: '7.0'
41
40
  - !ruby/object:Gem::Dependency
42
41
  name: rake
43
42
  requirement: !ruby/object:Gem::Requirement
@@ -56,18 +55,18 @@ dependencies:
56
55
  name: mocha
57
56
  requirement: !ruby/object:Gem::Requirement
58
57
  requirements:
59
- - - "~>"
58
+ - - ">="
60
59
  - !ruby/object:Gem::Version
61
- version: 1.0.0
60
+ version: '0'
62
61
  type: :development
63
62
  prerelease: false
64
63
  version_requirements: !ruby/object:Gem::Requirement
65
64
  requirements:
66
- - - "~>"
65
+ - - ">="
67
66
  - !ruby/object:Gem::Version
68
- version: 1.0.0
67
+ version: '0'
69
68
  description: Maps controller filters to your resource scopes
70
- email: opensource@plataformatec.com.br
69
+ email: heartcombo.oss@gmail.com
71
70
  executables: []
72
71
  extensions: []
73
72
  extra_rdoc_files:
@@ -76,8 +75,9 @@ files:
76
75
  - MIT-LICENSE
77
76
  - README.md
78
77
  - lib/has_scope.rb
78
+ - lib/has_scope/railtie.rb
79
79
  - lib/has_scope/version.rb
80
- homepage: http://github.com/plataformatec/has_scope
80
+ homepage: http://github.com/heartcombo/has_scope
81
81
  licenses:
82
82
  - MIT
83
83
  metadata:
@@ -85,7 +85,6 @@ metadata:
85
85
  changelog_uri: https://github.com/heartcombo/has_scope/blob/main/CHANGELOG.md
86
86
  source_code_uri: https://github.com/heartcombo/has_scope
87
87
  bug_tracker_uri: https://github.com/heartcombo/has_scope/issues
88
- post_install_message:
89
88
  rdoc_options:
90
89
  - "--charset=UTF-8"
91
90
  require_paths:
@@ -94,15 +93,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
94
93
  requirements:
95
94
  - - ">="
96
95
  - !ruby/object:Gem::Version
97
- version: 2.5.0
96
+ version: 2.7.0
98
97
  required_rubygems_version: !ruby/object:Gem::Requirement
99
98
  requirements:
100
99
  - - ">="
101
100
  - !ruby/object:Gem::Version
102
101
  version: '0'
103
102
  requirements: []
104
- rubygems_version: 3.4.5
105
- signing_key:
103
+ rubygems_version: 3.6.9
106
104
  specification_version: 4
107
105
  summary: Maps controller filters to your resource scopes.
108
106
  test_files: []