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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 261c558bdb2a9f3053641296a87025a77c164f3b
4
- data.tar.gz: 2d7982b7db41f9bc1ce39a608fe657a5c7572ec4
3
+ metadata.gz: c8ecadbd203bf7a77c7cf6164cd91132773ac807
4
+ data.tar.gz: 852a80db79a9e23c10b7bd78c383e88ca23113ff
5
5
  SHA512:
6
- metadata.gz: bfe65a6c6b55c2f29c2c46cee40a57cdb2ce7d62d5ea33d7b226e34f6b2c76bde8203081fdadc6b054df433be8e4ce2da1657ee6d257261bce2fea18265cef8f
7
- data.tar.gz: 11df7ee6f4b2b1ed1ed8a6afc56f06e66836d3afaf54c10196b45a4c81323d2481bf15a9e0a28318c9f97f249aa20c9972defa5ae3fbb12c26029a01da7d0e09
6
+ metadata.gz: 02f30a0d0edb576df33e75e8a1e69d267ce575930fe31870f2d4e74e5e2f001fa55ccb1c4b5c1fa7385f6bb5e751992ab1aad565785f9d3a4cd48c40a78708e9
7
+ data.tar.gz: a5ca4ed9494b8381cf5cf80c993c2d804b7dd47b7522339174586850a5cb5c392649ee03f4e84a08678317430b5c88eacce3d4324a6bab49c04ebfe74e3a6f8a
@@ -1,3 +1,3 @@
1
1
  module JSONL
2
- VERSION = '0.1.1'
2
+ VERSION = '0.1.2'
3
3
  end
@@ -0,0 +1,4 @@
1
+ {"name": "Gilbert", "wins": [["straight", "7♣"], ["one pair", "10♥"]]}
2
+ {"name": "Alexa", "wins": [["two pair", "4♠"], ["two pair", "9♠"]]}
3
+ {"name": "May", "wins": []}
4
+ {"name": "Deloise", "wins": [["three of a kind", "5♣"]]}
@@ -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.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