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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: c89e170da5cb062fe5b8798845909c2265fb3077
4
- data.tar.gz: 5be30769a20d672db79a397c9c8ef47d528237f5
3
+ metadata.gz: b711af7424eb38efb875ac722a0a54a66666f379
4
+ data.tar.gz: 9713f5b04987fad4361d6d63314f05727b2b9519
5
5
  SHA512:
6
- metadata.gz: 51aa2292a07e503872d3641bee6f1c146e23ddc74bcc3d3ce1bb9dfd03080e0a24672713d5cc6697b141b782b8a68e262b94765193eedf13ccbafdade2894958
7
- data.tar.gz: bc7e3ea192abf649380a4000abdf795d5cd87d518761fe2f498275054e5f2beabb61eb0b1a5a76d21ef7f4695ba1aad7d66769071ef0d2344a960f0b1819a9c7
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:1.7.16"
11
+ jar "org.jruby:jruby-complete:#{jruby_version}"
10
12
  end
Binary file
@@ -42,7 +42,12 @@ module Transit
42
42
  end
43
43
 
44
44
  # @api private
45
- class Tag < String; end
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}
@@ -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.591
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: 2015-05-03 00:00:00.000000000 Z
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