protobuf-activerecord 3.2.0 → 3.2.1

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: a352c983607d34d912b75e84b87cfaade5fb40eb
4
- data.tar.gz: a656aa395f61f5e6f5f3da5aa7ff2e5aa01172ca
3
+ metadata.gz: 043d45ce686ee0a930ea7aee24fdd56737d3535d
4
+ data.tar.gz: 145090542220062b92f1708920ab30b901dfa108
5
5
  SHA512:
6
- metadata.gz: 120872dfa9ea6f4532d14de413a2e4b911e3f96c6663398f15ff18b78e3956669583420bb3bcc0aaceeec649e14d5fc1e72f67495526a4b9b16df9869bc96545
7
- data.tar.gz: dd907e242f10564144ef5117e916ec58915abb9f5cbda7a972ab6558c9aff23b5158b90de3702c75b55a861bbc476e8755f526c533520e5f8ff70b132ee0ae88
6
+ metadata.gz: e02a40872c328a7da092e36685511baf307a46d6a0a4e66e5a6f2f621f6fbbc199deaeb00aced709f7fd957866f8e6106acef0f72d7491a829a4920d2adfe14e
7
+ data.tar.gz: 3159dd77e7b3b3b7ddbc10b9c92d7a73ac6786aa412b0afc83984efc5905b7bf2940e0793f68bf6d62007dd86d10c39187ec0932a306bcfda9cdd014f4bd9107
@@ -30,7 +30,7 @@ module Protobuf
30
30
  fields = proto.to_hash
31
31
  fields.select! do |key, value|
32
32
  field = proto.class.get_field(key, true)
33
- proto.has_field?(key) && !field.repeated?
33
+ proto.field?(key) && !field.repeated?
34
34
  end
35
35
 
36
36
  filtered_attributes = _filtered_attributes + _protobuf_nested_attributes
@@ -1,5 +1,5 @@
1
1
  module Protobuf
2
2
  module ActiveRecord
3
- VERSION = "3.2.0"
3
+ VERSION = "3.2.1"
4
4
  end
5
5
  end
@@ -11,7 +11,7 @@ class User < ActiveRecord::Base
11
11
  attribute_from_proto :password, lambda { |proto| proto.password! }
12
12
 
13
13
  def self.extract_first_name(proto)
14
- if proto.has_field?(:name)
14
+ if proto.field?(:name)
15
15
  names = proto.name.split(" ")
16
16
  first_name = names.first
17
17
  end
@@ -20,7 +20,7 @@ class User < ActiveRecord::Base
20
20
  end
21
21
 
22
22
  def self.extract_last_name(proto)
23
- if proto.has_field?(:name)
23
+ if proto.field?(:name)
24
24
  names = proto.name.split(" ")
25
25
  names.shift # Drop the first name
26
26
  last_name = names.join(" ")
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.0
4
+ version: 3.2.1
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-07-21 00:00:00.000000000 Z
11
+ date: 2015-09-06 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activerecord