edn 1.1.0 → 1.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/lib/edn/char_stream.rb +1 -1
- data/lib/edn/version.rb +1 -1
- data/spec/edn/char_stream_spec.rb +21 -21
- data/spec/edn_spec.rb +5 -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: 6352cb6679dbcd323b1d569160a0249215e4ad10
|
4
|
+
data.tar.gz: e7f95c57e339b8638ac37f5da3443540f06cd221
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ff4d500ebf2ff5a1e80b7d91df8f55de31c86f9d0ff13092d990001251d5b4a839377bd322d096255b73742d1e5f257ebcab0f046787fcbdb5c47d492a5ddc3c
|
7
|
+
data.tar.gz: 8eb71ea55c3cf8ccae178d2ee71005a83b2fad5de0a02050cc4d18e615d3399ed4a048c7479a9fd299cc4b5e74d30c0591d3d7cd3b9afeee40f9be98412fe75c
|
data/lib/edn/char_stream.rb
CHANGED
data/lib/edn/version.rb
CHANGED
@@ -19,70 +19,70 @@ describe EDN::CharStream do
|
|
19
19
|
|
20
20
|
it "knows if the current char is a digit" do
|
21
21
|
s = EDN::CharStream.new(io_for("4f"))
|
22
|
-
s.digit?.should
|
22
|
+
s.digit?.should be_truthy
|
23
23
|
s.advance
|
24
|
-
s.digit?.should
|
24
|
+
s.digit?.should be_falsey
|
25
25
|
end
|
26
26
|
|
27
27
|
it "knows if the current char is an alpha" do
|
28
28
|
s = EDN::CharStream.new(io_for("a9"))
|
29
|
-
s.alpha?.should
|
29
|
+
s.alpha?.should be_truthy
|
30
30
|
s.advance
|
31
|
-
s.alpha?.should
|
31
|
+
s.alpha?.should be_falsey
|
32
32
|
end
|
33
33
|
|
34
34
|
it "knows if the current char is whitespace" do
|
35
35
|
s = EDN::CharStream.new(io_for("a b\nc\td,"))
|
36
|
-
s.ws?.should
|
36
|
+
s.ws?.should be_falsey # a
|
37
37
|
|
38
38
|
s.advance
|
39
|
-
s.ws?.should
|
39
|
+
s.ws?.should be_truthy # " "
|
40
40
|
|
41
41
|
s.advance
|
42
|
-
s.ws?.should
|
42
|
+
s.ws?.should be_falsey # b
|
43
43
|
|
44
44
|
s.advance
|
45
|
-
s.ws?.should
|
45
|
+
s.ws?.should be_truthy # \n
|
46
46
|
|
47
47
|
s.advance
|
48
|
-
s.ws?.should
|
48
|
+
s.ws?.should be_falsey # c
|
49
49
|
|
50
50
|
s.advance
|
51
|
-
s.ws?.should
|
51
|
+
s.ws?.should be_truthy # \t
|
52
52
|
|
53
53
|
s.advance
|
54
|
-
s.ws?.should
|
54
|
+
s.ws?.should be_falsey # d
|
55
55
|
|
56
56
|
s.advance
|
57
|
-
s.ws?.should
|
57
|
+
s.ws?.should be_truthy # ,
|
58
58
|
end
|
59
59
|
|
60
60
|
it "knows if the current char is a newline" do
|
61
61
|
s = EDN::CharStream.new(io_for("a\nb\rc"))
|
62
|
-
s.newline?.should
|
62
|
+
s.newline?.should be_falsey # a
|
63
63
|
|
64
64
|
s.advance
|
65
|
-
s.newline?.should
|
65
|
+
s.newline?.should be_truthy # \n
|
66
66
|
|
67
67
|
s.advance
|
68
|
-
s.newline?.should
|
68
|
+
s.newline?.should be_falsey # b
|
69
69
|
|
70
70
|
s.advance
|
71
|
-
s.newline?.should
|
71
|
+
s.newline?.should be_truthy # \r
|
72
72
|
|
73
73
|
s.advance
|
74
|
-
s.newline?.should
|
74
|
+
s.newline?.should be_falsey # c
|
75
75
|
end
|
76
76
|
|
77
77
|
it "knows if it is at the eof" do
|
78
78
|
s = EDN::CharStream.new(io_for("abc"))
|
79
|
-
s.eof?.should
|
79
|
+
s.eof?.should be_falsey # a
|
80
80
|
s.advance
|
81
|
-
s.eof?.should
|
81
|
+
s.eof?.should be_falsey # b
|
82
82
|
s.advance
|
83
|
-
s.eof?.should
|
83
|
+
s.eof?.should be_falsey # c
|
84
84
|
s.advance
|
85
|
-
s.eof?.should
|
85
|
+
s.eof?.should be_truthy
|
86
86
|
end
|
87
87
|
|
88
88
|
it "knows how to skip past a char" do
|
data/spec/edn_spec.rb
CHANGED
@@ -56,6 +56,11 @@ describe EDN do
|
|
56
56
|
end
|
57
57
|
|
58
58
|
context "reading data" do
|
59
|
+
it "treats carriage returns like whitespace" do
|
60
|
+
EDN.read("\r\n[\r\n]\r\n").should == []
|
61
|
+
EDN.read("\r[\r]\r\r").should == []
|
62
|
+
end
|
63
|
+
|
59
64
|
it "reads any valid element" do
|
60
65
|
elements = rant(RantlyHelpers::ELEMENT)
|
61
66
|
elements.each do |element|
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: edn
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.1.
|
4
|
+
version: 1.1.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Clinton N. Dreisbach & Russ Olsen
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2016-05-31 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: pry
|