protobuf-activerecord 3.4.2 → 3.4.3

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: 074c646ef762ad239a0799d0ed9c49fbc8266a42
4
- data.tar.gz: 6432cb4876d046648373a99d766b9bf8de75817a
3
+ metadata.gz: 40a8056f1bb9bf2ac10f53ea39f1447e909a3227
4
+ data.tar.gz: 11b9ffcbe3645dbe06bc677730fe360cb66d0f5b
5
5
  SHA512:
6
- metadata.gz: b0a2b7a775dc72d594e6ae468f85aa12a3b1b2d8c64f380aa8d5290d35a9da2277103b8544a48ec40ef1cdfcb3ace42211eae4faee29514ce1c14ad8d48deead
7
- data.tar.gz: 1fad2952ac3debfad0cf9865a7a76bb2e45c90631797bd1058a03899b2d6c28b5d9e4f891b2b9d4fcfbf6dfe3856ec34a5fd37b79045ec75de6c7761c58c6ddd
6
+ metadata.gz: cc1d009811935c2ad4026862e8f20f00ddc51e8f1220a5a309a0e3c5d25654e817e1363220b49a8c49bfd60ad931fcb884fa3ecaa2d73c7ad713edda0b0d5e0d
7
+ data.tar.gz: 824c943dadf8071ce786129a52e051a61c345a8c6b1cac6e420cdabac0e21360b23d79a273abe6e59ab8403671725dcccd1b34fca979c7c87527643c402946f7
@@ -151,6 +151,8 @@ module Protobuf
151
151
  return nil if value.nil?
152
152
 
153
153
  value.to_time(:utc).to_i
154
+ rescue NameError # Has happened when field is not on model or ignored from db
155
+ return nil
154
156
  end
155
157
  RUBY
156
158
  else
@@ -160,6 +162,8 @@ module Protobuf
160
162
  return nil if value.nil?
161
163
 
162
164
  value.to_i
165
+ rescue NameError # Has happened when field is not on model or ignored from db
166
+ return nil
163
167
  end
164
168
  RUBY
165
169
  end
@@ -167,6 +171,8 @@ module Protobuf
167
171
  self.class_eval <<-RUBY, __FILE__, __LINE__ + 1
168
172
  def _protobuf_active_record_serialize_#{field}
169
173
  #{field}
174
+ rescue NameError # Has happened when field is not on model or ignored from db
175
+ return nil
170
176
  end
171
177
  RUBY
172
178
  end
@@ -1,5 +1,5 @@
1
1
  module Protobuf
2
2
  module ActiveRecord
3
- VERSION = "3.4.2"
3
+ VERSION = "3.4.3"
4
4
  end
5
5
  end
@@ -166,6 +166,7 @@ describe Protobuf::ActiveRecord::Serialization do
166
166
  let(:fields_from_record) { { :guid => user.guid, :name => user.name, :email => user.email, :email_domain => nil, :password => nil, :nullify => nil } }
167
167
 
168
168
  before {
169
+ user.to_proto
169
170
  allow(user).to receive(:_protobuf_active_record_serialize_email_domain).and_return(nil)
170
171
  }
171
172
 
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.4.2
4
+ version: 3.4.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Adam Hutchison
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2017-04-13 00:00:00.000000000 Z
11
+ date: 2017-06-22 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activerecord
@@ -249,7 +249,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
249
249
  version: '0'
250
250
  requirements: []
251
251
  rubyforge_project:
252
- rubygems_version: 2.6.10
252
+ rubygems_version: 2.6.12
253
253
  signing_key:
254
254
  specification_version: 4
255
255
  summary: Google Protocol Buffers integration for Active Record