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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: d01285b0664679cec22a681a03f5549c6ec356da
4
- data.tar.gz: bed49d308c34623e9bb4271d9ae7a8358c7ee080
3
+ metadata.gz: d01151c6c0776bde1a7aadf38029c8764585d88d
4
+ data.tar.gz: 50a86e3abb55c96ddb3878162aa31baf8fb90197
5
5
  SHA512:
6
- metadata.gz: d027b5ff82b40885ae9634cdccfa2a1332c933cd921bdff776478d6fad155c42bc9f686be7e6b4904e9c419af545a2f4b61895abdee9bad48f5e7d729ed751d3
7
- data.tar.gz: 9ab478060ba21bfed250f721ec6472977d5a1e02a84796f26f0cfbdfed6f4b147412f2d37d0106700f10efa2c8ca6f1c62818a27f151dc0f6de84b4c89644c69
6
+ metadata.gz: '01507058e722fc6cb79ca75d37188285e551effe36c5c31a2c3900375568ee3c1cb5c584f16a50e84fff88c71709fab797f4011784ede37cf0e356aa64d4a4f6'
7
+ data.tar.gz: 72c68d59ef4274e8636ab5b62431efe0fd2c3d3087bbca22e0afa82d6b10061acc7848d9e138f6832d970679f1668d428b2a4434571dd024ebb5933788671090
@@ -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!(/nameserver/, "#{self.nameserver_contents}\nnameserver")
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
@@ -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,
@@ -1,4 +1,4 @@
1
1
  module Dory
2
- VERSION = '0.6.0'
2
+ VERSION = '0.6.1'
3
3
  DATE = '2016-07-12'
4
4
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: dory
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.6.0
4
+ version: 0.6.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ben Porter