on_container 0.0.8 → 0.0.9

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 9b925ace8fb6fd6a98bf34a8ece37b21e18d25db9d348c7473dc68c8941b6769
4
- data.tar.gz: 60a7a5747314918c66233d9e0847869e67c16887f46aae0a5de9aebaaa228a60
3
+ metadata.gz: 0b3faf030bfb28175d373fcaf06d219b8e89eae377a881e0655b0ea71a4248d9
4
+ data.tar.gz: 4b0a1a13bfea4e50a199b92caf15cf8c53361e03f4312057a0c10f7e33fa8e8a
5
5
  SHA512:
6
- metadata.gz: 878956892f1cdf7f9ae0509b76b3262ec5d6b4d2bfb606ac315e15ed69be6a7bb57259f994a13cfb3ffa55756a2b7612b40d4c6b3c8023bbe81f8c065166da9c
7
- data.tar.gz: 33dd25d152e4fb8631c814ef17c7582c63ff9c3cf50d57f384b7f73c8b21eed800a1b73e0f2782066d7f73c963c4b2f0b9b0096215c7a199de2b96e17af990b8
6
+ metadata.gz: ff47344c4ca8270ffc7b3aebc028aecc7bc1858bcb50016301c65c21e2ec94dfe0b4a334d18e7c4fa5722f319fd14c72808246094d707dcae15c3f5e8625d9e9
7
+ data.tar.gz: 166f0b25ea8db2af892eeeabffe15d96419d57688f9f6531d5f6fb88f7b7a9b6551a00e5049264cf6245eff9566bfa270404cd1af58fec6315593cc8b5a8fcb2
@@ -39,11 +39,15 @@ url_keys.each do |url_key|
39
39
  next unless credential_keys.any?
40
40
 
41
41
  uri = URI(ENV[url_key])
42
- username = URI.encode_www_form_component ENV[credential_keys.detect { |key| key =~ /USER/ }]
43
- password = URI.encode_www_form_component ENV[credential_keys.detect { |key| key =~ /PASS/ }]
44
42
 
45
- uri.user = username if username
46
- uri.password = password if password
43
+ credential_keys.each do |credential_key|
44
+ credential_value = URI.encode_www_form_component ENV[credential_key]
45
+ case credential_key
46
+ when /USER/ then uri.user = credential_value
47
+ when /PASS/ then uri.password = credential_value
48
+ end
49
+ end
50
+
47
51
  ENV[url_key] = uri.to_s
48
52
  end
49
53
 
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module OnContainer
4
- VERSION = '0.0.8'
4
+ VERSION = '0.0.9'
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: on_container
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.8
4
+ version: 0.0.9
5
5
  platform: ruby
6
6
  authors:
7
7
  - Roberto Quintanilla
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2020-11-29 00:00:00.000000000 Z
11
+ date: 2020-12-28 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler