linux-lxc 0.1.2 → 0.1.3
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.
- checksums.yaml +4 -4
- data/lib/linux/lxc/line.rb +5 -1
- data/lib/linux/lxc/version.rb +1 -1
- data/test/linux_lxc_test.rb +19 -0
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 38ce5b48231fe685aadd6f5be5c46150e8d75124
|
4
|
+
data.tar.gz: 26b881d56dd5186b1091e3f65faf6d632ce27e28
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 73636bbb9d7677faf5dc6add412902bf74285d621ee0f1fad76d8cca00d38a034b93ce91408b9390b4bdcac4e015f9e0e1b54eea6e290e0df0528d2a92ba9cc5
|
7
|
+
data.tar.gz: 37f692b87ac314ceb8a4bbf837a7c9b5034d6f4af078c3725fa871c16818099d7721959053016cde8fd188332f633479cba14f76a9c5dbf5aa299ebc8dab5e15
|
data/lib/linux/lxc/line.rb
CHANGED
data/lib/linux/lxc/version.rb
CHANGED
data/test/linux_lxc_test.rb
CHANGED
@@ -204,6 +204,25 @@ SAMPLE
|
|
204
204
|
lxc.get('lxc.network').comment!
|
205
205
|
assert_equal lxc.get('#').length, 47
|
206
206
|
assert_equal lxc.get('lxc.network'), nil
|
207
|
+
lxc.index.files.values.each do |file|
|
208
|
+
file.real_fname = ::File.join(::File.dirname(file.file), "-.#{::File.basename(file.file)}")
|
209
|
+
end
|
210
|
+
lxc.write
|
211
|
+
l2 = Linux::Lxc.parse(::File.join(::File.dirname(@lxc_config), "-.#{::File.basename(@lxc_config)}"))
|
212
|
+
assert_equal l2.lines.first.key, "#"
|
213
|
+
assert_equal l2.lines.first.value, "# Template used to create this container: /usr/share/lxc/templates/lxc-ubuntu"
|
214
|
+
|
215
|
+
lxc.index.files.values.each do |file|
|
216
|
+
file.file = ::File.join(::File.dirname(file.file), "+.#{::File.basename(file.file)}")
|
217
|
+
end
|
218
|
+
lxc.write
|
219
|
+
l3 = Linux::Lxc.parse(::File.join(::File.dirname(@lxc_config), "+.#{::File.basename(@lxc_config)}"))
|
220
|
+
assert_equal l3.lines.first.key, "#"
|
221
|
+
assert_equal l3.lines.first.value, "# Template used to create this container: /usr/share/lxc/templates/lxc-ubuntu"
|
222
|
+
assert_equal ::File.basename(l3.index.files.values[1].file), "+.ubuntu.common.conf"
|
223
|
+
assert_equal l3.index.files.values[1].lines.first.key, "#"
|
224
|
+
assert_equal l3.index.files.values[1].lines.first.value, "# Default pivot location"
|
225
|
+
|
207
226
|
end
|
208
227
|
|
209
228
|
def test_real_fname
|