inifile_alt 2.0.2
Sign up to get free protection for your applications and to get access to all the features.
- data/.idea/.name +1 -0
- data/.idea/.rakeTasks +7 -0
- data/.idea/compiler.xml +25 -0
- data/.idea/encodings.xml +5 -0
- data/.idea/misc.xml +23 -0
- data/.idea/modules.xml +9 -0
- data/.idea/scopes/scope_settings.xml +5 -0
- data/.idea/uiDesigner.xml +125 -0
- data/.idea/vcs.xml +7 -0
- data/.idea/workspace.xml +757 -0
- data/.travis.yml +12 -0
- data/History.txt +59 -0
- data/README.md +193 -0
- data/Rakefile +26 -0
- data/inifile.iml +16 -0
- data/lib/inifile.rb +570 -0
- data/test/data/bad_1.ini +6 -0
- data/test/data/browscap.ini +5 -0
- data/test/data/comment.ini +10 -0
- data/test/data/escape.ini +13 -0
- data/test/data/global.ini +3 -0
- data/test/data/good.ini +19 -0
- data/test/data/merge.ini +5 -0
- data/test/data/mixed_comment.ini +7 -0
- data/test/data/multiline.ini +24 -0
- data/test/data/no_escaping.ini +4 -0
- data/test/data/param.ini +5 -0
- data/test/test_inifile.rb +505 -0
- metadata +163 -0
metadata
ADDED
@@ -0,0 +1,163 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: inifile_alt
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
hash: 11
|
5
|
+
prerelease:
|
6
|
+
segments:
|
7
|
+
- 2
|
8
|
+
- 0
|
9
|
+
- 2
|
10
|
+
version: 2.0.2
|
11
|
+
platform: ruby
|
12
|
+
authors:
|
13
|
+
- Tim Pease
|
14
|
+
autorequire:
|
15
|
+
bindir: bin
|
16
|
+
cert_chain: []
|
17
|
+
|
18
|
+
date: 2013-03-14 00:00:00 Z
|
19
|
+
dependencies:
|
20
|
+
- !ruby/object:Gem::Dependency
|
21
|
+
name: bones-git
|
22
|
+
prerelease: false
|
23
|
+
requirement: &id001 !ruby/object:Gem::Requirement
|
24
|
+
none: false
|
25
|
+
requirements:
|
26
|
+
- - ">="
|
27
|
+
- !ruby/object:Gem::Version
|
28
|
+
hash: 3
|
29
|
+
segments:
|
30
|
+
- 0
|
31
|
+
version: "0"
|
32
|
+
type: :development
|
33
|
+
version_requirements: *id001
|
34
|
+
- !ruby/object:Gem::Dependency
|
35
|
+
name: bones
|
36
|
+
prerelease: false
|
37
|
+
requirement: &id002 !ruby/object:Gem::Requirement
|
38
|
+
none: false
|
39
|
+
requirements:
|
40
|
+
- - ">="
|
41
|
+
- !ruby/object:Gem::Version
|
42
|
+
hash: 39
|
43
|
+
segments:
|
44
|
+
- 3
|
45
|
+
- 8
|
46
|
+
- 0
|
47
|
+
version: 3.8.0
|
48
|
+
type: :development
|
49
|
+
version_requirements: *id002
|
50
|
+
description: |-
|
51
|
+
Although made popular by Windows, INI files can be used on any system thanks
|
52
|
+
to their flexibility. They allow a program to store configuration data, which
|
53
|
+
can then be easily parsed and changed. Two notable systems that use the INI
|
54
|
+
format are Samba and Trac.
|
55
|
+
|
56
|
+
More information about INI files can be found on the [Wikipedia Page](http://en.wikipedia.org/wiki/INI_file).
|
57
|
+
|
58
|
+
### Properties
|
59
|
+
|
60
|
+
The basic element contained in an INI file is the property. Every property has
|
61
|
+
a name and a value, delimited by an equals sign *=*. The name appears to the
|
62
|
+
left of the equals sign and the value to the right.
|
63
|
+
|
64
|
+
name=value
|
65
|
+
|
66
|
+
### Sections
|
67
|
+
|
68
|
+
Section declarations start with *[* and end with *]* as in `[section1]` and
|
69
|
+
`[section2]` shown in the example below. The section declaration marks the
|
70
|
+
beginning of a section. All properties after the section declaration will be
|
71
|
+
associated with that section.
|
72
|
+
|
73
|
+
### Comments
|
74
|
+
|
75
|
+
All lines beginning with a semicolon *;* or a number sign *#* are considered
|
76
|
+
to be comments. Comment lines are ignored when parsing INI files.
|
77
|
+
|
78
|
+
### Example File Format
|
79
|
+
|
80
|
+
A typical INI file might look like this:
|
81
|
+
|
82
|
+
[section1]
|
83
|
+
; some comment on section1
|
84
|
+
var1 = foo
|
85
|
+
var2 = doodle
|
86
|
+
var3 = multiline values \
|
87
|
+
are also possible
|
88
|
+
|
89
|
+
[section2]
|
90
|
+
# another comment
|
91
|
+
var1 = baz
|
92
|
+
var2 = shoodle
|
93
|
+
email: tim.pease@gmail.com
|
94
|
+
executables: []
|
95
|
+
|
96
|
+
extensions: []
|
97
|
+
|
98
|
+
extra_rdoc_files: []
|
99
|
+
|
100
|
+
files:
|
101
|
+
- .idea/.name
|
102
|
+
- .idea/.rakeTasks
|
103
|
+
- .idea/compiler.xml
|
104
|
+
- .idea/encodings.xml
|
105
|
+
- .idea/misc.xml
|
106
|
+
- .idea/modules.xml
|
107
|
+
- .idea/scopes/scope_settings.xml
|
108
|
+
- .idea/uiDesigner.xml
|
109
|
+
- .idea/vcs.xml
|
110
|
+
- .idea/workspace.xml
|
111
|
+
- .travis.yml
|
112
|
+
- History.txt
|
113
|
+
- README.md
|
114
|
+
- Rakefile
|
115
|
+
- inifile.iml
|
116
|
+
- lib/inifile.rb
|
117
|
+
- test/data/bad_1.ini
|
118
|
+
- test/data/browscap.ini
|
119
|
+
- test/data/comment.ini
|
120
|
+
- test/data/escape.ini
|
121
|
+
- test/data/global.ini
|
122
|
+
- test/data/good.ini
|
123
|
+
- test/data/merge.ini
|
124
|
+
- test/data/mixed_comment.ini
|
125
|
+
- test/data/multiline.ini
|
126
|
+
- test/data/no_escaping.ini
|
127
|
+
- test/data/param.ini
|
128
|
+
- test/test_inifile.rb
|
129
|
+
homepage: http://rubygems.org/gems/inifile
|
130
|
+
licenses: []
|
131
|
+
|
132
|
+
post_install_message:
|
133
|
+
rdoc_options: []
|
134
|
+
|
135
|
+
require_paths:
|
136
|
+
- lib
|
137
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
138
|
+
none: false
|
139
|
+
requirements:
|
140
|
+
- - ">="
|
141
|
+
- !ruby/object:Gem::Version
|
142
|
+
hash: 3
|
143
|
+
segments:
|
144
|
+
- 0
|
145
|
+
version: "0"
|
146
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
147
|
+
none: false
|
148
|
+
requirements:
|
149
|
+
- - ">="
|
150
|
+
- !ruby/object:Gem::Version
|
151
|
+
hash: 3
|
152
|
+
segments:
|
153
|
+
- 0
|
154
|
+
version: "0"
|
155
|
+
requirements: []
|
156
|
+
|
157
|
+
rubyforge_project: inifile_alt
|
158
|
+
rubygems_version: 1.8.24
|
159
|
+
signing_key:
|
160
|
+
specification_version: 3
|
161
|
+
summary: INI file reader and writer
|
162
|
+
test_files:
|
163
|
+
- test/test_inifile.rb
|