pigeon_hole 0.1.6 → 0.1.7
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/pigeon_hole/typed_json.rb +2 -0
- data/spec/integration_spec.rb +19 -0
- metadata +3 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 123fba48e58f496fd52022df7fea6e6adede23d6
|
4
|
+
data.tar.gz: 872065a790ede251a1a334fb9209288650f0a1ff
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 2cd3cf6de97c561d1d68ac1d65cb0344b66b4623ff2dbc0f0b4201d216b4fea0a77809803bdc6c385668d51effcacd98de7661d2d2aaa26ffc8b03ea42ea9e16
|
7
|
+
data.tar.gz: b1fa932d5624dea8b6e529e88e3146b130bff1703bb5bdfd292955a4f570d571ab0f2b8d043a1c2b71f8060f3b9c505661c6e1de2996f55250130a2bc0afa245
|
data/spec/integration_spec.rb
CHANGED
@@ -36,6 +36,25 @@ describe "serializing times" do
|
|
36
36
|
end
|
37
37
|
end
|
38
38
|
|
39
|
+
describe "serializing unicode strings" do
|
40
|
+
let(:string) { "Test \u0000example" }
|
41
|
+
let(:sanitized_string) { "Test example" }
|
42
|
+
|
43
|
+
subject { PigeonHole.generate(string: string) }
|
44
|
+
|
45
|
+
it "serializes hash into a string" do
|
46
|
+
result = subject
|
47
|
+
expect(result).to_not be_empty
|
48
|
+
end
|
49
|
+
|
50
|
+
it "can be deserialized to a string" do
|
51
|
+
result = subject
|
52
|
+
hash = PigeonHole.parse(result)
|
53
|
+
expect(hash).to eq({ "string" => sanitized_string })
|
54
|
+
expect(hash["string"]).to be_a(String)
|
55
|
+
end
|
56
|
+
end
|
57
|
+
|
39
58
|
describe "serializing symbols" do
|
40
59
|
let(:symbol) { :a_symbol }
|
41
60
|
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: pigeon_hole
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.7
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Stephen Binns
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2017-02-08 00:00:00.000000000 Z
|
12
12
|
dependencies: []
|
13
13
|
description:
|
14
14
|
email:
|
@@ -44,11 +44,10 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
44
44
|
version: '0'
|
45
45
|
requirements: []
|
46
46
|
rubyforge_project:
|
47
|
-
rubygems_version: 2.6.
|
47
|
+
rubygems_version: 2.6.8
|
48
48
|
signing_key:
|
49
49
|
specification_version: 4
|
50
50
|
summary: Opt-in typed serialization for complex JSON types
|
51
51
|
test_files:
|
52
52
|
- spec/integration_spec.rb
|
53
53
|
- spec/spec_helper.rb
|
54
|
-
has_rdoc:
|