transit-ruby 0.8.591-java → 0.8.597-java
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Jarfile +3 -1
- data/lib/transit.jar +0 -0
- data/lib/transit/decoder.rb +10 -5
- data/spec/spec_helper.rb +1 -0
- data/spec/transit/decoder_spec.rb +7 -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: b711af7424eb38efb875ac722a0a54a66666f379
|
4
|
+
data.tar.gz: 9713f5b04987fad4361d6d63314f05727b2b9519
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ebe8b6ae48dea693c633255bcf8f94f9db35d2f76984df001eaa22df0b07ac3fbbc0f1f607d9fdaff3ab8691956bd0bd3e8e975425dc1ef568768798fe3bccd8
|
7
|
+
data.tar.gz: 434121489dc3be534f924611975e46f7ae6d2b466518f5eac34d9404c8e16277773d6333b83c6bee21ed4570bcee32c98c83faac6e7da22a9894455b82243d85
|
data/Jarfile
CHANGED
@@ -1,10 +1,12 @@
|
|
1
1
|
# -*- ruby -*-
|
2
2
|
|
3
|
+
jruby_version=File.read("build/jruby_version").chomp
|
4
|
+
|
3
5
|
# dependency to transit-java
|
4
6
|
# this setup uses maven central for the repository
|
5
7
|
|
6
8
|
jar "com.cognitect:transit-java:0.8.287"
|
7
9
|
|
8
10
|
group 'development' do
|
9
|
-
jar "org.jruby:jruby-complete
|
11
|
+
jar "org.jruby:jruby-complete:#{jruby_version}"
|
10
12
|
end
|
data/lib/transit.jar
CHANGED
Binary file
|
data/lib/transit/decoder.rb
CHANGED
@@ -42,7 +42,12 @@ module Transit
|
|
42
42
|
end
|
43
43
|
|
44
44
|
# @api private
|
45
|
-
class Tag
|
45
|
+
class Tag
|
46
|
+
attr_reader :value
|
47
|
+
def initialize(value)
|
48
|
+
@value = value
|
49
|
+
end
|
50
|
+
end
|
46
51
|
|
47
52
|
# Decodes a transit value to a corresponding object
|
48
53
|
#
|
@@ -79,10 +84,10 @@ module Transit
|
|
79
84
|
decode(Hash[*node], cache)
|
80
85
|
elsif Tag === e0
|
81
86
|
v = decode(node.shift, cache)
|
82
|
-
if handler = @handlers[e0]
|
87
|
+
if handler = @handlers[e0.value]
|
83
88
|
handler.from_rep(v)
|
84
89
|
else
|
85
|
-
@default_handler.from_rep(e0,v)
|
90
|
+
@default_handler.from_rep(e0.value,v)
|
86
91
|
end
|
87
92
|
else
|
88
93
|
[e0] + node.map {|e| decode(e, cache, as_map_key)}
|
@@ -92,10 +97,10 @@ module Transit
|
|
92
97
|
k = decode(node.keys.first, cache, true)
|
93
98
|
v = decode(node.values.first, cache, false)
|
94
99
|
if Tag === k
|
95
|
-
if handler = @handlers[k]
|
100
|
+
if handler = @handlers[k.value]
|
96
101
|
handler.from_rep(v)
|
97
102
|
else
|
98
|
-
@default_handler.from_rep(k,v)
|
103
|
+
@default_handler.from_rep(k.value,v)
|
99
104
|
end
|
100
105
|
else
|
101
106
|
{k => v}
|
data/spec/spec_helper.rb
CHANGED
@@ -33,6 +33,7 @@ end
|
|
33
33
|
|
34
34
|
require 'json'
|
35
35
|
require 'rspec'
|
36
|
+
require 'date' # because wrong expects it but doesn't load it :/
|
36
37
|
require 'wrong/adapters/rspec'
|
37
38
|
require 'transit'
|
38
39
|
require 'spec_helper-local' if File.exist?(File.expand_path('../spec_helper-local.rb', __FILE__))
|
@@ -56,5 +56,12 @@ module Transit
|
|
56
56
|
end
|
57
57
|
end
|
58
58
|
end
|
59
|
+
|
60
|
+
describe "Tag" do
|
61
|
+
# Regression example for https://github.com/cognitect/transit-ruby/pull/19
|
62
|
+
it "is does not == its String value" do
|
63
|
+
assert { Decoder::Tag.new("foo") != "foo" }
|
64
|
+
end
|
65
|
+
end
|
59
66
|
end
|
60
67
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: transit-ruby
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.8.
|
4
|
+
version: 0.8.597
|
5
5
|
platform: java
|
6
6
|
authors:
|
7
7
|
- Russ Olsen
|
@@ -10,7 +10,7 @@ authors:
|
|
10
10
|
autorequire:
|
11
11
|
bindir: bin
|
12
12
|
cert_chain: []
|
13
|
-
date:
|
13
|
+
date: 2016-11-04 00:00:00.000000000 Z
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
16
16
|
requirement: !ruby/object:Gem::Requirement
|