parseconfig 1.0.7 → 1.0.8
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Changelog +4 -0
- data/README.md +7 -5
- data/lib/parseconfig.rb +2 -2
- metadata +2 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 56edd2517c03e43f3a23682fde2c9d75d347915a
|
4
|
+
data.tar.gz: e3558aa93f8891394d6a2a16cb23eccd572ff7dd
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 80853b4986b86ba31a242c340d72422719214e9e1955588fe63575d1afb74da7b3535efeb7ab9b27dfa5d58e47820f26d234e0cf1309224c12ae6b3a85f4e7c9
|
7
|
+
data.tar.gz: 504a7f0c4d64ea7679850edecb18802087d0de0eb96195830af33284d5a747b1e3f108d2aa7f0cfbb006abee3abb0f47950f249adabacfde6e3c30f9b42d1918
|
data/Changelog
CHANGED
data/README.md
CHANGED
@@ -1,15 +1,14 @@
|
|
1
1
|
# Ruby ParseConfig Library
|
2
2
|
|
3
3
|
ParseConfig provides simple parsing of standard configuration files in the
|
4
|
-
form of
|
4
|
+
form of `param = value`. It also supports nested `[group]` sections.
|
5
5
|
|
6
6
|
[![Continuous Integration Status](https://secure.travis-ci.org/datafolklabs/ruby-parseconfig.png)](http://travis-ci.org/datafolklabs/ruby-parseconfig)
|
7
7
|
|
8
|
-
Installation
|
9
|
-
------------
|
8
|
+
## Installation
|
10
9
|
|
11
10
|
```
|
12
|
-
$
|
11
|
+
$ gem install parseconfig
|
13
12
|
```
|
14
13
|
|
15
14
|
Gemfile
|
@@ -34,7 +33,7 @@ group1_param2 = group1_value2
|
|
34
33
|
[group2]
|
35
34
|
group2_param1 = group2_value1
|
36
35
|
group2_param2 = group2_value2
|
37
|
-
|
36
|
+
```
|
38
37
|
|
39
38
|
Access it with ParseConfig:
|
40
39
|
|
@@ -76,8 +75,10 @@ Access it with ParseConfig:
|
|
76
75
|
|
77
76
|
>> file = File.open('/path/to/config/file', 'w')
|
78
77
|
=> #<File:file>
|
78
|
+
|
79
79
|
>> config.write(file)
|
80
80
|
=> []
|
81
|
+
|
81
82
|
>> file.close
|
82
83
|
=> nil
|
83
84
|
|
@@ -87,3 +88,4 @@ Access it with ParseConfig:
|
|
87
88
|
|
88
89
|
The ParseConfig library is Open Source and distributed under the MIT license.
|
89
90
|
Please see the LICENSE file included with this software.
|
91
|
+
|
data/lib/parseconfig.rb
CHANGED
@@ -18,7 +18,7 @@
|
|
18
18
|
|
19
19
|
class ParseConfig
|
20
20
|
|
21
|
-
Version = '1.0.
|
21
|
+
Version = '1.0.8'
|
22
22
|
|
23
23
|
attr_accessor :config_file, :params, :groups
|
24
24
|
|
@@ -28,7 +28,7 @@ class ParseConfig
|
|
28
28
|
# the config file is 'param = value' then the itializer
|
29
29
|
# will eval "@param = value"
|
30
30
|
#
|
31
|
-
def initialize(config_file=nil, separator='=', comments
|
31
|
+
def initialize(config_file=nil, separator='=', comments=['#', ';'])
|
32
32
|
@config_file = config_file
|
33
33
|
@params = {}
|
34
34
|
@groups = []
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: parseconfig
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.
|
4
|
+
version: 1.0.8
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- BJ Dierkes
|
@@ -45,3 +45,4 @@ signing_key:
|
|
45
45
|
specification_version: 4
|
46
46
|
summary: Config File Parser for Standard Unix/Linux Type Config Files
|
47
47
|
test_files: []
|
48
|
+
has_rdoc:
|