drain 0.4 → 0.5
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/LICENSE.txt +1 -1
- data/lib/dr/base/graph.rb +1 -1
- data/lib/dr/base/uri.rb +16 -1
- data/lib/dr/version.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: d31dbf8873c5769a2f758b783609b0b593a0991b8aa7711756ccb196fa4d3f39
|
4
|
+
data.tar.gz: 29dfad85aa000d62587676bc0ae64bb0a13d84d4b239f78575e00f7a6082a835
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 21f21f6b9da3da37e89766eaf44291f4d2d75d5392867051e664659deaeeef54e30cbdd3f158e37ae9218b8cd42205a88118c837480662c74f1fcf0960892ebc
|
7
|
+
data.tar.gz: 79f1917f7626dfd13b083e8f9f7be32bbbf619e36d18e4e69cc8e3e9586f9057dfe9547d92666d768388f88b8a5c4ac2e13c3dc9de420e872a7e7bcc435c0f82
|
data/LICENSE.txt
CHANGED
data/lib/dr/base/graph.rb
CHANGED
data/lib/dr/base/uri.rb
CHANGED
@@ -55,7 +55,7 @@ module URI
|
|
55
55
|
class Generic < ::URI::Generic
|
56
56
|
# check_host returns `false` for 'foo_bar'
|
57
57
|
# but in ssh config this can be a valid host
|
58
|
-
def check_host(
|
58
|
+
def check_host(_v)
|
59
59
|
return true
|
60
60
|
end
|
61
61
|
# @example
|
@@ -83,6 +83,19 @@ module DR
|
|
83
83
|
# TODO: wrap to= to add user= and host=
|
84
84
|
end
|
85
85
|
|
86
|
+
# reimplement deprecated escape and unescape methods since
|
87
|
+
# URI.encode_www_form_component does not encode the same way
|
88
|
+
# cf the source code of URI::DEFAULT_PARSER.escape
|
89
|
+
module URI
|
90
|
+
extend self
|
91
|
+
def escape(*arg)
|
92
|
+
URI::DEFAULT_PARSER.escape(*arg)
|
93
|
+
end
|
94
|
+
def unescape(*arg)
|
95
|
+
URI::DEFAULT_PARSER.unescape(*arg)
|
96
|
+
end
|
97
|
+
end
|
98
|
+
|
86
99
|
module URIlikeWrapper
|
87
100
|
def to_h
|
88
101
|
h = { uri: uri }
|
@@ -172,10 +185,12 @@ module DR
|
|
172
185
|
uri.define_singleton_method(m) do
|
173
186
|
r = super()
|
174
187
|
r && r.is_a?(String) ? URI.unescape(r) : r
|
188
|
+
# r && r.is_a?(String) ? ::URI.decode_www_form_component(r) : r
|
175
189
|
end
|
176
190
|
uri.define_singleton_method(:"#{m}=") do |v|
|
177
191
|
begin
|
178
192
|
super(v && v.is_a?(String) ? URI.escape(v) : v)
|
193
|
+
# super(v && v.is_a?(String) ? ::URI.encode_www_form_component(v) : v)
|
179
194
|
rescue URI::InvalidURIError => e
|
180
195
|
warn "#{e} in (#{self}).#{m}=#{v}"
|
181
196
|
# require 'pry'; binding.pry
|
data/lib/dr/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: drain
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: '0.
|
4
|
+
version: '0.5'
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Damien Robert
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2020-02-18 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: minitest
|
@@ -143,7 +143,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
143
143
|
- !ruby/object:Gem::Version
|
144
144
|
version: '0'
|
145
145
|
requirements: []
|
146
|
-
rubygems_version: 3.
|
146
|
+
rubygems_version: 3.1.2
|
147
147
|
signing_key:
|
148
148
|
specification_version: 4
|
149
149
|
summary: Use a drain for a dryer ruby!
|