protobuf 3.0.2 → 3.0.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGES.md +5 -0
- data/lib/protobuf/message.rb +9 -0
- data/lib/protobuf/version.rb +1 -1
- data/spec/lib/protobuf/message_spec.rb +10 -0
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: a25179bb7b98c63e8ef320ebbed6b649244897af
|
4
|
+
data.tar.gz: 3df0b7a26092c7e5ac79c75893ec965f4fefd150
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 876507d1ac360749d4cb83c029ecf14632c0a452ce8005e8503f33a1f44d65bf1f6a690566e5d3eb4a2411b1450141200c61109e94dee9a56c18f87b83a1d583
|
7
|
+
data.tar.gz: 0b83772263222d04aadaf02f1ef82d3cfaf5363fb45e30615b791cce632beb43ab1c6be5124c3d78ff18083a29032965a96b1b3af31278b3da2830f7a66464d8
|
data/CHANGES.md
CHANGED
data/lib/protobuf/message.rb
CHANGED
@@ -14,9 +14,18 @@ module Protobuf
|
|
14
14
|
extend ::Protobuf::Message::Fields
|
15
15
|
include ::Protobuf::Message::Serialization
|
16
16
|
|
17
|
+
##
|
18
|
+
# Class Methods
|
19
|
+
#
|
20
|
+
|
21
|
+
def self.to_json
|
22
|
+
name
|
23
|
+
end
|
24
|
+
|
17
25
|
##
|
18
26
|
# Constructor
|
19
27
|
#
|
28
|
+
|
20
29
|
def initialize(fields = {})
|
21
30
|
@values = {}
|
22
31
|
|
data/lib/protobuf/version.rb
CHANGED
@@ -289,6 +289,16 @@ describe Protobuf::Message do
|
|
289
289
|
its(:to_json) { should eq '{"name":"Test Name","active":false}' }
|
290
290
|
end
|
291
291
|
|
292
|
+
describe '.to_json' do
|
293
|
+
it 'returns the class name of the message for use in json encoding' do
|
294
|
+
expect {
|
295
|
+
::Timeout.timeout(0.1) do
|
296
|
+
expect(::Test::Resource.to_json).to eq("Test::Resource")
|
297
|
+
end
|
298
|
+
}.not_to raise_error
|
299
|
+
end
|
300
|
+
end
|
301
|
+
|
292
302
|
describe "#define_setter" do
|
293
303
|
subject { ::Test::Resource.new }
|
294
304
|
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: protobuf
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 3.0.
|
4
|
+
version: 3.0.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- BJ Neilsen
|
@@ -11,7 +11,7 @@ authors:
|
|
11
11
|
autorequire:
|
12
12
|
bindir: bin
|
13
13
|
cert_chain: []
|
14
|
-
date: 2014-03-
|
14
|
+
date: 2014-03-13 00:00:00.000000000 Z
|
15
15
|
dependencies:
|
16
16
|
- !ruby/object:Gem::Dependency
|
17
17
|
name: activesupport
|