inifile 0.4.0 → 0.4.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/History.txt +6 -1
- data/lib/inifile.rb +2 -2
- data/test/data/multiline.ini +4 -0
- data/test/test_inifile.rb +3 -0
- metadata +4 -4
data/History.txt
CHANGED
data/lib/inifile.rb
CHANGED
@@ -12,7 +12,7 @@ class IniFile
|
|
12
12
|
|
13
13
|
# :stopdoc:
|
14
14
|
class Error < StandardError; end
|
15
|
-
VERSION = '0.4.
|
15
|
+
VERSION = '0.4.1'
|
16
16
|
# :startdoc:
|
17
17
|
|
18
18
|
#
|
@@ -54,7 +54,7 @@ class IniFile
|
|
54
54
|
@rgxp_section = %r/\A\s*\[([^\]]+)\]/o
|
55
55
|
@rgxp_param = %r/\A([^#{@param}]+)#{@param}\s*"?([^"]*)"?\z/
|
56
56
|
|
57
|
-
@rgxp_multiline_start = %r/\A([^#{@param}]+)#{@param}\s*"
|
57
|
+
@rgxp_multiline_start = %r/\A([^#{@param}]+)#{@param}\s*"([^"]*)?\z/
|
58
58
|
@rgxp_multiline_value = %r/\A([^"]*)\z/
|
59
59
|
@rgxp_multiline_end = %r/\A([^"]*)"\z/
|
60
60
|
|
data/test/data/multiline.ini
CHANGED
data/test/test_inifile.rb
CHANGED
@@ -345,6 +345,9 @@ class TestIniFile < Test::Unit::TestCase
|
|
345
345
|
expected = {"four" => "hello\nmultiple\nmultilines"}
|
346
346
|
assert_equal expected, multiple
|
347
347
|
|
348
|
+
multiple = ini_file['empty_lines']
|
349
|
+
expected = {'empty' => '', 'not_empty' => 'full'}
|
350
|
+
|
348
351
|
end
|
349
352
|
|
350
353
|
if RUBY_VERSION >= '1.9'
|
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: inifile
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 13
|
5
5
|
prerelease: false
|
6
6
|
segments:
|
7
7
|
- 0
|
8
8
|
- 4
|
9
|
-
-
|
10
|
-
version: 0.4.
|
9
|
+
- 1
|
10
|
+
version: 0.4.1
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- Tim Pease
|
@@ -15,7 +15,7 @@ autorequire:
|
|
15
15
|
bindir: bin
|
16
16
|
cert_chain: []
|
17
17
|
|
18
|
-
date: 2011-02-
|
18
|
+
date: 2011-02-22 00:00:00 -07:00
|
19
19
|
default_executable:
|
20
20
|
dependencies:
|
21
21
|
- !ruby/object:Gem::Dependency
|