avromatic 0.26.0 → 0.27.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
2
  SHA1:
3
- metadata.gz: 451fd9fa685dddd983664ea80d4837c11a817ded
4
- data.tar.gz: 8f193cd2ccb68e0499ebee10d601f4718ac9b280
3
+ metadata.gz: 5a60c2a9d61072d44905624ea8310ed0ca91d5c0
4
+ data.tar.gz: 40bd23b5fbf401cb46ce58970b687e2dd914404a
5
5
  SHA512:
6
- metadata.gz: c671e40b23ac5ebb2daf9c2eef85e9e04f549b73130559415c14eef0dfb74eb9684f9d5fbe0829d8c708736ae39cafa0654eafc632c91cfc4f76363b9f4bf121
7
- data.tar.gz: 588a53eff19801d108cd487c1e77a75b1112ccfef4def3bd37a1ac1a291194e20ff9b61d12a7caf54416458c193bfdb7a912b3d1a306a15f44957217f602b583
6
+ metadata.gz: 1a7848c367f7bce862b342d6127438d8f9edc4b69c015700699fb0a8e3fbdacc86efe9f7df605225d336c6cc9930782183f4cf49ad2d337b9506226de7971b46
7
+ data.tar.gz: 8d345cf24135af8f4fc9712b6a6d48f9bb9aa7696b276945653cc528c93fc3e550bb984fdf788e5b8846741da015b7de443951a7851dfcf73af45d85599ccaab
data/.gitignore CHANGED
@@ -8,3 +8,4 @@
8
8
  /spec/reports/
9
9
  /tmp/
10
10
  /gemfiles/*.lock
11
+ /log/*
data/.travis.yml CHANGED
@@ -10,5 +10,7 @@ script:
10
10
  - bundle exec appraisal rails4_1 rake spec
11
11
  - bundle exec appraisal rails4_2 rake spec
12
12
  - bundle exec appraisal rails5_0 rake spec
13
+ - bundle exec appraisal rails5_1 rake spec
13
14
  - bundle exec appraisal avro-patches-4_1 rake spec
14
15
  - bundle exec appraisal avro-patches-5_0 rake spec
16
+ - bundle exec appraisal avro-patches-5_1 rake spec
data/Appraisals CHANGED
@@ -12,8 +12,14 @@ end
12
12
 
13
13
  appraise 'rails5_0' do
14
14
  gem 'avro', '1.8.2'
15
- gem 'activesupport', '~> 5.0.3'
16
- gem 'activemodel', '~> 5.0.3'
15
+ gem 'activesupport', '~> 5.0.5'
16
+ gem 'activemodel', '~> 5.0.5'
17
+ end
18
+
19
+ appraise 'rails5_1' do
20
+ gem 'avro', '1.8.2'
21
+ gem 'activesupport', '~> 5.1.2'
22
+ gem 'activemodel', '~> 5.1.2'
17
23
  end
18
24
 
19
25
  appraise 'avro-patches-4_1' do
@@ -24,6 +30,12 @@ end
24
30
 
25
31
  appraise 'avro-patches-5_0' do
26
32
  gem 'avro-patches'
27
- gem 'activesupport', '~> 5.0.3'
28
- gem 'activemodel', '~> 5.0.3'
33
+ gem 'activesupport', '~> 5.0.5'
34
+ gem 'activemodel', '~> 5.0.5'
35
+ end
36
+
37
+ appraise 'avro-patches-5_1' do
38
+ gem 'avro-patches'
39
+ gem 'activesupport', '~> 5.1.2'
40
+ gem 'activemodel', '~> 5.1.2'
29
41
  end
data/CHANGELOG.md CHANGED
@@ -1,5 +1,9 @@
1
1
  # avromatic changelog
2
2
 
3
+ ## v0.27.0
4
+ - Patches avromatic model classes to cache `Virtus::ValueObject::AllowedWriterMethods#allowed_writer_methods`
5
+ - Support Rails 5.1
6
+
3
7
  ## v0.26.0
4
8
  - Caches result of Avromatic::Model::RawSerialization#value_attributes_for_avro for immutable models
5
9
 
data/avromatic.gemspec CHANGED
@@ -22,8 +22,8 @@ Gem::Specification.new do |spec|
22
22
 
23
23
  spec.add_runtime_dependency 'avro', '>= 1.7.7'
24
24
  spec.add_runtime_dependency 'virtus'
25
- spec.add_runtime_dependency 'activesupport', '>= 4.1', '< 5.1'
26
- spec.add_runtime_dependency 'activemodel', '>= 4.1', '< 5.1'
25
+ spec.add_runtime_dependency 'activesupport', '>= 4.1', '< 5.2'
26
+ spec.add_runtime_dependency 'activemodel', '>= 4.1', '< 5.2'
27
27
  spec.add_runtime_dependency 'avro_turf'
28
28
  spec.add_runtime_dependency 'avro_schema_registry-client', '>= 0.3.0'
29
29
 
@@ -0,0 +1,2 @@
1
+ ---
2
+ BUNDLE_RETRY: "1"
@@ -6,4 +6,4 @@ gem "avro-patches"
6
6
  gem "activesupport", "~> 4.1.16"
7
7
  gem "activemodel", "~> 4.1.16"
8
8
 
9
- gemspec :path => "../"
9
+ gemspec path: "../"
@@ -3,7 +3,7 @@
3
3
  source "https://rubygems.org"
4
4
 
5
5
  gem "avro-patches"
6
- gem "activesupport", "~> 5.0.3"
7
- gem "activemodel", "~> 5.0.3"
6
+ gem "activesupport", "~> 5.0.5"
7
+ gem "activemodel", "~> 5.0.5"
8
8
 
9
- gemspec :path => "../"
9
+ gemspec path: "../"
@@ -0,0 +1,9 @@
1
+ # This file was generated by Appraisal
2
+
3
+ source "https://rubygems.org"
4
+
5
+ gem "avro-patches"
6
+ gem "activesupport", "~> 5.1.2"
7
+ gem "activemodel", "~> 5.1.2"
8
+
9
+ gemspec path: "../"
@@ -6,4 +6,4 @@ gem "avro", "1.8.2"
6
6
  gem "activesupport", "~> 4.1.16"
7
7
  gem "activemodel", "~> 4.1.16"
8
8
 
9
- gemspec :path => "../"
9
+ gemspec path: "../"
@@ -6,4 +6,4 @@ gem "avro", "1.8.2"
6
6
  gem "activesupport", "~> 4.2.7.1"
7
7
  gem "activemodel", "~> 4.2.7.1"
8
8
 
9
- gemspec :path => "../"
9
+ gemspec path: "../"
@@ -3,7 +3,7 @@
3
3
  source "https://rubygems.org"
4
4
 
5
5
  gem "avro", "1.8.2"
6
- gem "activesupport", "~> 5.0.3"
7
- gem "activemodel", "~> 5.0.3"
6
+ gem "activesupport", "~> 5.0.5"
7
+ gem "activemodel", "~> 5.0.5"
8
8
 
9
- gemspec :path => "../"
9
+ gemspec path: "../"
@@ -0,0 +1,9 @@
1
+ # This file was generated by Appraisal
2
+
3
+ source "https://rubygems.org"
4
+
5
+ gem "avro", "1.8.2"
6
+ gem "activesupport", "~> 5.1.2"
7
+ gem "activemodel", "~> 5.1.2"
8
+
9
+ gemspec path: "../"
@@ -0,0 +1,16 @@
1
+ module Avromatic
2
+ module Model
3
+ module AllowedWriterMethodsMemoization
4
+ def self.included(base)
5
+ base.class_attribute :virtus_object_allowed_writer_methods
6
+ base.prepend(InstanceMethods)
7
+ end
8
+
9
+ module InstanceMethods
10
+ def allowed_writer_methods
11
+ self.class.virtus_object_allowed_writer_methods ||= super
12
+ end
13
+ end
14
+ end
15
+ end
16
+ end
@@ -1,6 +1,7 @@
1
1
  require 'virtus'
2
2
  require 'active_support/concern'
3
3
  require 'active_model'
4
+ require 'avromatic/model/allowed_writer_methods_memoization'
4
5
  require 'avromatic/model/configuration'
5
6
  require 'avromatic/model/value_object'
6
7
  require 'avromatic/model/configurable'
@@ -43,6 +44,7 @@ module Avromatic
43
44
  [
44
45
  ActiveModel::Validations,
45
46
  config.mutable ? Virtus.model : Virtus.value_object,
47
+ Avromatic::Model::AllowedWriterMethodsMemoization,
46
48
  Avromatic::Model::Configurable,
47
49
  Avromatic::Model::NestedModels,
48
50
  Avromatic::Model::Validation,
@@ -1,3 +1,3 @@
1
1
  module Avromatic
2
- VERSION = '0.26.0'.freeze
2
+ VERSION = '0.27.0'.freeze
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: avromatic
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.26.0
4
+ version: 0.27.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Salsify Engineering
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2017-07-24 00:00:00.000000000 Z
11
+ date: 2017-08-02 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: avro
@@ -47,7 +47,7 @@ dependencies:
47
47
  version: '4.1'
48
48
  - - "<"
49
49
  - !ruby/object:Gem::Version
50
- version: '5.1'
50
+ version: '5.2'
51
51
  type: :runtime
52
52
  prerelease: false
53
53
  version_requirements: !ruby/object:Gem::Requirement
@@ -57,7 +57,7 @@ dependencies:
57
57
  version: '4.1'
58
58
  - - "<"
59
59
  - !ruby/object:Gem::Version
60
- version: '5.1'
60
+ version: '5.2'
61
61
  - !ruby/object:Gem::Dependency
62
62
  name: activemodel
63
63
  requirement: !ruby/object:Gem::Requirement
@@ -67,7 +67,7 @@ dependencies:
67
67
  version: '4.1'
68
68
  - - "<"
69
69
  - !ruby/object:Gem::Version
70
- version: '5.1'
70
+ version: '5.2'
71
71
  type: :runtime
72
72
  prerelease: false
73
73
  version_requirements: !ruby/object:Gem::Requirement
@@ -77,7 +77,7 @@ dependencies:
77
77
  version: '4.1'
78
78
  - - "<"
79
79
  - !ruby/object:Gem::Version
80
- version: '5.1'
80
+ version: '5.2'
81
81
  - !ruby/object:Gem::Dependency
82
82
  name: avro_turf
83
83
  requirement: !ruby/object:Gem::Requirement
@@ -267,17 +267,21 @@ files:
267
267
  - avromatic.gemspec
268
268
  - bin/console
269
269
  - bin/setup
270
+ - gemfiles/.bundle/config
270
271
  - gemfiles/avro_patches_4_1.gemfile
271
272
  - gemfiles/avro_patches_5_0.gemfile
273
+ - gemfiles/avro_patches_5_1.gemfile
272
274
  - gemfiles/rails4_1.gemfile
273
275
  - gemfiles/rails4_2.gemfile
274
276
  - gemfiles/rails5_0.gemfile
277
+ - gemfiles/rails5_1.gemfile
275
278
  - lib/avromatic.rb
276
279
  - lib/avromatic/io.rb
277
280
  - lib/avromatic/io/datum_reader.rb
278
281
  - lib/avromatic/io/datum_writer.rb
279
282
  - lib/avromatic/messaging.rb
280
283
  - lib/avromatic/model.rb
284
+ - lib/avromatic/model/allowed_writer_methods_memoization.rb
281
285
  - lib/avromatic/model/attribute/abstract_timestamp.rb
282
286
  - lib/avromatic/model/attribute/record.rb
283
287
  - lib/avromatic/model/attribute/timestamp_micros.rb