dory 0.6.0 → 0.6.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/dory/resolv/linux.rb +1 -1
- data/lib/dory/shell.rb +5 -1
- data/lib/dory/version.rb +1 -1
- 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: d01151c6c0776bde1a7aadf38029c8764585d88d
|
4
|
+
data.tar.gz: 50a86e3abb55c96ddb3878162aa31baf8fb90197
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: '01507058e722fc6cb79ca75d37188285e551effe36c5c31a2c3900375568ee3c1cb5c584f16a50e84fff88c71709fab797f4011784ede37cf0e356aa64d4a4f6'
|
7
|
+
data.tar.gz: 72c68d59ef4274e8636ab5b62431efe0fd2c3d3087bbca22e0afa82d6b10061acc7848d9e138f6832d970679f1668d428b2a4434571dd024ebb5933788671090
|
data/lib/dory/resolv/linux.rb
CHANGED
@@ -51,7 +51,7 @@ module Dory
|
|
51
51
|
prev_conts = self.resolv_file_contents
|
52
52
|
unless self.contents_has_our_nameserver?(prev_conts)
|
53
53
|
if prev_conts =~ /nameserver/
|
54
|
-
prev_conts.sub!(
|
54
|
+
prev_conts.sub!(/^\s*nameserver/, "#{self.nameserver_contents}\nnameserver")
|
55
55
|
else
|
56
56
|
prev_conts = "#{prev_conts}\n#{self.nameserver_contents}"
|
57
57
|
end
|
data/lib/dory/shell.rb
CHANGED
@@ -13,8 +13,12 @@ module Dory
|
|
13
13
|
end
|
14
14
|
|
15
15
|
module Bash
|
16
|
+
def self.escape_double_quotes(str)
|
17
|
+
str.gsub('"', '\\"')
|
18
|
+
end
|
19
|
+
|
16
20
|
def self.run_command(command)
|
17
|
-
stdout = `bash -c "#{command}"`
|
21
|
+
stdout = `bash -c "#{self.escape_double_quotes(command)}"`
|
18
22
|
OpenStruct.new({
|
19
23
|
success?: $?.exitstatus == 0,
|
20
24
|
exitstatus: $?.exitstatus,
|
data/lib/dory/version.rb
CHANGED