restful_resource 2.12.0 → 2.13.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.circleci/config.yml +14 -21
- data/.github/dependabot.yml +23 -0
- data/.gitignore +1 -0
- data/CHANGELOG.md +10 -0
- data/lib/restful_resource/deprecator.rb +25 -0
- data/lib/restful_resource/strict_open_struct.rb +1 -1
- data/lib/restful_resource/version.rb +1 -1
- data/lib/restful_resource.rb +1 -0
- data/restful_resource.gemspec +2 -2
- data/spec/restful_resource/strict_open_struct_spec.rb +21 -0
- data/spec/spec_helper.rb +1 -0
- metadata +21 -12
- data/Gemfile.lock +0 -123
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 7d41b3df9f2b3940094af5308e6c9d1dbcae7a591e7b2238e1407b5c4b980a18
|
4
|
+
data.tar.gz: 48c54c2ca77114c110944e89f8e776e1b31a8a1c389ac93a7bb910199182e4e8
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: bea15b2b11ab4a947b2b6a6ebe2c7712ac4e451093dd276e91f7d73c743700b5c0edf48b34433d2199bb47b29fe49c8a79a5b42bb0196053b59ce799afcf5ba8
|
7
|
+
data.tar.gz: 7e7728d05b28b28b84f129b56ea41e90db3971b68d5e46a2b371643501544817e04d7b9b39c41d8c1479a102a9bfd004f157dd9ddea18ea42471d5e8274050a8
|
data/.circleci/config.yml
CHANGED
@@ -1,29 +1,22 @@
|
|
1
|
-
version: 2
|
1
|
+
version: 2.1
|
2
|
+
|
2
3
|
jobs:
|
3
|
-
|
4
|
+
test:
|
5
|
+
parameters:
|
6
|
+
ruby:
|
7
|
+
type: string
|
4
8
|
docker:
|
5
|
-
- image:
|
9
|
+
- image: 'cimg/ruby:<< parameters.ruby >>'
|
6
10
|
steps:
|
7
11
|
- checkout
|
8
|
-
- run:
|
9
|
-
|
10
|
-
command: |
|
11
|
-
gem install bundler && \
|
12
|
-
bundle check || bundle install
|
13
|
-
- run:
|
14
|
-
name: Run rspec in parallel
|
15
|
-
command: |
|
16
|
-
bundle exec rspec --profile 10 \
|
17
|
-
--format RspecJunitFormatter \
|
18
|
-
--out test_results/rspec.xml \
|
19
|
-
--format progress \
|
20
|
-
$(circleci tests glob "spec/**/*_spec.rb" | circleci tests split --split-by=timings)
|
21
|
-
- store_test_results:
|
22
|
-
path: test_results
|
23
|
-
|
12
|
+
- run: bundle install
|
13
|
+
- run: bundle exec rspec
|
24
14
|
|
25
15
|
workflows:
|
26
16
|
version: 2
|
27
|
-
|
17
|
+
test:
|
28
18
|
jobs:
|
29
|
-
-
|
19
|
+
- test:
|
20
|
+
matrix:
|
21
|
+
parameters:
|
22
|
+
ruby: ['2.7', '3.1']
|
@@ -0,0 +1,23 @@
|
|
1
|
+
version: 2
|
2
|
+
registries:
|
3
|
+
rubygems-server-rubygems-pkg-github-com-carwow:
|
4
|
+
type: rubygems-server
|
5
|
+
url: https://rubygems.pkg.github.com/carwow
|
6
|
+
username: "${{secrets.RUBYGEMS_SERVER_RUBYGEMS_PKG_GITHUB_COM_CARWOW_USERNAME}}"
|
7
|
+
password: "${{secrets.RUBYGEMS_SERVER_RUBYGEMS_PKG_GITHUB_COM_CARWOW_PASSWORD}}"
|
8
|
+
|
9
|
+
updates:
|
10
|
+
- package-ecosystem: bundler
|
11
|
+
directory: "/"
|
12
|
+
schedule:
|
13
|
+
interval: daily
|
14
|
+
time: "09:00"
|
15
|
+
open-pull-requests-limit: 10
|
16
|
+
ignore:
|
17
|
+
- dependency-name: activesupport
|
18
|
+
versions:
|
19
|
+
- 6.1.2
|
20
|
+
- 6.1.2.1
|
21
|
+
- 6.1.3
|
22
|
+
registries:
|
23
|
+
- rubygems-server-rubygems-pkg-github-com-carwow
|
data/.gitignore
CHANGED
data/CHANGELOG.md
CHANGED
@@ -0,0 +1,25 @@
|
|
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
|
data/lib/restful_resource.rb
CHANGED
@@ -9,6 +9,7 @@ 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'
|
12
13
|
require_relative 'restful_resource/version'
|
13
14
|
require_relative 'restful_resource/null_logger'
|
14
15
|
require_relative 'restful_resource/paginated_array'
|
data/restful_resource.gemspec
CHANGED
@@ -16,7 +16,7 @@ Gem::Specification.new do |spec|
|
|
16
16
|
spec.executables = spec.files.grep(%r{^bin/}) { |f| File.basename(f) }
|
17
17
|
spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
|
18
18
|
spec.require_paths = ['lib']
|
19
|
-
spec.required_ruby_version = Gem::Requirement.new('>= 2.
|
19
|
+
spec.required_ruby_version = Gem::Requirement.new('>= 2.7.0')
|
20
20
|
|
21
21
|
spec.add_development_dependency 'bundler'
|
22
22
|
spec.add_development_dependency 'carwow_rubocop'
|
@@ -26,7 +26,7 @@ Gem::Specification.new do |spec|
|
|
26
26
|
spec.add_development_dependency 'rspec-its'
|
27
27
|
spec.add_development_dependency 'rspec_junit_formatter'
|
28
28
|
|
29
|
-
spec.add_dependency 'activesupport', '
|
29
|
+
spec.add_dependency 'activesupport', '>= 6', '< 8'
|
30
30
|
spec.add_dependency 'faraday', '~> 1.0'
|
31
31
|
spec.add_dependency 'faraday-cdn-metrics', '~> 0.2'
|
32
32
|
spec.add_dependency 'faraday-encoding'
|
@@ -0,0 +1,21 @@
|
|
1
|
+
require_relative '../spec_helper'
|
2
|
+
|
3
|
+
RSpec.describe RestfulResource::StrictOpenStruct do
|
4
|
+
let(:instance) { described_class.new(foo: 'bar') }
|
5
|
+
|
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
|
11
|
+
end
|
12
|
+
end
|
13
|
+
|
14
|
+
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
|
19
|
+
end
|
20
|
+
end
|
21
|
+
end
|
data/spec/spec_helper.rb
CHANGED
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.
|
4
|
+
version: 2.13.1
|
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:
|
12
|
+
date: 2022-09-07 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: bundler
|
@@ -113,16 +113,22 @@ dependencies:
|
|
113
113
|
name: activesupport
|
114
114
|
requirement: !ruby/object:Gem::Requirement
|
115
115
|
requirements:
|
116
|
-
- - "
|
116
|
+
- - ">="
|
117
|
+
- !ruby/object:Gem::Version
|
118
|
+
version: '6'
|
119
|
+
- - "<"
|
117
120
|
- !ruby/object:Gem::Version
|
118
|
-
version: '
|
121
|
+
version: '8'
|
119
122
|
type: :runtime
|
120
123
|
prerelease: false
|
121
124
|
version_requirements: !ruby/object:Gem::Requirement
|
122
125
|
requirements:
|
123
|
-
- - "
|
126
|
+
- - ">="
|
127
|
+
- !ruby/object:Gem::Version
|
128
|
+
version: '6'
|
129
|
+
- - "<"
|
124
130
|
- !ruby/object:Gem::Version
|
125
|
-
version: '
|
131
|
+
version: '8'
|
126
132
|
- !ruby/object:Gem::Dependency
|
127
133
|
name: faraday
|
128
134
|
requirement: !ruby/object:Gem::Requirement
|
@@ -246,12 +252,12 @@ extra_rdoc_files: []
|
|
246
252
|
files:
|
247
253
|
- ".circleci/config.yml"
|
248
254
|
- ".codeclimate.yml"
|
255
|
+
- ".github/dependabot.yml"
|
249
256
|
- ".gitignore"
|
250
257
|
- ".rubocop.yml"
|
251
258
|
- ".rubocop_todo.yml"
|
252
259
|
- CHANGELOG.md
|
253
260
|
- Gemfile
|
254
|
-
- Gemfile.lock
|
255
261
|
- LICENSE.txt
|
256
262
|
- README.md
|
257
263
|
- Rakefile
|
@@ -260,6 +266,7 @@ files:
|
|
260
266
|
- lib/restful_resource/associations.rb
|
261
267
|
- lib/restful_resource/authorization.rb
|
262
268
|
- lib/restful_resource/base.rb
|
269
|
+
- lib/restful_resource/deprecator.rb
|
263
270
|
- lib/restful_resource/http_client.rb
|
264
271
|
- lib/restful_resource/instrumentation.rb
|
265
272
|
- lib/restful_resource/null_logger.rb
|
@@ -284,12 +291,13 @@ files:
|
|
284
291
|
- spec/restful_resource/rails_validations_spec.rb
|
285
292
|
- spec/restful_resource/redirections_spec.rb
|
286
293
|
- spec/restful_resource/request_spec.rb
|
294
|
+
- spec/restful_resource/strict_open_struct_spec.rb
|
287
295
|
- spec/spec_helper.rb
|
288
296
|
homepage: http://www.github.com/carwow/restful_resource
|
289
297
|
licenses:
|
290
298
|
- MIT
|
291
299
|
metadata: {}
|
292
|
-
post_install_message:
|
300
|
+
post_install_message:
|
293
301
|
rdoc_options: []
|
294
302
|
require_paths:
|
295
303
|
- lib
|
@@ -297,15 +305,15 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
297
305
|
requirements:
|
298
306
|
- - ">="
|
299
307
|
- !ruby/object:Gem::Version
|
300
|
-
version: 2.
|
308
|
+
version: 2.7.0
|
301
309
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
302
310
|
requirements:
|
303
311
|
- - ">="
|
304
312
|
- !ruby/object:Gem::Version
|
305
313
|
version: '0'
|
306
314
|
requirements: []
|
307
|
-
rubygems_version: 3.1.
|
308
|
-
signing_key:
|
315
|
+
rubygems_version: 3.1.6
|
316
|
+
signing_key:
|
309
317
|
specification_version: 4
|
310
318
|
summary: A simple activerecord inspired rest resource base class implemented using
|
311
319
|
rest-client
|
@@ -320,4 +328,5 @@ test_files:
|
|
320
328
|
- spec/restful_resource/rails_validations_spec.rb
|
321
329
|
- spec/restful_resource/redirections_spec.rb
|
322
330
|
- spec/restful_resource/request_spec.rb
|
331
|
+
- spec/restful_resource/strict_open_struct_spec.rb
|
323
332
|
- spec/spec_helper.rb
|
data/Gemfile.lock
DELETED
@@ -1,123 +0,0 @@
|
|
1
|
-
PATH
|
2
|
-
remote: .
|
3
|
-
specs:
|
4
|
-
restful_resource (2.12.0)
|
5
|
-
activesupport (~> 6.0)
|
6
|
-
faraday (~> 1.0)
|
7
|
-
faraday-cdn-metrics (~> 0.2)
|
8
|
-
faraday-encoding
|
9
|
-
faraday-http-cache (~> 2.2)
|
10
|
-
faraday_middleware (~> 1.0)
|
11
|
-
link_header
|
12
|
-
rack (~> 2.2)
|
13
|
-
typhoeus (~> 1.4)
|
14
|
-
|
15
|
-
GEM
|
16
|
-
remote: https://rubygems.org/
|
17
|
-
specs:
|
18
|
-
activesupport (6.1.3.1)
|
19
|
-
concurrent-ruby (~> 1.0, >= 1.0.2)
|
20
|
-
i18n (>= 1.6, < 2)
|
21
|
-
minitest (>= 5.1)
|
22
|
-
tzinfo (~> 2.0)
|
23
|
-
zeitwerk (~> 2.3)
|
24
|
-
ast (2.4.1)
|
25
|
-
carwow_rubocop (3.4.1)
|
26
|
-
rubocop (>= 0.93)
|
27
|
-
rubocop-performance
|
28
|
-
rubocop-rspec
|
29
|
-
coderay (1.1.3)
|
30
|
-
concurrent-ruby (1.1.8)
|
31
|
-
diff-lcs (1.4.4)
|
32
|
-
ethon (0.12.0)
|
33
|
-
ffi (>= 1.3.0)
|
34
|
-
faraday (1.3.0)
|
35
|
-
faraday-net_http (~> 1.0)
|
36
|
-
multipart-post (>= 1.2, < 3)
|
37
|
-
ruby2_keywords
|
38
|
-
faraday-cdn-metrics (0.2.0)
|
39
|
-
faraday (~> 1)
|
40
|
-
faraday-encoding (0.0.5)
|
41
|
-
faraday
|
42
|
-
faraday-http-cache (2.2.0)
|
43
|
-
faraday (>= 0.8)
|
44
|
-
faraday-net_http (1.0.1)
|
45
|
-
faraday_middleware (1.0.0)
|
46
|
-
faraday (~> 1.0)
|
47
|
-
ffi (1.15.0)
|
48
|
-
i18n (1.8.9)
|
49
|
-
concurrent-ruby (~> 1.0)
|
50
|
-
link_header (0.0.8)
|
51
|
-
method_source (1.0.0)
|
52
|
-
minitest (5.14.4)
|
53
|
-
multipart-post (2.1.1)
|
54
|
-
parallel (1.20.0)
|
55
|
-
parser (2.7.2.0)
|
56
|
-
ast (~> 2.4.1)
|
57
|
-
pry (0.14.0)
|
58
|
-
coderay (~> 1.1)
|
59
|
-
method_source (~> 1.0)
|
60
|
-
rack (2.2.3)
|
61
|
-
rainbow (3.0.0)
|
62
|
-
rake (13.0.3)
|
63
|
-
regexp_parser (1.8.2)
|
64
|
-
rexml (3.2.4)
|
65
|
-
rspec (3.10.0)
|
66
|
-
rspec-core (~> 3.10.0)
|
67
|
-
rspec-expectations (~> 3.10.0)
|
68
|
-
rspec-mocks (~> 3.10.0)
|
69
|
-
rspec-core (3.10.0)
|
70
|
-
rspec-support (~> 3.10.0)
|
71
|
-
rspec-expectations (3.10.0)
|
72
|
-
diff-lcs (>= 1.2.0, < 2.0)
|
73
|
-
rspec-support (~> 3.10.0)
|
74
|
-
rspec-its (1.3.0)
|
75
|
-
rspec-core (>= 3.0.0)
|
76
|
-
rspec-expectations (>= 3.0.0)
|
77
|
-
rspec-mocks (3.10.0)
|
78
|
-
diff-lcs (>= 1.2.0, < 2.0)
|
79
|
-
rspec-support (~> 3.10.0)
|
80
|
-
rspec-support (3.10.0)
|
81
|
-
rspec_junit_formatter (0.4.1)
|
82
|
-
rspec-core (>= 2, < 4, != 2.12.0)
|
83
|
-
rubocop (1.3.0)
|
84
|
-
parallel (~> 1.10)
|
85
|
-
parser (>= 2.7.1.5)
|
86
|
-
rainbow (>= 2.2.2, < 4.0)
|
87
|
-
regexp_parser (>= 1.8)
|
88
|
-
rexml
|
89
|
-
rubocop-ast (>= 1.1.1)
|
90
|
-
ruby-progressbar (~> 1.7)
|
91
|
-
unicode-display_width (>= 1.4.0, < 2.0)
|
92
|
-
rubocop-ast (1.1.1)
|
93
|
-
parser (>= 2.7.1.5)
|
94
|
-
rubocop-performance (1.8.1)
|
95
|
-
rubocop (>= 0.87.0)
|
96
|
-
rubocop-ast (>= 0.4.0)
|
97
|
-
rubocop-rspec (2.0.0)
|
98
|
-
rubocop (~> 1.0)
|
99
|
-
rubocop-ast (>= 1.1.0)
|
100
|
-
ruby-progressbar (1.10.1)
|
101
|
-
ruby2_keywords (0.0.4)
|
102
|
-
typhoeus (1.4.0)
|
103
|
-
ethon (>= 0.9.0)
|
104
|
-
tzinfo (2.0.4)
|
105
|
-
concurrent-ruby (~> 1.0)
|
106
|
-
unicode-display_width (1.7.0)
|
107
|
-
zeitwerk (2.4.2)
|
108
|
-
|
109
|
-
PLATFORMS
|
110
|
-
ruby
|
111
|
-
|
112
|
-
DEPENDENCIES
|
113
|
-
bundler
|
114
|
-
carwow_rubocop
|
115
|
-
pry
|
116
|
-
rake
|
117
|
-
restful_resource!
|
118
|
-
rspec
|
119
|
-
rspec-its
|
120
|
-
rspec_junit_formatter
|
121
|
-
|
122
|
-
BUNDLED WITH
|
123
|
-
2.1.4
|