./devel/ruby-iniparse, Pure Ruby library for parsing INI documents

[ CVSweb ] [ Homepage ] [ RSS ] [ Required by ] [ Add to tracker ]


Branch: CURRENT, Version: 1.5.0, Package name: ruby27-iniparse-1.5.0, Maintainer: pkgsrc-users

IniParse is a pure Ruby library for parsing

INI[http://en.wikipedia.org/wiki/INI_file] configuration and data files.

=== Main features

* Support for duplicate options. While not common, some INI files contain an
option more than once. IniParse does not overwrite previous options, but
allows you to access all of the duplicate values.

* Preservation of white space and blank lines. When writing back to your INI
file, line indents, white space and comments (and their indents) are
preserved. Only trailing white space (which has no significance in INI
files) will be removed.

* Preservation of section and option ordering. Sections and options are kept
in the same order they are in the original document ensuring that nothing
gets mangled when writing back to the file.


Required to run:
[lang/ruby26-base]

Required to build:
[pkgtools/cwrappers]

Master sites:

Filesize: 16 KB

Version history: (Expand)


CVS history: (Expand)


   2021-10-26 12:20:11 by Nia Alarie | Files touched by this commit (3016)
Log message:
archivers: Replace RMD160 checksums with BLAKE2s checksums

All checksums have been double-checked against existing RMD160 and
SHA512 hashes

Could not be committed due to merge conflict:
devel/py-traitlets/distinfo

The following distfiles were unfetchable (note: some may be only fetched
conditionally):

./devel/pvs/distinfo pvs-3.2-solaris.tgz
./devel/eclipse/distinfo eclipse-sourceBuild-srcIncluded-3.0.1.zip
   2021-10-07 15:44:44 by Nia Alarie | Files touched by this commit (3017)
Log message:
devel: Remove SHA1 hashes for distfiles
   2020-03-08 15:19:09 by Takahiro Kambe | Files touched by this commit (1)
Log message:
devel/ruby-iniparse: add USE_LANGUAGES

Add "USE_LANGUAGES=  # none".
   2020-03-08 15:17:56 by Takahiro Kambe | Files touched by this commit (3) | Package updated
Log message:
devel/ruby-iniparse: update to 1.5.0

Update ruby-iniparse to 1.5.0.

### 1.5.0

* OptionCollection no longer yields duplicate keys as an array, but instead \ 
yields each key in turn.

  For example, given an INI file:

    [test]
    a = 1
    a = 2
    b = 3

  IniParse would previously yield a single "a" key: an array \ 
containing two `Line`s:

    doc['test'].map { |line| line }
    # => [[<a = 1>, <a = 2>], <b = 3>]

  Instead, each key/value pair will be yielded in turn:

    doc['test'].map { |line| line }
    # => [<a = 1>, <a = 2>, <b = 3>]

  Directly accessing values via `[]` will still return an array of values as before:

    doc['test']['a']
    # => [1, 2]

* LineCollection#each may be called without a block, returning an Enumerator.

    doc = IniParse.parse(<<~EOF)
      [test]
      a = x
      b = y
    EOF

    doc[test].each
    # => #<Enumerator: ...>

  This allows for chaining as in the standard library:

    doc['test'].map.with_index { |a, i| { index: i, value: a.value } }
    # => [{ index: 0, value: 'x' }, { index: 1, value: 'y' }]
   2017-07-13 17:34:08 by Takahiro Kambe | Files touched by this commit (2)
Log message:
Update ruby-iniparse to 1.4.4.

1.4.4					2017/07/04

* Fix handling files with DOS line endings
* Improve error message with unparseable lines
   2017-06-04 17:54:12 by Takahiro Kambe | Files touched by this commit (4)
Log message:
Add ruby-iniparse package version 1.4.3.

IniParse is a pure Ruby library for parsing

INI[http://en.wikipedia.org/wiki/INI_file] configuration and data files.

=== Main features

* Support for duplicate options.  While not common, some INI files contain an
  option more than once.  IniParse does not overwrite previous options, but
  allows you to access all of the duplicate values.

* Preservation of white space and blank lines.  When writing back to your INI
  file, line indents, white space and comments (and their indents) are
  preserved.  Only trailing white space (which has no significance in INI
  files) will be removed.

* Preservation of section and option ordering.  Sections and options are kept
  in the same order they are in the original document ensuring that nothing
  gets mangled when writing back to the file.