avro_schema_registry-client 0.3.0 → 0.4.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: 2b48d42f60721ab9778a526fb0d08ab580c32dae
4
- data.tar.gz: 91c891b480c8722a70d982caa9cf6134eeb8fe00
2
+ SHA256:
3
+ metadata.gz: d5180aef6c0348c6f962fa1697b5817691b5256f629ab5a7dca9f71f7b60d324
4
+ data.tar.gz: ffca96f5f976157dddfb73f14a0f243b0f04db214c13ad4a725bd0d3be62b49f
5
5
  SHA512:
6
- metadata.gz: 045d2522936cef2773cb4fbb2c19a73eed05e743110d93bc9d87b2a5a40d721d79df72020cfe5a897440a97f7683eed96e57fa1900d0bcb8c8761aa4e5b2ca24
7
- data.tar.gz: c457a4ca0ac3b58654134d30d4c45e6d87cb842734ddb7b318fe27f4325f082211d32ff75de20181008f4f623ea7b4ebc636a0ba26678228749c71bf9cabcf69
6
+ metadata.gz: 179243f99d3358711a8ea9fac781512833047a152be625cb0c48900e6ee28279530e46a19f13af798cb6b66b58144328797e9ddb6079ac8d07d8e86626e1cd12
7
+ data.tar.gz: cdc45f98d7daf42097821badc0db65f7bb5c932ff9b009a00e89fdca4520edc4b07d61a837e56e587f2fa12267ec91ad696f2c703144cc367cb9e078bdebac70
@@ -0,0 +1,70 @@
1
+ version: 2.1
2
+ jobs:
3
+ lint:
4
+ docker:
5
+ - image: salsify/ruby_ci:2.5.8
6
+ working_directory: ~/avro_schema_registry-client
7
+ steps:
8
+ - checkout
9
+ - restore_cache:
10
+ keys:
11
+ - v1-gems-ruby-2.5.8-{{ checksum "avro_schema_registry-client.gemspec" }}-{{ checksum "Gemfile" }}
12
+ - v1-gems-ruby-2.5.8-
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.5.8-{{ 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.5.8"
70
+ - "3.0.0"
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.5
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,9 @@
1
1
  # avro_schema_registry-client
2
2
 
3
+ ## v0.4.0 (Unreleased)
4
+ - Require Ruby 2.5+.
5
+ - Add support for Ruby 3.0.
6
+
3
7
  ## v0.3.0
4
8
  - Require `avro-resolution_canonical_form` v0.2.0 or later to use
5
9
  `avro-patches`.
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
 
@@ -27,16 +28,19 @@ Gem::Specification.new do |spec|
27
28
  spec.executables = spec.files.grep(%r{^bin/}) { |f| File.basename(f) }
28
29
  spec.require_paths = ['lib']
29
30
 
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'
31
+ spec.required_ruby_version = '>= 2.5'
32
+
33
+ spec.add_development_dependency 'bundler', '~> 2.0'
34
34
  spec.add_development_dependency 'overcommit'
35
- spec.add_development_dependency 'webmock'
35
+ spec.add_development_dependency 'rake', '~> 10.0'
36
+ spec.add_development_dependency 'rspec', '~> 3.8'
37
+ spec.add_development_dependency 'rspec_junit_formatter'
38
+ spec.add_development_dependency 'salsify_rubocop', '~> 1.0.0'
36
39
  spec.add_development_dependency 'simplecov'
40
+ spec.add_development_dependency 'webmock'
37
41
  # For AvroSchemaRegistry::FakeServer
38
42
  spec.add_development_dependency 'sinatra'
39
43
 
40
- spec.add_runtime_dependency 'avro_turf', '>= 0.8.0'
41
44
  spec.add_runtime_dependency 'avro-resolution_canonical_form', '>= 0.2.0'
45
+ spec.add_runtime_dependency 'avro_turf', '>= 0.8.0'
42
46
  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'
@@ -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.3.0'.freeze
4
+ VERSION = '0.4.0'
3
5
  end
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.3.0
4
+ version: 0.4.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Salsify, Inc
8
- autorequire:
8
+ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2017-06-01 00:00:00.000000000 Z
11
+ date: 2021-02-01 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: '10.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: '10.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.0.0
90
+ type: :development
91
+ prerelease: false
92
+ version_requirements: !ruby/object:Gem::Requirement
93
+ requirements:
94
+ - - "~>"
95
+ - !ruby/object:Gem::Version
96
+ version: 1.0.0
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.2.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.2.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,11 @@ executables:
159
173
  extensions: []
160
174
  extra_rdoc_files: []
161
175
  files:
176
+ - ".circleci/config.yml"
162
177
  - ".gitignore"
163
178
  - ".overcommit.yml"
164
179
  - ".rspec"
165
180
  - ".rubocop.yml"
166
- - ".travis.yml"
167
181
  - CHANGELOG.md
168
182
  - Gemfile
169
183
  - LICENSE.txt
@@ -182,7 +196,7 @@ licenses:
182
196
  - MIT
183
197
  metadata:
184
198
  allowed_push_host: https://rubygems.org
185
- post_install_message:
199
+ post_install_message:
186
200
  rdoc_options: []
187
201
  require_paths:
188
202
  - lib
@@ -190,16 +204,15 @@ required_ruby_version: !ruby/object:Gem::Requirement
190
204
  requirements:
191
205
  - - ">="
192
206
  - !ruby/object:Gem::Version
193
- version: '0'
207
+ version: '2.5'
194
208
  required_rubygems_version: !ruby/object:Gem::Requirement
195
209
  requirements:
196
210
  - - ">="
197
211
  - !ruby/object:Gem::Version
198
212
  version: '0'
199
213
  requirements: []
200
- rubyforge_project:
201
- rubygems_version: 2.6.12
202
- signing_key:
214
+ rubygems_version: 3.2.3
215
+ signing_key:
203
216
  specification_version: 4
204
217
  summary: Client for the avro-schema-registry app
205
218
  test_files: []
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