avro_schema_registry-client 0.2.0 → 0.5.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +5 -5
- data/.circleci/config.yml +71 -0
- data/.github/CODEOWNERS +1 -0
- data/.rubocop.yml +4 -1
- data/CHANGELOG.md +11 -0
- data/Gemfile +2 -0
- data/Rakefile +2 -0
- data/avro_schema_registry-client.gemspec +13 -8
- data/lib/avro_schema_registry/cached_client.rb +2 -0
- data/lib/avro_schema_registry/client.rb +3 -1
- data/lib/avro_schema_registry/test/fake_server.rb +3 -1
- data/lib/avro_schema_registry/version.rb +3 -1
- data/lib/avro_schema_registry-client.rb +2 -0
- metadata +43 -28
- data/.travis.yml +0 -7
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: 993f37e1f84dc06019f9ec6c37f40b6e779ce690b6fbf1b0ebc9116ef75bdf85
|
4
|
+
data.tar.gz: 28520d7b43a6c6c6a8e997b1626492c37b8c09be7e8b8c7825d1542f8a83e457
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 376e566157e0ece4aca43bc3f47972eef835e3175170b3aa1d4644d855807ac031d6c2551b72bdf32dc82257476b6071836eb15d100643d26d56bc7ff65b57b4
|
7
|
+
data.tar.gz: dd8c809f49305eadd3e1bc50af7bc27cf7d07d538576ca1f3a457c7dba2c528f0018234ab21d6f9f24ceddbb29fc696bf44f12c94b0f1851f040f2948f142fa7
|
@@ -0,0 +1,71 @@
|
|
1
|
+
version: 2.1
|
2
|
+
jobs:
|
3
|
+
lint:
|
4
|
+
docker:
|
5
|
+
- image: salsify/ruby_ci:2.7.6
|
6
|
+
working_directory: ~/avro_schema_registry-client
|
7
|
+
steps:
|
8
|
+
- checkout
|
9
|
+
- restore_cache:
|
10
|
+
keys:
|
11
|
+
- v1-gems-ruby-2.7.6-{{ checksum "avro_schema_registry-client.gemspec" }}-{{ checksum "Gemfile" }}
|
12
|
+
- v1-gems-ruby-2.7.6-
|
13
|
+
- run:
|
14
|
+
name: Install Gems
|
15
|
+
command: |
|
16
|
+
if ! bundle check --path=vendor/bundle; then
|
17
|
+
bundle install --path=vendor/bundle --jobs=4 --retry=3
|
18
|
+
bundle clean
|
19
|
+
fi
|
20
|
+
- save_cache:
|
21
|
+
key: v1-gems-ruby-2.7.6-{{ checksum "avro_schema_registry-client.gemspec" }}-{{ checksum "Gemfile" }}
|
22
|
+
paths:
|
23
|
+
- "vendor/bundle"
|
24
|
+
- "gemfiles/vendor/bundle"
|
25
|
+
- run:
|
26
|
+
name: Run Rubocop
|
27
|
+
command: bundle exec rubocop
|
28
|
+
test:
|
29
|
+
parameters:
|
30
|
+
ruby_version:
|
31
|
+
type: string
|
32
|
+
docker:
|
33
|
+
- image: salsify/ruby_ci:<< parameters.ruby_version >>
|
34
|
+
environment:
|
35
|
+
CIRCLE_TEST_REPORTS: "test-results"
|
36
|
+
working_directory: ~/avro_schema_registry-client
|
37
|
+
steps:
|
38
|
+
- checkout
|
39
|
+
- restore_cache:
|
40
|
+
keys:
|
41
|
+
- v1-gems-ruby-<< parameters.ruby_version >>-{{ checksum "avro_schema_registry-client.gemspec" }}-{{ checksum "Gemfile" }}
|
42
|
+
- v1-gems-ruby-<< parameters.ruby_version >>-
|
43
|
+
- run:
|
44
|
+
name: Install Gems
|
45
|
+
command: |
|
46
|
+
if ! bundle check --path=vendor/bundle; then
|
47
|
+
bundle install --path=vendor/bundle --jobs=4 --retry=3
|
48
|
+
bundle clean
|
49
|
+
fi
|
50
|
+
- save_cache:
|
51
|
+
key: v1-gems-ruby-<< parameters.ruby_version >>-{{ checksum "avro_schema_registry-client.gemspec" }}-{{ checksum "Gemfile" }}
|
52
|
+
paths:
|
53
|
+
- "vendor/bundle"
|
54
|
+
- "gemfiles/vendor/bundle"
|
55
|
+
- run:
|
56
|
+
name: Run Tests
|
57
|
+
command: |
|
58
|
+
bundle exec rspec --format RspecJunitFormatter --out $CIRCLE_TEST_REPORTS/rspec/junit.xml --format progress spec
|
59
|
+
- store_test_results:
|
60
|
+
path: "test-results"
|
61
|
+
workflows:
|
62
|
+
build:
|
63
|
+
jobs:
|
64
|
+
- lint
|
65
|
+
- test:
|
66
|
+
matrix:
|
67
|
+
parameters:
|
68
|
+
ruby_version:
|
69
|
+
- "2.7.6"
|
70
|
+
- "3.0.4"
|
71
|
+
- "3.1.2"
|
data/.github/CODEOWNERS
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
* @jturkel @tjwp @salsify/infrastructure-services
|
data/.rubocop.yml
CHANGED
data/CHANGELOG.md
CHANGED
@@ -1,5 +1,16 @@
|
|
1
1
|
# avro_schema_registry-client
|
2
2
|
|
3
|
+
## v0.5.0
|
4
|
+
- Require Ruby 2.7+
|
5
|
+
|
6
|
+
## v0.4.0
|
7
|
+
- Require Ruby 2.5+.
|
8
|
+
- Add support for Ruby 3.0.
|
9
|
+
|
10
|
+
## v0.3.0
|
11
|
+
- Require `avro-resolution_canonical_form` v0.2.0 or later to use
|
12
|
+
`avro-patches`.
|
13
|
+
|
3
14
|
## v0.2.0
|
4
15
|
- Add `register_without_lookup` method to `AvroSchemaRegistry::Client`.
|
5
16
|
|
data/Gemfile
CHANGED
data/Rakefile
CHANGED
@@ -1,5 +1,6 @@
|
|
1
|
-
#
|
2
|
-
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
lib = File.expand_path('lib', __dir__)
|
3
4
|
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
4
5
|
require 'avro_schema_registry/version'
|
5
6
|
|
@@ -18,6 +19,7 @@ Gem::Specification.new do |spec|
|
|
18
19
|
# Set 'allowed_push_post' to control where this gem can be published.
|
19
20
|
if spec.respond_to?(:metadata)
|
20
21
|
spec.metadata['allowed_push_host'] = 'https://rubygems.org'
|
22
|
+
spec.metadata['rubygems_mfa_required'] = 'true'
|
21
23
|
else
|
22
24
|
raise 'RubyGems 2.0 or newer is required to protect against public gem pushes.'
|
23
25
|
end
|
@@ -27,16 +29,19 @@ Gem::Specification.new do |spec|
|
|
27
29
|
spec.executables = spec.files.grep(%r{^bin/}) { |f| File.basename(f) }
|
28
30
|
spec.require_paths = ['lib']
|
29
31
|
|
30
|
-
spec.
|
31
|
-
|
32
|
-
spec.add_development_dependency '
|
33
|
-
spec.add_development_dependency 'salsify_rubocop', '~> 0.47.2'
|
32
|
+
spec.required_ruby_version = '>= 2.7'
|
33
|
+
|
34
|
+
spec.add_development_dependency 'bundler', '~> 2.0'
|
34
35
|
spec.add_development_dependency 'overcommit'
|
35
|
-
spec.add_development_dependency '
|
36
|
+
spec.add_development_dependency 'rake', '~> 13.0'
|
37
|
+
spec.add_development_dependency 'rspec', '~> 3.8'
|
38
|
+
spec.add_development_dependency 'rspec_junit_formatter'
|
39
|
+
spec.add_development_dependency 'salsify_rubocop', '~> 1.27.1'
|
36
40
|
spec.add_development_dependency 'simplecov'
|
41
|
+
spec.add_development_dependency 'webmock'
|
37
42
|
# For AvroSchemaRegistry::FakeServer
|
38
43
|
spec.add_development_dependency 'sinatra'
|
39
44
|
|
45
|
+
spec.add_runtime_dependency 'avro-resolution_canonical_form', '>= 0.2.0'
|
40
46
|
spec.add_runtime_dependency 'avro_turf', '>= 0.8.0'
|
41
|
-
spec.add_runtime_dependency 'avro-resolution_canonical_form'
|
42
47
|
end
|
@@ -1,3 +1,5 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
1
3
|
require 'avro_turf'
|
2
4
|
require 'avro_turf/confluent_schema_registry'
|
3
5
|
require 'avro-resolution_canonical_form'
|
@@ -23,7 +25,7 @@ module AvroSchemaRegistry
|
|
23
25
|
def register(subject, schema, **params)
|
24
26
|
lookup_subject_schema(subject, schema)
|
25
27
|
rescue Excon::Errors::NotFound
|
26
|
-
register_without_lookup(subject, schema, params)
|
28
|
+
register_without_lookup(subject, schema, **params)
|
27
29
|
end
|
28
30
|
|
29
31
|
def register_without_lookup(subject, schema, **params)
|
@@ -1,3 +1,5 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
1
3
|
require 'avro_turf/test/fake_confluent_schema_registry_server'
|
2
4
|
require 'avro-resolution_canonical_form'
|
3
5
|
|
@@ -8,7 +10,7 @@ module AvroSchemaRegistry
|
|
8
10
|
halt(404, SCHEMA_NOT_FOUND) unless SUBJECTS.key?(subject)
|
9
11
|
|
10
12
|
fingerprint = params[:fingerprint]
|
11
|
-
fingerprint = fingerprint.to_i.to_s(16) if /^\d
|
13
|
+
fingerprint = fingerprint.to_i.to_s(16) if /^\d+$/.match?(fingerprint)
|
12
14
|
|
13
15
|
schema_id = SCHEMAS.find_index do |schema|
|
14
16
|
Avro::Schema.parse(schema).sha256_resolution_fingerprint.to_s(16) == fingerprint
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: avro_schema_registry-client
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.5.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Salsify, Inc
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2022-09-09 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -16,58 +16,58 @@ dependencies:
|
|
16
16
|
requirements:
|
17
17
|
- - "~>"
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version: '
|
19
|
+
version: '2.0'
|
20
20
|
type: :development
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
24
|
- - "~>"
|
25
25
|
- !ruby/object:Gem::Version
|
26
|
-
version: '
|
26
|
+
version: '2.0'
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
|
-
name:
|
28
|
+
name: overcommit
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
30
30
|
requirements:
|
31
|
-
- - "
|
31
|
+
- - ">="
|
32
32
|
- !ruby/object:Gem::Version
|
33
|
-
version: '
|
33
|
+
version: '0'
|
34
34
|
type: :development
|
35
35
|
prerelease: false
|
36
36
|
version_requirements: !ruby/object:Gem::Requirement
|
37
37
|
requirements:
|
38
|
-
- - "
|
38
|
+
- - ">="
|
39
39
|
- !ruby/object:Gem::Version
|
40
|
-
version: '
|
40
|
+
version: '0'
|
41
41
|
- !ruby/object:Gem::Dependency
|
42
|
-
name:
|
42
|
+
name: rake
|
43
43
|
requirement: !ruby/object:Gem::Requirement
|
44
44
|
requirements:
|
45
45
|
- - "~>"
|
46
46
|
- !ruby/object:Gem::Version
|
47
|
-
version: '
|
47
|
+
version: '13.0'
|
48
48
|
type: :development
|
49
49
|
prerelease: false
|
50
50
|
version_requirements: !ruby/object:Gem::Requirement
|
51
51
|
requirements:
|
52
52
|
- - "~>"
|
53
53
|
- !ruby/object:Gem::Version
|
54
|
-
version: '
|
54
|
+
version: '13.0'
|
55
55
|
- !ruby/object:Gem::Dependency
|
56
|
-
name:
|
56
|
+
name: rspec
|
57
57
|
requirement: !ruby/object:Gem::Requirement
|
58
58
|
requirements:
|
59
59
|
- - "~>"
|
60
60
|
- !ruby/object:Gem::Version
|
61
|
-
version:
|
61
|
+
version: '3.8'
|
62
62
|
type: :development
|
63
63
|
prerelease: false
|
64
64
|
version_requirements: !ruby/object:Gem::Requirement
|
65
65
|
requirements:
|
66
66
|
- - "~>"
|
67
67
|
- !ruby/object:Gem::Version
|
68
|
-
version:
|
68
|
+
version: '3.8'
|
69
69
|
- !ruby/object:Gem::Dependency
|
70
|
-
name:
|
70
|
+
name: rspec_junit_formatter
|
71
71
|
requirement: !ruby/object:Gem::Requirement
|
72
72
|
requirements:
|
73
73
|
- - ">="
|
@@ -81,7 +81,21 @@ dependencies:
|
|
81
81
|
- !ruby/object:Gem::Version
|
82
82
|
version: '0'
|
83
83
|
- !ruby/object:Gem::Dependency
|
84
|
-
name:
|
84
|
+
name: salsify_rubocop
|
85
|
+
requirement: !ruby/object:Gem::Requirement
|
86
|
+
requirements:
|
87
|
+
- - "~>"
|
88
|
+
- !ruby/object:Gem::Version
|
89
|
+
version: 1.27.1
|
90
|
+
type: :development
|
91
|
+
prerelease: false
|
92
|
+
version_requirements: !ruby/object:Gem::Requirement
|
93
|
+
requirements:
|
94
|
+
- - "~>"
|
95
|
+
- !ruby/object:Gem::Version
|
96
|
+
version: 1.27.1
|
97
|
+
- !ruby/object:Gem::Dependency
|
98
|
+
name: simplecov
|
85
99
|
requirement: !ruby/object:Gem::Requirement
|
86
100
|
requirements:
|
87
101
|
- - ">="
|
@@ -95,7 +109,7 @@ dependencies:
|
|
95
109
|
- !ruby/object:Gem::Version
|
96
110
|
version: '0'
|
97
111
|
- !ruby/object:Gem::Dependency
|
98
|
-
name:
|
112
|
+
name: webmock
|
99
113
|
requirement: !ruby/object:Gem::Requirement
|
100
114
|
requirements:
|
101
115
|
- - ">="
|
@@ -123,33 +137,33 @@ dependencies:
|
|
123
137
|
- !ruby/object:Gem::Version
|
124
138
|
version: '0'
|
125
139
|
- !ruby/object:Gem::Dependency
|
126
|
-
name:
|
140
|
+
name: avro-resolution_canonical_form
|
127
141
|
requirement: !ruby/object:Gem::Requirement
|
128
142
|
requirements:
|
129
143
|
- - ">="
|
130
144
|
- !ruby/object:Gem::Version
|
131
|
-
version: 0.
|
145
|
+
version: 0.2.0
|
132
146
|
type: :runtime
|
133
147
|
prerelease: false
|
134
148
|
version_requirements: !ruby/object:Gem::Requirement
|
135
149
|
requirements:
|
136
150
|
- - ">="
|
137
151
|
- !ruby/object:Gem::Version
|
138
|
-
version: 0.
|
152
|
+
version: 0.2.0
|
139
153
|
- !ruby/object:Gem::Dependency
|
140
|
-
name:
|
154
|
+
name: avro_turf
|
141
155
|
requirement: !ruby/object:Gem::Requirement
|
142
156
|
requirements:
|
143
157
|
- - ">="
|
144
158
|
- !ruby/object:Gem::Version
|
145
|
-
version:
|
159
|
+
version: 0.8.0
|
146
160
|
type: :runtime
|
147
161
|
prerelease: false
|
148
162
|
version_requirements: !ruby/object:Gem::Requirement
|
149
163
|
requirements:
|
150
164
|
- - ">="
|
151
165
|
- !ruby/object:Gem::Version
|
152
|
-
version:
|
166
|
+
version: 0.8.0
|
153
167
|
description: Client for the avro-schema-registry app
|
154
168
|
email:
|
155
169
|
- engineering@salsify.com
|
@@ -159,11 +173,12 @@ executables:
|
|
159
173
|
extensions: []
|
160
174
|
extra_rdoc_files: []
|
161
175
|
files:
|
176
|
+
- ".circleci/config.yml"
|
177
|
+
- ".github/CODEOWNERS"
|
162
178
|
- ".gitignore"
|
163
179
|
- ".overcommit.yml"
|
164
180
|
- ".rspec"
|
165
181
|
- ".rubocop.yml"
|
166
|
-
- ".travis.yml"
|
167
182
|
- CHANGELOG.md
|
168
183
|
- Gemfile
|
169
184
|
- LICENSE.txt
|
@@ -182,6 +197,7 @@ licenses:
|
|
182
197
|
- MIT
|
183
198
|
metadata:
|
184
199
|
allowed_push_host: https://rubygems.org
|
200
|
+
rubygems_mfa_required: 'true'
|
185
201
|
post_install_message:
|
186
202
|
rdoc_options: []
|
187
203
|
require_paths:
|
@@ -190,15 +206,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
190
206
|
requirements:
|
191
207
|
- - ">="
|
192
208
|
- !ruby/object:Gem::Version
|
193
|
-
version: '
|
209
|
+
version: '2.7'
|
194
210
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
195
211
|
requirements:
|
196
212
|
- - ">="
|
197
213
|
- !ruby/object:Gem::Version
|
198
214
|
version: '0'
|
199
215
|
requirements: []
|
200
|
-
|
201
|
-
rubygems_version: 2.6.11
|
216
|
+
rubygems_version: 3.3.7
|
202
217
|
signing_key:
|
203
218
|
specification_version: 4
|
204
219
|
summary: Client for the avro-schema-registry app
|