dory 0.5.2 → 0.5.3

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: ed649cb5289752a049537d2bd38fae7e7834a84f
4
- data.tar.gz: 941c32d3efd7be78416cbacc0b1033aa34331acb
3
+ metadata.gz: 42dfa3ab7b465074b8cdfdb1569843e9ef01bd1a
4
+ data.tar.gz: 75395caaecd1ffeb0935a2e74696f8ec0098ef40
5
5
  SHA512:
6
- metadata.gz: 4ea2d8ad43bae5f5235fe962b5ce64afa64267603915c65942f3938937e584448b0e4f4449bda8fe48a21a5b11690c722aea8b3bce4f90ccc8c6092305b75333
7
- data.tar.gz: 7a2e0d0475f4b98762e4434bf2c661ae025472c8c4b83cb75107f0e39b860c810f00e1c7c1a93bef7fea975c5745d929a3c02091c9c22ae6b07d87bd95b03165
6
+ metadata.gz: 3e091af619461735189e364f7809d8f89d3ab32b401a2f7c11d59586b815fd5bf49e15b556f09161b7e32e515eb8192807d926a9fd3e2914f9929a0d5f47f4c6
7
+ data.tar.gz: ef60ba95e638a0b8ad34456bae0100230286bb6e34b1dfe873783e5446a26c8d2cae6a6bcd234f0cd50b247c9a95352a93284f804e9e15e53fcff493df80a12a
@@ -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.5.2'
3
- DATE = '2016-03-22'
2
+ VERSION = '0.5.3'
3
+ DATE = '2016-07-12'
4
4
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: dory
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.5.2
4
+ version: 0.5.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ben Porter
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-03-22 00:00:00.000000000 Z
11
+ date: 2016-07-12 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: colorize
@@ -183,7 +183,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
183
183
  version: '0'
184
184
  requirements: []
185
185
  rubyforge_project:
186
- rubygems_version: 2.5.2
186
+ rubygems_version: 2.6.11
187
187
  signing_key:
188
188
  specification_version: 4
189
189
  summary: Your development proxy for Docker