restful_resource 2.15.0 → 2.16.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: 9f8db280a4d7afd8d96673bd146fc9ef8f07b65892c51510b96528cf14da3ef6
4
+ data.tar.gz: 90117d3293b54c29bd95e898e74c5bf4a36729aa3699febefe1611f7c0edd2b3
5
5
  SHA512:
6
- metadata.gz: a0532d37adbb89b6f53d98a359c3c54f52a11b26d0c7d1ac7b58b814e1831e8ab9825156d9f61676fff0c5c7afb2ede67dff28689922d8cac2bd5680439ef00a
7
- data.tar.gz: 357089f436e9d7b984a053f1fcc7642366220033a6e5ffdd6e05a1e37096714eff50130e0a1129b97c1393849392f976437f15311ea50edea31398ff794b3b0b
6
+ metadata.gz: c75d4f211b12a0ba6a80911d86797317332343d36e293f4374612877c2e154ab963a45bc20a4916e8868c8c37b68c3d6d1716e97542ee7898c72622c539b648c
7
+ data.tar.gz: ced11a5b38856a0401f9380dcada04089ed5ac929f275a1bef34b13906944357c874ba7395e88a661cbcc791119920967c0c7736151c2c10dc1a328439e46545
data/CHANGELOG.md CHANGED
@@ -1,4 +1,9 @@
1
1
  # Changelog
2
+ 2.16
3
+ ---
4
+
5
+ - Remove deprecation for :dig and :[]
6
+
2
7
  2.15
3
8
  ---
4
9
 
@@ -1,5 +1,5 @@
1
1
  module RestfulResource
2
2
  class StrictOpenStruct < ::OpenStruct
3
- deprecate :dig, :[], deprecator: Deprecator.build
3
+ undef_method :dig, :[]
4
4
  end
5
5
  end
@@ -1,3 +1,3 @@
1
1
  module RestfulResource
2
- VERSION = '2.15.0'.freeze
2
+ VERSION = '2.16.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,4 @@ 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'
@@ -4,18 +4,14 @@ RSpec.describe RestfulResource::StrictOpenStruct do
4
4
  let(:instance) { described_class.new(foo: 'bar') }
5
5
 
6
6
  describe '#dig' do
7
- it 'is deprecated' do
8
- expect { instance.dig(:foo) }.to output(
9
- /dig is deprecated and will be removed from restful_resource soon/
10
- ).to_stderr
7
+ it 'is not defined' do
8
+ expect { instance.dig(:foo) }.to raise_error(NoMethodError)
11
9
  end
12
10
  end
13
11
 
14
12
  describe '#[]' do
15
- it 'is deprecated' do
16
- expect { instance[:foo] }.to output(
17
- /\[\] is deprecated and will be removed from restful_resource soon/
18
- ).to_stderr
13
+ it 'is not defined' do
14
+ expect { instance[:foo] }.to raise_error(NoMethodError)
19
15
  end
20
16
  end
21
17
  end
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.16.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
@@ -297,7 +296,7 @@ homepage: http://www.github.com/carwow/restful_resource
297
296
  licenses:
298
297
  - MIT
299
298
  metadata: {}
300
- post_install_message:
299
+ post_install_message:
301
300
  rdoc_options: []
302
301
  require_paths:
303
302
  - lib
@@ -312,8 +311,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
312
311
  - !ruby/object:Gem::Version
313
312
  version: '0'
314
313
  requirements: []
315
- rubygems_version: 3.1.6
316
- signing_key:
314
+ rubygems_version: 3.4.19
315
+ signing_key:
317
316
  specification_version: 4
318
317
  summary: A simple activerecord inspired rest resource base class implemented using
319
318
  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