dory 1.1.1 → 1.1.2

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
  SHA256:
3
- metadata.gz: 659312d1fe7a5260a3d79f8a66858a14bc31fc60c6a7401e3b687237d51f4ba4
4
- data.tar.gz: aff69e2a2a6cc4b489de2ad0ea34fe82af138588bd8abe78987e444d66a7048c
3
+ metadata.gz: 4a4d74d8be89216d01bff9abf28ac2835b08efa4502089b63da4ecc60dd16d63
4
+ data.tar.gz: d19508f6bc476dac87ea5bfb78eb1e22e56124cb3bc0307f6b2d1cf4a3e092a0
5
5
  SHA512:
6
- metadata.gz: a1f644b260ee0b79beb65ec308ab3cbaad934ae5d214bf60ba88fd0037f10bcb9e50d259a573a6344f91eca8d91fbf6f27902149390bab4da836f360e055b53c
7
- data.tar.gz: 49c3141b65dd1cc1e3a98bb4d23602eaa43f04d524c451a8cd1ad52709d1e88d841a69cb6dfde103f22724ea5fef5c9d8db2b8735bd9a46aa68a23d4bece626e
6
+ metadata.gz: a9628ba3c66d893af62c62e020dec602251aa6ce1b83ece68d2666c1982240dbdced5895e35c61bdd0cf8468fa5b7cbec9e6e5a1ccdf0cbcb8a6765025f9fb29
7
+ data.tar.gz: c73488d8413dc178ef668d87eff60d96657e35c9f182fac4205332453ff736be4287d54b4498549a0f2c2f6c0c5baac5cfb1f7f079b60533a3826af25ef4d236
@@ -74,7 +74,7 @@ module Dory
74
74
  def self.write_to_file(contents)
75
75
  # have to use this hack cuz we don't run as root :-(
76
76
  puts "Requesting sudo to write to #{self.resolv_file}".green
77
- Bash.run_command("echo -e '#{contents}' | sudo /usr/bin/tee #{Shellwords.escape(self.resolv_file)} >/dev/null")
77
+ Bash.run_command("echo -e '#{Bash.escape_single_quotes(contents)}' | sudo /usr/bin/tee #{Shellwords.escape(self.resolv_file)} >/dev/null")
78
78
  end
79
79
 
80
80
  def self.resolv_file_contents
data/lib/dory/shell.rb CHANGED
@@ -13,6 +13,11 @@ module Dory
13
13
  end
14
14
 
15
15
  module Bash
16
+ def self.escape_single_quotes(str)
17
+ # Using this technique here: https://stackoverflow.com/a/1315213/2062384
18
+ str.gsub("'", "'\\\\''")
19
+ end
20
+
16
21
  def self.escape_double_quotes(str)
17
22
  str.gsub('"', '\\"')
18
23
  end
data/lib/dory/version.rb CHANGED
@@ -1,9 +1,9 @@
1
1
  module Dory
2
2
  def self.version
3
- '1.1.1'
3
+ '1.1.2'
4
4
  end
5
5
 
6
6
  def self.date
7
- '2021-04-06'
7
+ '2022-09-21'
8
8
  end
9
9
  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: 1.1.1
4
+ version: 1.1.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ben Porter
8
- autorequire:
8
+ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2021-04-06 00:00:00.000000000 Z
11
+ date: 2022-09-21 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: colorize
@@ -174,7 +174,7 @@ homepage: https://github.com/FreedomBen/dory
174
174
  licenses:
175
175
  - MIT
176
176
  metadata: {}
177
- post_install_message:
177
+ post_install_message:
178
178
  rdoc_options: []
179
179
  require_paths:
180
180
  - lib
@@ -189,8 +189,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
189
189
  - !ruby/object:Gem::Version
190
190
  version: '0'
191
191
  requirements: []
192
- rubygems_version: 3.0.1
193
- signing_key:
192
+ rubygems_version: 3.3.7
193
+ signing_key:
194
194
  specification_version: 4
195
195
  summary: Your development proxy for Docker
196
196
  test_files: []