an_post_return 0.2.2 → 0.2.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
  SHA256:
3
- metadata.gz: ef253f87181bbb8252772a02c43f75df01ce0d9552b242bebdc2827691d4a223
4
- data.tar.gz: 9c014a9b44a95b3f9146d8a2f9c297a01f868cda36d482a1d07bb9c6375ef01c
3
+ metadata.gz: 758688bc128e110722699506c377c8ef8fa12043ae8442428955d909a1d2f5a5
4
+ data.tar.gz: f6f9d366ec248e45fe9324b05a5240567f37133d528babce5fd6b6f935cbad67
5
5
  SHA512:
6
- metadata.gz: f22c61fd74864c889d74ca0af405c8e2193703a528e6baec6cd447ac4a886e2ef453ab9a56b515a6f3104c51fe9f6a00929277f85018f9b4fc0d8bfb3ff18f7d
7
- data.tar.gz: 2517297590604972cbbf27277c4d2f543f032d654452d58df4af43e7aa6d639af71546e2dbde550347eeb854dee0ac33cc9a9f099b8557f7105cb86d6c55d1fa
6
+ metadata.gz: 99a6dce6c36134cebf00c60014dce2af6c9ec44352d719ff6dde479f69dc1cef6c4987256b0841317889823d1516214dcaa1cd49ec02313ce7b71de66dfb40f7
7
+ data.tar.gz: 9637582d234c2fb069e9887859c336a51f1d5f351cdad0ce7695baf1eefa531d6aa472303817788c56ec6070bbac0255043aea3f98e9ae350481fc5b11449405
@@ -29,12 +29,19 @@ module AnPostReturn
29
29
  def proxy_uri
30
30
  return nil unless proxy_configured?
31
31
 
32
- uri = "http://#{proxy_config[:host]}:#{proxy_config[:port]}"
33
- uri =
34
- "http://#{proxy_config[:user]}:#{proxy_config[:password]}@#{proxy_config[:host]}:#{proxy_config[:port]}" if proxy_config[
35
- :user
36
- ] && proxy_config[:password]
37
- URI.parse(uri)
32
+ user = proxy_config[:user]
33
+ password = proxy_config[:password]
34
+ host = proxy_config[:host]
35
+ port = proxy_config[:port]
36
+
37
+ uri_string = "http://#{host}:#{port}"
38
+ if user && password
39
+ encoded_user = URI.encode_www_form_component(user)
40
+ encoded_password = URI.encode_www_form_component(password)
41
+ uri_string = "http://#{encoded_user}:#{encoded_password}@#{host}:#{port}"
42
+ end
43
+
44
+ URI.parse(uri_string)
38
45
  end
39
46
 
40
47
  def sftp_configured?
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module AnPostReturn
4
- VERSION = "0.2.2"
4
+ VERSION = "0.2.3"
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: an_post_return
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.2
4
+ version: 0.2.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Andy Chong
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2025-04-28 00:00:00.000000000 Z
11
+ date: 2025-05-01 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: x25519