tomlib 0.1.0 → 0.4.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 16903f85ce6caa68598bf97a4e631d2f69312a7019cb0901d668c40fafa24fb6
4
- data.tar.gz: 8fc0cf9b86b65dc8e3a455ffdbca94151a1ca74b1252e72600edcb872338de06
3
+ metadata.gz: fb163d03d5ca307ad810914faacadd2ba5650d01d6ed7458849be829cd0d080b
4
+ data.tar.gz: a4e213b0ae1d737d9fd13f0e01381a20a3bf5bfcfa35c8d5021b120b51e1e96c
5
5
  SHA512:
6
- metadata.gz: ddd0190b6aa540128cafa6fdf20bcd16b7a7e0d6c4eaa1cbb65f993708388bedea553f0deda33884b26cb93996dd7ddc4825c7bc36b2223eb21eb43fcae6b2aa
7
- data.tar.gz: 65e1c88710a7a3f5ca65ca75026e59b64a525d5232c063359c976259ab8e7b10eac503a6aa665d7a2cbe21f7106a8573b9a3faf361b88a121c6a3af46269a744
6
+ metadata.gz: 943608fb548cb2448e83191cacb95aea330fd60a0bdb117c0fd96f2b2adc885f2b8ec2f46bfa455531d3308bee239f6d0996a95f8322e33282580813658d542e
7
+ data.tar.gz: 71132c66ba2eaa88cbb7607c847e82883c0f0ffc3aa601e464d7131b2a15406702d1221a4607cc2d3cd9c597670e2be77c7f0afa023b08928f8ab052ffe98ea7
data/CHANGELOG.md CHANGED
@@ -1,3 +1,27 @@
1
+ ## [0.4.0] - [2022-08-06]
2
+
3
+ - Correctly dump empty arrays
4
+
5
+ ## [0.3.0] - 2022-08-05
6
+
7
+ - Add ext/* to bundled files
8
+
9
+ ## [0.2.0] - 2022-08-04
10
+
11
+ - Refactor Tomlib::Dumper to be a littel faster and generate squashed nested tables
12
+ ```
13
+ e.g. instead of this:
14
+ [a]
15
+ [a.b]
16
+ [a.b.c]
17
+
18
+ the output will be this:
19
+ [a.b.c]
20
+ ```
21
+ - Add mention about compliance and passed tests in README.
22
+ - Declare global variables with `rb_global_variable`.
23
+ It may prevent VM from crashing in some cases.
24
+
1
25
  ## [0.1.0] - 2022-08-02
2
26
 
3
- Initial release
27
+ - Initial release
data/README.md CHANGED
@@ -3,7 +3,11 @@
3
3
  Tomlib is a TOML parser and generator for Ruby. It is fast and standards-compliant by relying
4
4
  on native [tomlc99](https://github.com/cktan/tomlc99) parser.
5
5
 
6
+ ## Compliance
7
+
6
8
  Tomlib is TOML v1.0 compliant.
9
+ It passes both [BurntSushi/toml-test](https://github.com/BurntSushi/toml-test) and
10
+ [iarna/toml-spec-tests](https://github.com/iarna/toml-spec-tests).
7
11
 
8
12
  ## Installation
9
13
 
@@ -34,12 +38,7 @@ To parse a TOML document use:
34
38
  ```ruby
35
39
  require 'tomlib'
36
40
 
37
- Tomlib.parse(<<~TOML)
38
- firstName = "John"
39
- lastName = "Doe"
40
- hobbies = [ "Singing", "Dancing" ]
41
-
42
- [address]
41
+ Tomlib.load(<<~TOML)
43
42
  firstName = "John"
44
43
  lastName = "Doe"
45
44
  hobbies = [ "Singing", "Dancing" ]
@@ -119,10 +118,10 @@ Tomlib.dump(hash, indent: false)
119
118
 
120
119
  ## Performance
121
120
 
122
- `Tomlib` parsing is ~300x faster than `toml-rb` and ~15x faster than `Tomlrb`
123
- for usual use case (~5KB TOML document size).
121
+ `Tomlib` parsing is ~300x faster than `toml-rb`, ~15x faster than `Tomlrb`
122
+ and ~3x faster than `perfect_toml` for usual use case (~5KB TOML document size).
124
123
 
125
- Generating TOML document is about 1.7x faster than `toml-rb`.
124
+ Generating TOML document is about 2x faster than `toml-rb`.
126
125
 
127
126
  For full comparison take a look at
128
127
  [benchmarks](https://github.com/kgiszczak/tomlib/tree/master/benchmarks)