configure_semian 0.1.2 → 0.1.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/README.md +5 -0
- data/lib/configure_semian/net_http.rb +9 -0
- data/lib/configure_semian/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 2a0e391fc134275cede4dfb9b963138517997dae
|
4
|
+
data.tar.gz: 8fd812710a72ed4d2a378d6a10b5fca2515cb710
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 485a4ee45a0cfd34c0fcea0df482bde9ac7e7a54dcbe26c89391ac0ede82d271f105ed81d12712b2ca4bad5a211a68c7392cfa712e301ba61d39e888c55e3260
|
7
|
+
data.tar.gz: 622da84f083fe023226999cbd8f6a92662d1b2c5d3f23971def8119a1c1ef8ee215a22b792593383b4ff99934ffbdbdb33296a2f22763d5e22ec2a87e2d4b5e6
|
data/README.md
CHANGED
@@ -93,6 +93,11 @@ Update 0.1.2:
|
|
93
93
|
}
|
94
94
|
}
|
95
95
|
|
96
|
+
## VERSION (0.1.3)
|
97
|
+
- Supports request urls with or without parameters
|
98
|
+
- Supports request with mulitple double slash in URI path
|
99
|
+
- Supports request without forward slash if timeout defined with forward slash
|
100
|
+
|
96
101
|
## Development
|
97
102
|
|
98
103
|
After checking out the repo, run `bin/setup` to install dependencies. You can also run `bin/console` for an interactive prompt that will allow you to experiment.
|
@@ -12,14 +12,23 @@ module Net
|
|
12
12
|
end
|
13
13
|
|
14
14
|
def get_request_timeout_value(host, path)
|
15
|
+
path = process_request_path(path)
|
15
16
|
if !ConfigureSemian::SemianConfiguration.service_configs[host.intern].nil?
|
16
17
|
specs = ConfigureSemian::SemianConfiguration.service_configs[host.intern][path.intern]
|
18
|
+
specs ||= ConfigureSemian::SemianConfiguration.service_configs[host.intern]["/#{path}".intern]
|
19
|
+
specs ||= ConfigureSemian::SemianConfiguration.service_configs[host.intern][path.sub('/','').intern]
|
17
20
|
specs ||= ConfigureSemian::SemianConfiguration.service_configs[host.intern][:default]
|
18
21
|
end
|
19
22
|
specs ||= ConfigureSemian::SemianConfiguration.service_configs[:default]
|
20
23
|
timeout = specs[:timeout] || specs['timeout']
|
21
24
|
return timeout
|
22
25
|
end
|
26
|
+
|
27
|
+
private
|
28
|
+
def process_request_path(path)
|
29
|
+
path = path.split('?').first
|
30
|
+
path.gsub(/[\/]+/,'/')
|
31
|
+
end
|
23
32
|
end
|
24
33
|
|
25
34
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: configure_semian
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- supantha
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2019-
|
11
|
+
date: 2019-12-10 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|