nestedtext 4.4.6 → 4.5.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: e4b5835126c6ab57f14e01e820bedac03315e2078f865123f0ceb5531dbc82c7
4
- data.tar.gz: 292b7483ba149ef91a54129e216bbbc7f7eeec841adc8fc2fac439086b392f13
3
+ metadata.gz: 22ac73186b0d9ba1785e2b84808b57345348a1e2a4cb9ca114b59062895664df
4
+ data.tar.gz: dfd5bf7254e65aecf7507bd7c43d084dd47e196dd84126f2c6fcb688dc70d53d
5
5
  SHA512:
6
- metadata.gz: 1d5d7ff43936ffc2fe15a4dab0969dc265a809fd74cc5a67a0a36a3d33cccfe60876029c368934d923b6717cddefee898e7736d9f8ed6888bc1bfbd552a47ae5
7
- data.tar.gz: c1057cfad0e963867c8554c3edc61f6dded65b64bd1b536ebee412086f36d5e1c19aeb116bd0bed1c4076a8ff85cfa6b0ed50c7c23252b93c0419ec621f457b1
6
+ metadata.gz: f3e646f14b4e81fe9211b797deec8bce368438a2f9d980d1f1279f908be84928fbc033df5415a716e37e5c6ed7ed4a66c53941d645540e044680f0185f218497
7
+ data.tar.gz: 03c9c3f9242c1b749a4fc3ecdbd5c84ff6f4eff832a6c2272e8fe2af1188a8244566ebf383b4dfb0149a9008ec11322d5910f2634e79c70c0756f52da3813eae
data/CHANGELOG.md CHANGED
@@ -6,6 +6,13 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
6
6
 
7
7
  ## [Unreleased]
8
8
 
9
+ ## [4.5.0] - 2022-06-09
10
+ ### Added
11
+ - Guard filesystem watch and test executor.
12
+
13
+ ### Changed
14
+ - Dumped file content should end with newline, following updated version 3.3.0 of the NestedText specification.
15
+
9
16
  ## [4.4.6] - 2022-02-17
10
17
  ### Fixed
11
18
  - rubydoc.info: don't force use hash value omission with rubycop. rubydoc.info is not on ruby 3.1 yet.
data/README.md CHANGED
@@ -2,7 +2,7 @@
2
2
  [![Gem Version](https://badge.fury.io/rb/nestedtext.svg)](https://badge.fury.io/rb/nestedtext)
3
3
  [![Gem Downloads](https://ruby-gem-downloads-badge.herokuapp.com/nestedtext?color=brightgreen&type=total&label=gem%20downloads)](https://rubygems.org/gems/nestedtext)
4
4
  [![Documentation](https://img.shields.io/badge/docs-API-informational?logo=readthedocs&logoColor=violet)](https://www.rubydoc.info/gems/nestedtext/NestedText)
5
- [![Data Format Version Supported](https://img.shields.io/badge/%F0%9F%84%BD%F0%9F%85%83%20Version%20Supported-3.2.1-blueviolet)](https://nestedtext.org/en/v3.2/)
5
+ [![Data Format Version Supported](https://img.shields.io/badge/%F0%9F%84%BD%F0%9F%85%83%20Version%20Supported-3.3.0-blueviolet)](https://nestedtext.org/en/v3.3/)
6
6
  [![Official Tests](https://img.shields.io/badge/Official%20Tests-Passing-success?logo=cachet)](https://github.com/KenKundert/nestedtext_tests/)
7
7
  [![GitHub Actions: Continuous Integration](https://github.com/erikw/nestedtext-ruby/actions/workflows/ci.yml/badge.svg)](https://github.com/erikw/nestedtext-ruby/actions/workflows/ci.yml)
8
8
  [![GitHub Actions: Continuous Deployment](https://github.com/erikw/nestedtext-ruby/actions/workflows/cd.yml/badge.svg)](https://github.com/erikw/nestedtext-ruby/actions/workflows/cd.yml)
@@ -19,9 +19,9 @@ A ruby library for the human friendly data format [NestedText](https://nestedtex
19
19
  <!-- Use URL to hosted image, so that it shows up at rubydocs.info as well. Using relative image and yardoc option "--asset img:img" did not work. -->
20
20
  <a href="#" ><img src="https://raw.githubusercontent.com/erikw/nestedtext-ruby/main/img/logo.webp" align="right" width="420px" alt="nestedtext-ruby logo" /></a>
21
21
 
22
- Provided is support for decoding a NestedText file or string to Ruby data structures, as well as encoding Ruby objects to a NestedText file or string. Furthermore there is support for serialization and deserialization of custom classes. The supported language version of the data format can be see in the badge above. This implementation pass all the [official tests](https://github.com/KenKundert/nestedtext_tests).
22
+ Provided is support for decoding a NestedText file or string to Ruby data structures, as well as encoding Ruby objects to a NestedText file or string. Furthermore there is support for serialization and deserialization of custom classes. The supported language version of the data format can be seen in the badge above. This implementation pass all the [official tests](https://github.com/KenKundert/nestedtext_tests).
23
23
 
24
- This library is inspired Ruby stdlib modules `JSON` and `YAML` as well as the Python [reference implementation](https://github.com/KenKundert/nestedtext) of NestedText. Parsing is done with a LL(1) recursive descent parser and dumping with a recursive DFS traversal of the object references.
24
+ This library is inspired by Ruby's stdlib modules `JSON` and `YAML` as well as the Python [reference implementation](https://github.com/KenKundert/nestedtext) of NestedText. Parsing is done with a LL(1) recursive descent parser and dumping with a recursive DFS traversal of the object references.
25
25
 
26
26
  To make this library practically useful, you should pair it with a [schema validator](#schema).
27
27
 
@@ -328,7 +328,6 @@ port_sum = servers.map { |server| server['port'] }.sum
328
328
 
329
329
 
330
330
  # Development
331
-
332
331
  1. Clone the repo
333
332
  ```console
334
333
  $ git clone https://github.com/erikw/nestedtext-ruby.git && cd $(basename "$_" .git)
@@ -339,6 +338,7 @@ port_sum = servers.map { |server| server['port'] }.sum
339
338
  1. You can also run `$ script/console` for an interactive prompt that will allow you to experiment.
340
339
  1. For local testing, install the gem on local machine with: `$ bundle exec rake install`.
341
340
  * or manually with `$ gem build *.gemscpec && gem install *.gem`
341
+ 1. Watch changes on file system and execute tests with `$ bundle exec guard`.
342
342
 
343
343
 
344
344
  Extra:
@@ -376,7 +376,7 @@ Just push a new semver tag and the workflow [cd.yml](.github/workflows/cd.yml) w
376
376
  ```console
377
377
  $ vi -p lib/nestedtext/version.rb CHANGELOG.md
378
378
  $ git commit -am "Prepare vX.Y.Z" && git push
379
- $ git tag x.y.z && git push --tags
379
+ $ git tag vX.Y.Z && git push --tags
380
380
  ```
381
381
 
382
382
  or combined with gem-release:
@@ -19,5 +19,5 @@ class NilClass
19
19
  def self.nt_create(_data) = nil
20
20
 
21
21
  # Adds support for encoding and decoding nil.
22
- def encode_nt_with() = ''
22
+ def encode_nt_with = ''
23
23
  end
@@ -9,6 +9,7 @@ module NestedText
9
9
  # @param obj [Object] The object to encode to NestedText.
10
10
  # @param io [IO] Additionally write the output to this IO object.
11
11
  # The caller is responsible for that the IO is closed after the call to this method.
12
+ # The file willl end with a newline.
12
13
  # @param indentation [Integer] The indentation of nested levels to use.
13
14
  # @param strict [Boolean] If strict mode should be used.
14
15
  #
@@ -21,7 +22,7 @@ module NestedText
21
22
  dumper = Dumper.new(indentation, strict)
22
23
  result = dumper.dump obj
23
24
  unless io.nil?
24
- io.write(result)
25
+ io.write(result, "\n")
25
26
  io.fsync
26
27
  end
27
28
  dumper.dump obj
@@ -1,6 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module NestedText
4
- # The version of this library.
5
- VERSION = '4.4.6'
4
+ VERSION = '4.5.0' # The version of this library.
6
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: nestedtext
3
3
  version: !ruby/object:Gem::Version
4
- version: 4.4.6
4
+ version: 4.5.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Erik Westrup
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2022-02-17 00:00:00.000000000 Z
11
+ date: 2022-06-09 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: unicode_utils
@@ -108,7 +108,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
108
108
  - !ruby/object:Gem::Version
109
109
  version: '0'
110
110
  requirements: []
111
- rubygems_version: 3.3.3
111
+ rubygems_version: 3.3.7
112
112
  signing_key:
113
113
  specification_version: 4
114
114
  summary: A ruby library for the human friendly data format NestedText (https://nestedtext.org/)