Path to this page:
./
devel/ruby-iniparse,
Pure Ruby library for parsing INI documents
Branch: CURRENT,
Version: 1.5.0,
Package name: ruby26-iniparse-1.5.0,
Maintainer: pkgsrc-usersIniParse 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:
SHA1: 739875d41f5d002f41eba8d38eacda4460da8159
RMD160: 6a521ee19b66f8fa504d547504aebb26a08c162a
Filesize: 16 KB
Version history: (Expand)
- (2020-03-08) Updated to version: ruby26-iniparse-1.5.0
- (2017-11-23) Package has been reborn
- (2017-07-13) Updated to version: ruby23-iniparse-1.4.4
- (2017-06-04) Package added to pkgsrc.se, version ruby23-iniparse-1.4.3 (created)
CVS history: (Expand)
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) |  |
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.
|