protobuf-activerecord 3.2.1 → 3.2.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 043d45ce686ee0a930ea7aee24fdd56737d3535d
4
- data.tar.gz: 145090542220062b92f1708920ab30b901dfa108
3
+ metadata.gz: 90545cb2f19b9a54086785f64eb7f6aeca67c17f
4
+ data.tar.gz: da7799d0f3deb1e2ed5f95d39df427f7ac5ca2f9
5
5
  SHA512:
6
- metadata.gz: e02a40872c328a7da092e36685511baf307a46d6a0a4e66e5a6f2f621f6fbbc199deaeb00aced709f7fd957866f8e6106acef0f72d7491a829a4920d2adfe14e
7
- data.tar.gz: 3159dd77e7b3b3b7ddbc10b9c92d7a73ac6786aa412b0afc83984efc5905b7bf2940e0793f68bf6d62007dd86d10c39187ec0932a306bcfda9cdd014f4bd9107
6
+ metadata.gz: 04345ee9db33e0212bfa94d12c994412ed8326c40bdc3b737735494054dd7f756c4fe0d14855a89b48d119fd57d534d53d33cd762d3ab43fb40ffb18a570e0d6
7
+ data.tar.gz: 7dabbb91f14d697099776512a688611326900609366684b5dda15c37eb95cddacacd1be152fc5e516bf600bca3803b82e823ca2d5e108716999d176fb8ce33ab
@@ -1,3 +1,4 @@
1
+ require 'set'
1
2
  require 'active_support/concern'
2
3
 
3
4
  module Protobuf
@@ -46,7 +47,7 @@ module Protobuf
46
47
  return if _protobuf_mapped_columns?
47
48
 
48
49
  @_protobuf_columns = {}
49
- @_protobuf_column_types = Hash.new { |h,k| h[k] = [] }
50
+ @_protobuf_column_types = ::Hash.new { |h,k| h[k] = ::Set.new }
50
51
 
51
52
  columns.map do |column|
52
53
  @_protobuf_columns[column.name.to_sym] = column
@@ -15,6 +15,7 @@ module Protobuf
15
15
  def nullify?(proto)
16
16
  return false unless options[:nullify_on]
17
17
  return false unless proto.field?(:nullify) && proto.nullify.is_a?(Array)
18
+ return false if proto.nullify.empty?
18
19
 
19
20
  proto.nullify.include?(options[:nullify_on].to_s)
20
21
  end
@@ -1,5 +1,5 @@
1
1
  module Protobuf
2
2
  module ActiveRecord
3
- VERSION = "3.2.1"
3
+ VERSION = "3.2.2"
4
4
  end
5
5
  end
@@ -12,7 +12,7 @@ describe Protobuf::ActiveRecord::Columns do
12
12
 
13
13
  let(:expected_column_types) {
14
14
  User.columns.inject({}) do |hash, column|
15
- hash[column.type.to_sym] ||= []
15
+ hash[column.type.to_sym] ||= ::Set.new
16
16
  hash[column.type.to_sym] << column.name.to_sym
17
17
  hash
18
18
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: protobuf-activerecord
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.2.1
4
+ version: 3.2.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Adam Hutchison
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-09-06 00:00:00.000000000 Z
11
+ date: 2015-10-12 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activerecord
@@ -234,7 +234,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
234
234
  version: '0'
235
235
  requirements: []
236
236
  rubyforge_project:
237
- rubygems_version: 2.4.8
237
+ rubygems_version: 2.2.0
238
238
  signing_key:
239
239
  specification_version: 4
240
240
  summary: Google Protocol Buffers integration for Active Record