avro-patches 0.3.1 → 0.3.2

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
  SHA1:
3
- metadata.gz: 676a9d9b3febd0bdde356e8215466ec4605ffc4b
4
- data.tar.gz: 4623aad3b6d0c7c7e50e4eedf86e3bdabf5c5b70
3
+ metadata.gz: cead23f8f8b193155fa09f74ea11fbf93ef2f82a
4
+ data.tar.gz: 898e50b87cf7131ae6e70d702d29b5fb5130a0b9
5
5
  SHA512:
6
- metadata.gz: cd158af3a8f6912e003a01785700bec22525dfbbc39711f8a545afda49871080f97d6df54b6bf622dcf586eb78fb9316144d42c4f74c9714fe387efa00a6197f
7
- data.tar.gz: 1d9cc525627b20fc67e860edd4d152f6e644f35b210dd12d703f1a088bec17ef8ea399dc4420489cc0224d2ad711901fc36993c7e5685715795bc2c192418ccc
6
+ metadata.gz: 5180f690479d7c98bb404112ae1789164f333068ebb6f388385e18bb0c50e4c00fc2fb12703c112c44a7ea344d159c2aab9dd168f33eab09e05614641a9490ab
7
+ data.tar.gz: 108e130bc1452bf63fa5fe89cd487030bef60243d72b3e15ed4cc9443694e4343beaf8cabcee654da3e0d72b9de0ce126fd33dcd0ea651b1e1f2167beb5fcfd3
@@ -1,5 +1,8 @@
1
1
  # avro-patches
2
2
 
3
+ ## v0.3.2
4
+ - Fix remaining Ruby 2.4 deprecation notices by replacing `require 'avro'`.
5
+
3
6
  ## v0.3.1
4
7
  - Fix references to `Avro::SchemaParseError` and `Avro::UnknownSchemaError`.
5
8
 
@@ -1,7 +1,40 @@
1
1
  require 'avro-patches/version'
2
2
 
3
- require 'avro'
3
+ # Calling require 'avro' leads to deprecation notices because requiring
4
+ # 'avro/ipc' calls methods that this gem patches.
5
+ #
6
+ # Replicate the require statements from avro.rb so that we can insert
7
+ # patches into the load order:
8
+
9
+ require 'multi_json'
10
+ require 'set'
11
+ require 'digest/md5'
12
+ require 'net/http'
13
+ require 'stringio'
14
+ require 'zlib'
15
+
16
+ module Avro
17
+ class AvroError < StandardError; end
18
+
19
+ class AvroTypeError < Avro::AvroError
20
+ def initialize(schm=nil, datum=nil, msg=nil)
21
+ msg ||= "Not a #{schm.to_s}: #{datum}"
22
+ super(msg)
23
+ end
24
+ end
25
+ end
26
+
27
+ require 'avro/schema'
28
+ require 'avro/io'
29
+ require 'avro/schema_normalization'
30
+
31
+ # insert avro-patches
4
32
  require 'avro-patches/ensure_encoding'
5
33
  require 'avro-patches/schema_validator'
6
34
  require 'avro-patches/logical_types'
7
35
  require 'avro-patches/schema_compatibility'
36
+
37
+ # Remaining requires from the official avro gem
38
+ require 'avro/data_file'
39
+ require 'avro/protocol'
40
+ require 'avro/ipc'
@@ -1,3 +1,3 @@
1
1
  module AvroPatches
2
- VERSION = '0.3.1'.freeze
2
+ VERSION = '0.3.2'.freeze
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: avro-patches
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.1
4
+ version: 0.3.2
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-07-12 00:00:00.000000000 Z
11
+ date: 2017-08-01 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -140,7 +140,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
140
140
  version: '0'
141
141
  requirements: []
142
142
  rubyforge_project:
143
- rubygems_version: 2.6.12
143
+ rubygems_version: 2.6.11
144
144
  signing_key:
145
145
  specification_version: 4
146
146
  summary: Patches for the official Apache Avro Ruby implementation