Skip to content

Commit

Permalink
Discourage the use of old modules for dealing with URLs
Browse files Browse the repository at this point in the history
  • Loading branch information
dgdavid committed Jul 26, 2021
1 parent d018814 commit 6cc3fa9
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 0 deletions.
7 changes: 7 additions & 0 deletions library/types/src/modules/URL.rb
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,13 @@
require "yast"

module Yast
# A module for dealing with URLs
#
# @note This is legacy code ported from the
# {https://news.opensuse.org/2007/08/29/yast-independence-of-ycp/ YCP} era. Its use is highly
# discouraged in favor of the {https://ruby-doc.org/stdlib-3.0.2/libdoc/uri/rdoc/URI.html URI}
# standard library or the new {Y2Packager::ZyppUrl} (available from SLE-15-SP3 on) when working
# with libzypp URLs.
class URLClass < Module
def main
textdomain "base"
Expand Down
6 changes: 6 additions & 0 deletions library/types/src/modules/URLRecode.rb
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,12 @@

module Yast
# A drop-in replacement of an earlier Perl implementation
#
# @note This is legacy code ported from the
# {https://news.opensuse.org/2007/08/29/yast-independence-of-ycp/ YCP} era. Its use is highly
# discouraged in favor of the {https://ruby-doc.org/stdlib-3.0.2/libdoc/uri/rdoc/URI.html URI}
# standard library or the new {Y2Packager::ZyppUrl} (available from SLE-15-SP3 on) when working
# with libzypp URLs.
class URLRecodeClass < Module
# these will be substituted to a regex character class
USERNAME_PASSWORD_FRAGMENT_SAFE_CHARS = "-A-Za-z0-9_.!~*'()".freeze
Expand Down

0 comments on commit 6cc3fa9

Please sign in to comment.