restful_resource 2.15.0 → 2.17.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: 7af1361039382e70e477e2092457d8d816ed698a2c1e04395eb970fbfd491fde
4
- data.tar.gz: dc56db8631527d46c3e670e338eb5272881233ae50b528cb4e50faaf8a87de46
3
+ metadata.gz: 4f1e1688884fd8954caa9da4cef1a9d2c3a1e294ded09414ce82a3865cf40e30
4
+ data.tar.gz: cb8672227647b41612c0a6a9ba739dde8705fb353369347106b037cc4c2a45c2
5
5
  SHA512:
6
- metadata.gz: a0532d37adbb89b6f53d98a359c3c54f52a11b26d0c7d1ac7b58b814e1831e8ab9825156d9f61676fff0c5c7afb2ede67dff28689922d8cac2bd5680439ef00a
7
- data.tar.gz: 357089f436e9d7b984a053f1fcc7642366220033a6e5ffdd6e05a1e37096714eff50130e0a1129b97c1393849392f976437f15311ea50edea31398ff794b3b0b
6
+ metadata.gz: 676a02c4acb372b64b6a82e628cef146a2043709cecb56a9819e37ce253d15af0f386db2a9d6e08a5c9b02d5e7e8895b61e88af7065f560c941ccad1400a8daa
7
+ data.tar.gz: e5ebf7348404ce117ac51963c23969754adbc144fbd97cc8ee4a967a80fe8c0a1a162ce55824800f5afd321167efe240fdb97226d05ded37fb74ba67209d6f4d
data/CHANGELOG.md CHANGED
@@ -1,4 +1,14 @@
1
1
  # Changelog
2
+ 2.17
3
+ ---
4
+
5
+ - Re-add deprecation for :dig and :[] since they are still used by some clients
6
+
7
+ 2.16
8
+ ---
9
+
10
+ - Remove deprecation for :dig and :[]
11
+
2
12
  2.15
3
13
  ---
4
14
 
@@ -2,6 +2,8 @@ module RestfulResource
2
2
  class Base < OpenObject
3
3
  extend RestfulResource::Associations
4
4
 
5
+ Deprecator = ActiveSupport::Deprecation.new('soon', 'restful_resource')
6
+
5
7
  def self.configure(base_url: nil,
6
8
  username: nil,
7
9
  password: nil,
@@ -0,0 +1,7 @@
1
+ module RestfulResource
2
+ class Railtie < Rails::Railtie
3
+ initializer 'restful_resource.deprecator' do |app|
4
+ app.deprecators[:restful_resource] = Base::Deprecator
5
+ end
6
+ end
7
+ end
@@ -1,5 +1,5 @@
1
1
  module RestfulResource
2
2
  class StrictOpenStruct < ::OpenStruct
3
- deprecate :dig, :[], deprecator: Deprecator.build
3
+ deprecate :dig, :[], deprecator: Base::Deprecator
4
4
  end
5
5
  end
@@ -1,3 +1,3 @@
1
1
  module RestfulResource
2
- VERSION = '2.15.0'.freeze
2
+ VERSION = '2.17.0'.freeze
3
3
  end
@@ -9,13 +9,11 @@ require 'faraday/encoding'
9
9
  require 'active_support'
10
10
  require 'active_support/all'
11
11
  require 'resolv-replace'
12
- require_relative 'restful_resource/deprecator'
13
12
  require_relative 'restful_resource/version'
14
13
  require_relative 'restful_resource/null_logger'
15
14
  require_relative 'restful_resource/paginated_array'
16
15
  require_relative 'restful_resource/parameter_missing_error'
17
16
  require_relative 'restful_resource/resource_id_missing_error'
18
- require_relative 'restful_resource/strict_open_struct'
19
17
  require_relative 'restful_resource/open_object'
20
18
  require_relative 'restful_resource/response'
21
19
  require_relative 'restful_resource/request'
@@ -25,3 +23,5 @@ require_relative 'restful_resource/rails_validations'
25
23
  require_relative 'restful_resource/redirections'
26
24
  require_relative 'restful_resource/instrumentation'
27
25
  require_relative 'restful_resource/base'
26
+ require_relative 'restful_resource/strict_open_struct'
27
+ require_relative 'restful_resource/railtie' if defined?(Rails::Railtie)
metadata CHANGED
@@ -1,15 +1,15 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: restful_resource
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.15.0
4
+ version: 2.17.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - David Santoro
8
8
  - Federico Rebora
9
- autorequire:
9
+ autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2024-01-22 00:00:00.000000000 Z
12
+ date: 2024-03-05 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: bundler
@@ -266,7 +266,6 @@ files:
266
266
  - lib/restful_resource/associations.rb
267
267
  - lib/restful_resource/authorization.rb
268
268
  - lib/restful_resource/base.rb
269
- - lib/restful_resource/deprecator.rb
270
269
  - lib/restful_resource/http_client.rb
271
270
  - lib/restful_resource/instrumentation.rb
272
271
  - lib/restful_resource/null_logger.rb
@@ -274,6 +273,7 @@ files:
274
273
  - lib/restful_resource/paginated_array.rb
275
274
  - lib/restful_resource/parameter_missing_error.rb
276
275
  - lib/restful_resource/rails_validations.rb
276
+ - lib/restful_resource/railtie.rb
277
277
  - lib/restful_resource/redirections.rb
278
278
  - lib/restful_resource/request.rb
279
279
  - lib/restful_resource/resource_id_missing_error.rb
@@ -297,7 +297,7 @@ homepage: http://www.github.com/carwow/restful_resource
297
297
  licenses:
298
298
  - MIT
299
299
  metadata: {}
300
- post_install_message:
300
+ post_install_message:
301
301
  rdoc_options: []
302
302
  require_paths:
303
303
  - lib
@@ -312,8 +312,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
312
312
  - !ruby/object:Gem::Version
313
313
  version: '0'
314
314
  requirements: []
315
- rubygems_version: 3.1.6
316
- signing_key:
315
+ rubygems_version: 3.4.19
316
+ signing_key:
317
317
  specification_version: 4
318
318
  summary: A simple activerecord inspired rest resource base class implemented using
319
319
  rest-client
@@ -1,25 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- module RestfulResource
4
- class Deprecator < ActiveSupport::Deprecation
5
- GEM_NAME = 'restful_resource'
6
-
7
- def self.build(horizon: 'soon')
8
- @deprecators ||= {}
9
- @deprecators["#{GEM_NAME}@#{horizon}"] ||= new(horizon)
10
- end
11
-
12
- def initialize(horizon)
13
- super(horizon, GEM_NAME)
14
-
15
- @app_deprecator = ActiveSupport::Deprecation.instance
16
- end
17
-
18
- # inherit the default configured behavior for the app
19
- delegate :behavior, to: :app_deprecator
20
-
21
- private
22
-
23
- attr_reader :app_deprecator
24
- end
25
- end