diff options
author | Tim Smith <tsmith84@gmail.com> | 2020-11-21 21:04:52 -0800 |
---|---|---|
committer | Tim Smith <tsmith84@gmail.com> | 2020-11-27 14:46:44 -0800 |
commit | 7709ecb01695105e2eae7db925d345b86c9f7d00 (patch) | |
tree | 0188a0a1ca75d70e8898b0140183f788abe4d6a3 /lib/chef/knife | |
parent | bb7d70c86d8af2d3acee51ea09e61ff638e1265f (diff) | |
download | chef-7709ecb01695105e2eae7db925d345b86c9f7d00.tar.gz |
Use URI::DEFAULT_PARSER.make_regexp instead of URI.regexp
RuboCop claims that URI.regexp is the obsolete way of doing this. Both produce the same regex.
Signed-off-by: Tim Smith <tsmith@chef.io>
Diffstat (limited to 'lib/chef/knife')
-rw-r--r-- | lib/chef/knife/bootstrap/train_connector.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/chef/knife/bootstrap/train_connector.rb b/lib/chef/knife/bootstrap/train_connector.rb index 8a1e5863bb..a220ece5bc 100644 --- a/lib/chef/knife/bootstrap/train_connector.rb +++ b/lib/chef/knife/bootstrap/train_connector.rb @@ -285,7 +285,7 @@ class Chef # Train.unpack_target_from_uri only works for complete URIs in # form of proto://[user[:pass]@]host[:port]/ # So we'll add the protocol prefix if it's not supplied. - uri_to_check = if URI.regexp.match(uri) + uri_to_check = if URI::DEFAULT_PARSER.make_regexp.match(uri) uri else "#{default_protocol}://#{uri}" |