active_remote 3.3.0 → 3.3.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
  SHA256:
3
- metadata.gz: ae8cf64c394e8f550a86ae5249454544d8a80c26f895f5358cd553a45d7d7a4c
4
- data.tar.gz: 6ebd6029726c068e9f08ee8ec77e89309f9582c4b35f870b38edfd1b154a1138
3
+ metadata.gz: 5ea2e2dce8e74426f1b128de526fc94673e8fcb21e23fd61052519f13bf2eb98
4
+ data.tar.gz: b317461ce80a81012b55475147b6c746d2aa9708dedf8173631d21fda6c5950b
5
5
  SHA512:
6
- metadata.gz: bf3efedb46cd28754bc7ddad9c7c8a5b69483c8c68d77df57423ae34f60bccc98215a0239a920831ae92e1fab52fa2cd7e58a5788d0908df33569a75338d85f2
7
- data.tar.gz: 553dc23127a1dd631ca176a427c08110295cbc128d38119eb4597fe520642b9ed700a41f3a629bdcc6de52883b8f411b1afe476e2d2050b23a7f24a129717afb
6
+ metadata.gz: 6db4dd2c80db0fbfbb768e90464cc900b77a9e490a647b922122adc254ded925ccfc1376e796460f988c690ce19c85f51149ae7015dd92a91d174d1e19933f70
7
+ data.tar.gz: 3ab7fb289b55326ebe7897189d205f03d6d3863c5d557d8768d4c84a6ee0c77ae8ca335bb0354be827d3920d83b7b88828a5c8cddb393b4f3948e28256e8d766
@@ -137,6 +137,8 @@ module ActiveRemote
137
137
  end
138
138
 
139
139
  def typecaster
140
+ return nil if type_name.nil?
141
+
140
142
  @typecaster ||= Type.lookup(type_name)
141
143
  end
142
144
 
@@ -1,3 +1,3 @@
1
1
  module ActiveRemote
2
- VERSION = "3.3.0"
2
+ VERSION = "3.3.1"
3
3
  end
@@ -83,6 +83,7 @@ describe ActiveRemote::Serializers::Protobuf::Field do
83
83
  it { typecasts(:string_field, string_value => '') }
84
84
  it { typecasts(:uint32_field, '0' => 0) }
85
85
  it { typecasts(:uint64_field, '0' => 0) }
86
+ it { typecasts(:enum_field, 0 => 0) }
86
87
  end
87
88
  end
88
89
  end
@@ -1,4 +1,9 @@
1
1
  message Serializer {
2
+ enum Type {
3
+ DEFAULT = 0;
4
+ USER = 1;
5
+ }
6
+
2
7
  optional bool bool_field = 1;
3
8
  optional bytes bytes_field = 2;
4
9
  optional double double_field = 3;
@@ -14,4 +19,5 @@ message Serializer {
14
19
  optional string string_field = 13;
15
20
  optional uint32 uint32_field = 14;
16
21
  optional uint64 uint64_field = 15;
22
+ optional Type enum_field = 16;
17
23
  }
@@ -9,7 +9,14 @@ require 'protobuf'
9
9
  ##
10
10
  # Message Classes
11
11
  #
12
- class Serializer < ::Protobuf::Message; end
12
+ class Serializer < ::Protobuf::Message
13
+ class Type < ::Protobuf::Enum
14
+ define :DEFAULT, 0
15
+ define :USER, 1
16
+ end
17
+
18
+ end
19
+
13
20
 
14
21
 
15
22
  ##
@@ -31,5 +38,6 @@ class Serializer
31
38
  optional :string, :string_field, 13
32
39
  optional :uint32, :uint32_field, 14
33
40
  optional :uint64, :uint64_field, 15
41
+ optional ::Serializer::Type, :enum_field, 16
34
42
  end
35
43
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: active_remote
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.3.0
4
+ version: 3.3.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Adam Hutchison