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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
- SHA1:
3
- metadata.gz: d255f0720f3c11b231fe828a6bd731b0e605e8d9
4
- data.tar.gz: c961d73efc7bd4994bfd1f046fe9e9294199c10c
2
+ SHA256:
3
+ metadata.gz: 993f37e1f84dc06019f9ec6c37f40b6e779ce690b6fbf1b0ebc9116ef75bdf85
4
+ data.tar.gz: 28520d7b43a6c6c6a8e997b1626492c37b8c09be7e8b8c7825d1542f8a83e457
5
5
  SHA512:
6
- metadata.gz: 67114107c1fdea6397cedc6a7005eaae753485046c27c52d62f35431cf1a6856e531e4293d9824c674a1c55c777376ab43962df68214625aa2517ac3bafa27ea
7
- data.tar.gz: 4fe9f755ec382129d59565d70ca89876a153f4cfc6a3622e89714ebf8bc3373f51f26eec14aaeb0b73819fcf3389de922444ba3e8e16148636d7ba42f9960a28
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"
@@ -0,0 +1 @@
1
+ * @jturkel @tjwp @salsify/infrastructure-services
data/.rubocop.yml CHANGED
@@ -1,7 +1,10 @@
1
1
  inherit_gem:
2
2
  salsify_rubocop: conf/rubocop.yml
3
3
 
4
- Style/FileName:
4
+ AllCops:
5
+ TargetRubyVersion: 2.7
6
+
7
+ Naming/FileName:
5
8
  Exclude:
6
9
  - 'lib/avro_schema_registry-client.rb'
7
10
  - 'spec/avro_schema_registry-client_spec.rb'
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
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  source 'https://rubygems.org'
2
4
 
3
5
  # override the :github shortcut to be secure by using HTTPS
data/Rakefile CHANGED
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  require 'bundler/gem_tasks'
2
4
 
3
5
 
@@ -1,5 +1,6 @@
1
- # coding: utf-8
2
- lib = File.expand_path('../lib', __FILE__)
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.add_development_dependency 'bundler', '~> 1.12'
31
- spec.add_development_dependency 'rake', '~> 10.0'
32
- spec.add_development_dependency 'rspec', '~> 3.4'
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 'webmock'
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/cached_confluent_schema_registry'
2
4
 
3
5
  module AvroSchemaRegistry
@@ -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+$/ =~ fingerprint
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
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module AvroSchemaRegistry
2
- VERSION = '0.2.0'.freeze
4
+ VERSION = '0.5.0'
3
5
  end
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  require 'avro_schema_registry/version'
2
4
  require 'avro_schema_registry/client'
3
5
  require 'avro_schema_registry/cached_client'
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.2.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: 2017-04-13 00:00:00.000000000 Z
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: '1.12'
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: '1.12'
26
+ version: '2.0'
27
27
  - !ruby/object:Gem::Dependency
28
- name: rake
28
+ name: overcommit
29
29
  requirement: !ruby/object:Gem::Requirement
30
30
  requirements:
31
- - - "~>"
31
+ - - ">="
32
32
  - !ruby/object:Gem::Version
33
- version: '10.0'
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: '10.0'
40
+ version: '0'
41
41
  - !ruby/object:Gem::Dependency
42
- name: rspec
42
+ name: rake
43
43
  requirement: !ruby/object:Gem::Requirement
44
44
  requirements:
45
45
  - - "~>"
46
46
  - !ruby/object:Gem::Version
47
- version: '3.4'
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: '3.4'
54
+ version: '13.0'
55
55
  - !ruby/object:Gem::Dependency
56
- name: salsify_rubocop
56
+ name: rspec
57
57
  requirement: !ruby/object:Gem::Requirement
58
58
  requirements:
59
59
  - - "~>"
60
60
  - !ruby/object:Gem::Version
61
- version: 0.47.2
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: 0.47.2
68
+ version: '3.8'
69
69
  - !ruby/object:Gem::Dependency
70
- name: overcommit
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: webmock
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: simplecov
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: avro_turf
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.8.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.8.0
152
+ version: 0.2.0
139
153
  - !ruby/object:Gem::Dependency
140
- name: avro-resolution_canonical_form
154
+ name: avro_turf
141
155
  requirement: !ruby/object:Gem::Requirement
142
156
  requirements:
143
157
  - - ">="
144
158
  - !ruby/object:Gem::Version
145
- version: '0'
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: '0'
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: '0'
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
- rubyforge_project:
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
data/.travis.yml DELETED
@@ -1,7 +0,0 @@
1
- language: ruby
2
- rvm:
3
- - 2.3.4
4
- before_install: gem install bundler -v 1.14.6
5
- script:
6
- - bundle exec rubocop
7
- - bundle exec rspec