activeresource 6.1.1 → 6.1.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/active_resource/base.rb +1 -0
- data/lib/active_resource/connection.rb +2 -0
- data/lib/active_resource/exceptions.rb +4 -0
- data/lib/active_resource/railtie.rb +4 -0
- data/lib/active_resource/validations.rb +2 -2
- data/lib/active_resource/version.rb +1 -1
- data/lib/active_resource.rb +10 -0
- metadata +4 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: aa6762874a2653d8a08929aa62b286ee759384949026c7229f792208a18e1a4e
|
4
|
+
data.tar.gz: b1bbe54d2cd8937cb58ba46ebd6c38bae69d937c8663f2f77e2d266011c68216
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 4bfa1af456b2b740e5472f2ce9c5a6138cbfb5449ec3480a6f637c2f75495d66da591fdd80f4e6c5092afeba3af6439545c7c5e7a75af187a981ef922ece053a
|
7
|
+
data.tar.gz: 17d6eb6cd168d7c5613a9ef594648529f9fc6b6bdec7927d7940d62012c0b75e9adb92c3c22f6790f725049bf2d6dbd86bd6082eb25d7145a9b2bcedd4f0e80b
|
data/lib/active_resource/base.rb
CHANGED
@@ -212,6 +212,7 @@ module ActiveResource
|
|
212
212
|
# * 301, 302, 303, 307 - ActiveResource::Redirection
|
213
213
|
# * 400 - ActiveResource::BadRequest
|
214
214
|
# * 401 - ActiveResource::UnauthorizedAccess
|
215
|
+
# * 402 - ActiveResource::PaymentRequired
|
215
216
|
# * 403 - ActiveResource::ForbiddenAccess
|
216
217
|
# * 404 - ActiveResource::ResourceNotFound
|
217
218
|
# * 405 - ActiveResource::MethodNotAllowed
|
@@ -21,5 +21,9 @@ module ActiveResource
|
|
21
21
|
app.config.active_job.custom_serializers << ActiveResource::ActiveJobSerializer
|
22
22
|
end
|
23
23
|
end
|
24
|
+
|
25
|
+
initializer "active_resource.deprecator" do |app|
|
26
|
+
app.deprecators[:active_resource] = ActiveResource.deprecator
|
27
|
+
end
|
24
28
|
end
|
25
29
|
end
|
@@ -57,7 +57,7 @@ module ActiveResource
|
|
57
57
|
errors = decoded["errors"] || {}
|
58
58
|
if errors.kind_of?(Array)
|
59
59
|
# 3.2.1-style with array of strings
|
60
|
-
|
60
|
+
ActiveResource.deprecator.warn("Returning errors as an array of strings is deprecated.")
|
61
61
|
from_array errors, save_cache
|
62
62
|
else
|
63
63
|
# 3.2.2+ style
|
@@ -65,7 +65,7 @@ module ActiveResource
|
|
65
65
|
end
|
66
66
|
else
|
67
67
|
# <3.2-style respond_with - lacks 'errors' key
|
68
|
-
|
68
|
+
ActiveResource.deprecator.warn('Returning errors as a hash without a root "errors" key is deprecated.')
|
69
69
|
from_hash decoded, save_cache
|
70
70
|
end
|
71
71
|
end
|
data/lib/active_resource.rb
CHANGED
@@ -46,6 +46,16 @@ module ActiveResource
|
|
46
46
|
autoload :InheritingHash
|
47
47
|
autoload :Validations
|
48
48
|
autoload :Collection
|
49
|
+
|
50
|
+
if ActiveSupport::VERSION::STRING >= "7.2"
|
51
|
+
def self.deprecator
|
52
|
+
@deprecator ||= ActiveSupport::Deprecation.new(VERSION::STRING, "ActiveResource")
|
53
|
+
end
|
54
|
+
else
|
55
|
+
def self.deprecator
|
56
|
+
ActiveSupport::Deprecation
|
57
|
+
end
|
58
|
+
end
|
49
59
|
end
|
50
60
|
|
51
61
|
require "active_resource/railtie" if defined?(Rails.application)
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: activeresource
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 6.1.
|
4
|
+
version: 6.1.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- David Heinemeier Hansson
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2024-
|
11
|
+
date: 2024-10-03 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activesupport
|
@@ -135,9 +135,9 @@ licenses:
|
|
135
135
|
- MIT
|
136
136
|
metadata:
|
137
137
|
bug_tracker_uri: https://github.com/rails/activeresource/issues
|
138
|
-
changelog_uri: https://github.com/rails/activeresource/releases/tag/v6.1.
|
138
|
+
changelog_uri: https://github.com/rails/activeresource/releases/tag/v6.1.2
|
139
139
|
documentation_uri: http://rubydoc.info/gems/activeresource
|
140
|
-
source_code_uri: https://github.com/rails/activeresource/tree/v6.1.
|
140
|
+
source_code_uri: https://github.com/rails/activeresource/tree/v6.1.2
|
141
141
|
rubygems_mfa_required: 'true'
|
142
142
|
post_install_message:
|
143
143
|
rdoc_options: []
|