jsonl 0.1.1 → 0.1.2
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/jsonl/version.rb +1 -1
- data/test/fixtures/source.jsonl +4 -0
- data/test/jsonl_test.rb +18 -0
- metadata +2 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: c8ecadbd203bf7a77c7cf6164cd91132773ac807
|
4
|
+
data.tar.gz: 852a80db79a9e23c10b7bd78c383e88ca23113ff
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 02f30a0d0edb576df33e75e8a1e69d267ce575930fe31870f2d4e74e5e2f001fa55ccb1c4b5c1fa7385f6bb5e751992ab1aad565785f9d3a4cd48c40a78708e9
|
7
|
+
data.tar.gz: a5ca4ed9494b8381cf5cf80c993c2d804b7dd47b7522339174586850a5cb5c392649ee03f4e84a08678317430b5c88eacce3d4324a6bab49c04ebfe74e3a6f8a
|
data/lib/jsonl/version.rb
CHANGED
data/test/jsonl_test.rb
CHANGED
@@ -1,4 +1,22 @@
|
|
1
1
|
require 'test_helper'
|
2
|
+
require 'json'
|
2
3
|
|
3
4
|
class JSONLTest < Minitest::Test
|
5
|
+
def setup
|
6
|
+
@source = File.read(File.expand_path('../fixtures/source.jsonl', __FILE__))
|
7
|
+
@parsed = JSONL.parse(@source)
|
8
|
+
end
|
9
|
+
|
10
|
+
def test_parsed_class
|
11
|
+
assert_equal Array, @parsed.class
|
12
|
+
end
|
13
|
+
|
14
|
+
def test_parsed_count
|
15
|
+
assert_equal 4, @parsed.count
|
16
|
+
end
|
17
|
+
|
18
|
+
def test_parsed_equals_to_json_parse
|
19
|
+
source = @source.split("\n")[0]
|
20
|
+
assert_equal JSON.parse(source), @parsed[0]
|
21
|
+
end
|
4
22
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: jsonl
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- kami-zh
|
@@ -67,6 +67,7 @@ files:
|
|
67
67
|
- jsonl.gemspec
|
68
68
|
- lib/jsonl.rb
|
69
69
|
- lib/jsonl/version.rb
|
70
|
+
- test/fixtures/source.jsonl
|
70
71
|
- test/jsonl_test.rb
|
71
72
|
- test/test_helper.rb
|
72
73
|
homepage: https://github.com/kami-zh/jsonl
|