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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 400c1cccea675b1e1798d2ffcad5e4f8f0fa598f
4
- data.tar.gz: c7964dd582bed6c40ecd0f2d4fd66c6a69e3d647
3
+ metadata.gz: 2a0e391fc134275cede4dfb9b963138517997dae
4
+ data.tar.gz: 8fd812710a72ed4d2a378d6a10b5fca2515cb710
5
5
  SHA512:
6
- metadata.gz: a3314cb2535401b8460df7f8c3ccfe275326ee69161330e0019d91c23232c56768bc6f248b3da6372046e826473d49ef17111530e44a7ba1f44374540fb02178
7
- data.tar.gz: e361454eeca1dc89eae75277a2d31044e4b8b00e9be271b81fb8f35e232b045e68747b9b514cb7a17c9266dc625836a137734fe005ffbe33144ceed45cb45670
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
@@ -1,3 +1,3 @@
1
1
  module ConfigureSemian
2
- VERSION = "0.1.2"
2
+ VERSION = "0.1.3"
3
3
  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.2
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-05-03 00:00:00.000000000 Z
11
+ date: 2019-12-10 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails