o-inifile 4.0.0 → 4.0.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/inifile.rb +1 -1
- data/test/test_inifile.rb +41 -23
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: ef7874e10db7cfbb64fa3ff47802b8f2175661246f8fd1c7811b90f4b4325eba
|
4
|
+
data.tar.gz: 948ec19f58ed9f2a0b23ab15fae267b985469031df01e78b0f2b0800f9d45cd5
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 39b23872dbac016abb099348923233059f1694144284cbf7506b4e4f12ff9811659c01d2714199b7f557b0e3f73aa2ba5be1a07fa8f51165aa3220507fabc644
|
7
|
+
data.tar.gz: 50929d56f9f2e69dac764eb466542ecaa3dab18193be4a18a4178650fecd43381a3df9aa32641bf49a89520e493beeedafa763897d736e90ea574928f1382875
|
data/lib/inifile.rb
CHANGED
data/test/test_inifile.rb
CHANGED
@@ -62,26 +62,34 @@ class TestIniFile < Test::Unit::TestCase
|
|
62
62
|
def test_clone
|
63
63
|
clone = @ini_file.clone
|
64
64
|
assert_equal @ini_file, clone
|
65
|
-
|
65
|
+
if RUBY_VERSION < '2.7'
|
66
|
+
assert !clone.tainted?
|
67
|
+
end
|
66
68
|
assert !clone.frozen?
|
67
69
|
|
68
70
|
# the clone should be completely independent of the original
|
69
71
|
clone['new_section']['one'] = 1
|
70
72
|
assert_not_equal @ini_file, clone
|
71
73
|
|
72
|
-
|
73
|
-
|
74
|
-
|
74
|
+
if RUBY_VERSION < '2.7'
|
75
|
+
# the tainted state is copied to clones
|
76
|
+
@ini_file.taint
|
77
|
+
assert @ini_file.tainted?
|
78
|
+
end
|
75
79
|
|
76
|
-
|
77
|
-
|
80
|
+
if RUBY_VERSION < '2.7'
|
81
|
+
clone = @ini_file.clone
|
82
|
+
assert clone.tainted?
|
83
|
+
end
|
78
84
|
|
79
85
|
# the frozen state is also copied to clones
|
80
86
|
@ini_file.freeze
|
81
87
|
assert @ini_file.frozen?
|
82
88
|
|
83
89
|
clone = @ini_file.clone
|
84
|
-
|
90
|
+
if RUBY_VERSION < '2.7'
|
91
|
+
assert clone.tainted?
|
92
|
+
end
|
85
93
|
assert clone.frozen?
|
86
94
|
end
|
87
95
|
|
@@ -98,26 +106,34 @@ class TestIniFile < Test::Unit::TestCase
|
|
98
106
|
def test_dup
|
99
107
|
dup = @ini_file.dup
|
100
108
|
assert_equal @ini_file, dup
|
101
|
-
|
109
|
+
if RUBY_VERSION < '2.7'
|
110
|
+
assert !dup.tainted?
|
111
|
+
end
|
102
112
|
assert !dup.frozen?
|
103
113
|
|
104
114
|
# the duplicate should be completely independent of the original
|
105
115
|
dup['new_section']['one'] = 1
|
106
116
|
assert_not_equal @ini_file, dup
|
107
117
|
|
108
|
-
|
109
|
-
|
110
|
-
|
118
|
+
if RUBY_VERSION < '2.7'
|
119
|
+
# the tainted state is copied to duplicates
|
120
|
+
@ini_file.taint
|
121
|
+
assert @ini_file.tainted?
|
122
|
+
end
|
111
123
|
|
112
|
-
|
113
|
-
|
124
|
+
if RUBY_VERSION < '2.7'
|
125
|
+
dup = @ini_file.dup
|
126
|
+
assert dup.tainted?
|
127
|
+
end
|
114
128
|
|
115
129
|
# the frozen state, however, is not
|
116
130
|
@ini_file.freeze
|
117
131
|
assert @ini_file.frozen?
|
118
132
|
|
119
133
|
dup = @ini_file.dup
|
120
|
-
|
134
|
+
if RUBY_VERSION < '2.7'
|
135
|
+
assert dup.tainted?
|
136
|
+
end
|
121
137
|
assert !dup.frozen?
|
122
138
|
end
|
123
139
|
|
@@ -332,17 +348,19 @@ class TestIniFile < Test::Unit::TestCase
|
|
332
348
|
assert_equal [], ini_file.sections
|
333
349
|
end
|
334
350
|
|
335
|
-
|
336
|
-
|
337
|
-
|
338
|
-
|
339
|
-
|
351
|
+
if RUBY_VERSION < '2.7'
|
352
|
+
def test_taint
|
353
|
+
assert_equal false, @ini_file.tainted?
|
354
|
+
@ini_file.each_section do |s|
|
355
|
+
assert_equal false, @ini_file[s].tainted?
|
356
|
+
end
|
340
357
|
|
341
|
-
|
358
|
+
@ini_file.taint
|
342
359
|
|
343
|
-
|
344
|
-
|
345
|
-
|
360
|
+
assert_equal true, @ini_file.tainted?
|
361
|
+
@ini_file.each_section do |s|
|
362
|
+
assert_equal true, @ini_file[s].tainted?
|
363
|
+
end
|
346
364
|
end
|
347
365
|
end
|
348
366
|
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: o-inifile
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 4.0.
|
4
|
+
version: 4.0.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Oleg Pudeyev
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2021-
|
12
|
+
date: 2021-09-27 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: bones
|