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 +4 -4
- data/lib/dory/resolv/linux.rb +1 -1
- data/lib/dory/shell.rb +5 -0
- data/lib/dory/version.rb +2 -2
- metadata +6 -6
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 4a4d74d8be89216d01bff9abf28ac2835b08efa4502089b63da4ecc60dd16d63
|
4
|
+
data.tar.gz: d19508f6bc476dac87ea5bfb78eb1e22e56124cb3bc0307f6b2d1cf4a3e092a0
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a9628ba3c66d893af62c62e020dec602251aa6ce1b83ece68d2666c1982240dbdced5895e35c61bdd0cf8468fa5b7cbec9e6e5a1ccdf0cbcb8a6765025f9fb29
|
7
|
+
data.tar.gz: c73488d8413dc178ef668d87eff60d96657e35c9f182fac4205332453ff736be4287d54b4498549a0f2c2f6c0c5baac5cfb1f7f079b60533a3826af25ef4d236
|
data/lib/dory/resolv/linux.rb
CHANGED
@@ -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
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.
|
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:
|
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.
|
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: []
|