transit-ruby 0.8.567 → 0.8.569
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +0 -1
- data/lib/transit/transit_types.rb +8 -1
- data/spec/transit/transit_types_spec.rb +8 -0
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 9aa135b3c83c542508b02a2b31d61f817762e2cb
|
4
|
+
data.tar.gz: 639d6dee946974d8d76b10194e81222321074162
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 489d162a2452d4058ae3aad448f11058dad17c6ef3fd825265f676b66ff0242ce7895d5c4b81f24eac3a59b0b5e305e49cb7b73f8cfa36f784449cba405bf811
|
7
|
+
data.tar.gz: bd2cfcdfcff3bc4ae49ac312fb1926bd1a81258ebc53730a3e0617d5c428c8639ff0cc6ba04b975cdeaae1cc7d567f3ce1012b8e0114fc57a8667aa93fc59f8b
|
data/README.md
CHANGED
@@ -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
|
|
@@ -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.
|
4
|
+
version: 0.8.569
|
5
5
|
platform: ruby
|
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-
|
13
|
+
date: 2014-12-03 00:00:00.000000000 Z
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
16
16
|
name: oj
|
@@ -195,7 +195,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
195
195
|
version: '0'
|
196
196
|
requirements: []
|
197
197
|
rubyforge_project:
|
198
|
-
rubygems_version: 2.
|
198
|
+
rubygems_version: 2.2.2
|
199
199
|
signing_key:
|
200
200
|
specification_version: 4
|
201
201
|
summary: Transit marshalling for Ruby
|