transit-ruby 0.8.567-java → 0.8.569-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: 45c2ea103d210dd308bdb4923da13c5cf3cac641
4
- data.tar.gz: 6b6cda49698ffbc3d681fe6541fa4bcdfae79359
3
+ metadata.gz: 2e777fdf2907aa11446706d2074c48bfbf233854
4
+ data.tar.gz: 34460785f6bdb1c962ab74f53167ddb5e8fb6067
5
5
  SHA512:
6
- metadata.gz: 58360692e8f599db6f9c5f2e9e94cc60489536d603a4102ae90546b196bfee94f717416dfc4a4418de2d13617ef72311aeb3627851c8eda60b8f87ce70ef9400
7
- data.tar.gz: e55ef29d6077596d55595336730e9fb89c36949d0ffc5493e2bf89645e16b074cec50f2e9c11ec45776a752029909919a761a6a0cc709bc6588195026434c146
6
+ metadata.gz: c91c3e557bef2111988f63920bf5e2517fc22a4d4afc10fc9651fbbec68b71eedfda290f93bbaea260e3d32a53fc254e843f6daf067b1619ca82030690785669
7
+ data.tar.gz: 26e13e511fe2d59283f594f7d1d237d8012ff70e6dc635fe0a7a97f00a9aeefaebee5ddc0d96b0c4fe928232421c034e308d71cec283fed4bdee79a5dd78de21
data/README.md CHANGED
@@ -75,7 +75,6 @@ abc
75
75
  Implement `tag`, `rep(obj)` and `string_rep(obj)` methods. For example:
76
76
 
77
77
  ```ruby
78
- require 'ostruct'
79
78
  Point = Struct.new(:x,:y) do
80
79
  def to_a; [x,y] end
81
80
  end
@@ -67,8 +67,15 @@ module Transit
67
67
  Base64.encode64(@value)
68
68
  end
69
69
 
70
+ # For human-readable display only. Use value() for programmatic
71
+ # consumption of the decoded value.
72
+ #
73
+ # Forces the platform's default external encoding, which is
74
+ # potentially lossy, but also guarantees that something will be
75
+ # printed instead of raising an error when there is no encoding
76
+ # information provided.
70
77
  def to_s
71
- @value
78
+ @value.dup.force_encoding(Encoding.default_external)
72
79
  end
73
80
  end
74
81
 
data/lib/transit.jar CHANGED
Binary file
@@ -133,4 +133,12 @@ module Transit
133
133
  assert { Link.new("/path", "the-rel").to_h.frozen? }
134
134
  end
135
135
  end
136
+
137
+ describe ByteArray do
138
+ it 'uses the default_external encoding for to_s' do
139
+ src = ByteArray.new("foo".force_encoding("ascii")).to_base64
140
+ target = ByteArray.from_base64(src)
141
+ assert { target.to_s.encoding == Encoding.default_external }
142
+ end
143
+ end
136
144
  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.567
4
+ version: 0.8.569
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: 2014-11-30 00:00:00.000000000 Z
13
+ date: 2014-12-03 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  requirement: !ruby/object:Gem::Requirement