summaryrefslogtreecommitdiff
path: root/lib/uri
AgeCommit message (Collapse)Author
2021-07-28Update to latest uriBenoit Daloze
* https://github.com/ruby/uri/commit/bc47bf71df2b2e9cea09d0b2684ceac7355e42a0 * To include the fix from https://github.com/ruby/uri/pull/27
2021-07-27Fix test failure for parallel testingHiroshi SHIBATA
2021-07-27[ruby/uri] Add proper Ractor support to URIBenoit Daloze
* Using a module to map scheme name to scheme class, which also works with Ractor. * No constant redefinition, no ObjectSpace, still fast lookup for initial schemes. https://github.com/ruby/uri/commit/883567fd81
2021-07-27[ruby/uri] Revert "Fix to support Ruby 3.0 Ractor"Benoit Daloze
* This reverts commit 1faa4fdc161d7aeebdb5de0c407b923beaecf898. * It has too many problems, see https://github.com/ruby/uri/pull/22 for discussion. https://github.com/ruby/uri/commit/b959da2dc9
2021-07-27[ruby/uri] Fix to support Ruby 3.0 Ractorkvokka
https://github.com/ruby/uri/commit/1faa4fdc16
2021-04-22[ruby/uri] Use Regexp#match? to avoid extra allocationsSteven Harman
`#=~` builds `MatchData`, requiring extra allocations as compared to `#match?`, which returns a boolean w/o having to build the `MatchData`. https://github.com/ruby/uri/commit/158f58a9cc
2021-04-22[ruby/uri] Set required_ruby_version to 2.4 in gemspecJeremy Evans
Tests pass on Ruby 2.4, but not on Ruby 2.3. https://github.com/ruby/uri/commit/594418079a
2021-04-22[ruby/uri] Only use UnboundMethod#bind_call if it is availableJeremy Evans
This allows tests to pass on Ruby 2.4-2.6. Fixes #19 https://github.com/ruby/uri/commit/67ca99ca87
2021-04-22[ruby/uri] Optimize URI#hostname and URI#hostname=Lukas Zapletal
https://github.com/ruby/uri/commit/3b7ccfd835
2021-04-22[ruby/uri] Upstream Java proxy property checks from JRubyCharles Oliver Nutter
These Java properties, retrieved from JRuby's "Java env" ENV_JAVA, allow JRuby users to use the same proxy properties the rest of the Java platform uses. This resolves https://bugs.ruby-lang.org/issues/11194 https://github.com/ruby/uri/commit/3bd2bcc95a
2021-03-31Enclose the code that was accidentally a link in "tt"aycabta
2020-12-22Update library versions of the default gems.Hiroshi SHIBATA
They are followed up with https://github.com/ruby/ruby/commit/8fb02b7a97317090e3946e6f2d4a7d034f9699f1
2020-12-16fix doc typod-m-u
s/it's/its Notes: Merged: https://github.com/ruby/ruby/pull/3920
2020-10-27Separate `send` into `public_send` and `__send__`Nobuyoshi Nakada
2020-09-15[ruby/uri] Remove deprecated URI.escape/URI.unescapeJeremy Evans
https://github.com/ruby/uri/commit/61c6a47ebf
2020-08-18Update the license for the default gems to dual licensesHiroshi SHIBATA
2020-07-13[DOC] Use https:// instead of http:// [ci skip]Kazuhiro NISHIYAMA
2020-05-05[ruby/uri] Check if DN existsNobuyoshi Nakada
https://bugs.ruby-lang.org/issues/16830 https://github.com/ruby/uri/commit/b4bf8c1217
2020-03-26* remove trailing spaces. [ci skip]git
2020-03-26[ruby/uri] Remove RCS keywordsDavid Rodríguez
https://github.com/ruby/uri/commit/1bcb1203ad
2020-03-26[ruby/uri] Remove revision lines from commentsMatt Muller
https://github.com/ruby/uri/commit/f1c133a7d6
2020-03-26[ruby/uri] Add support for WebSocketsMatt Muller
https://github.com/ruby/uri/commit/805a95786a
2020-03-26[ruby/uri] Simplify construction of URI instances using parser interface.Samuel Williams
https://github.com/ruby/uri/commit/c145017dd7
2020-03-12Add workaround for test-bundler failureKazuhiro NISHIYAMA
https://github.com/ruby/actions/runs/500526558?check_suite_focus=true#step:16:127 ``` Failures: 1) Bundler.setup when Bundler is bundled doesn't blow up Failure/Error: expect(err).to be_empty expected `"fatal: not a git repository (or any of the parent directories): .git\nfatal: not a git repository (o...the parent directories): .git\nfatal: not a git repository (or any of the parent directories): .git".empty?` to return true, got false Commands: $ /home/runner/work/actions/actions/snapshot-master/ruby \ -I/home/runner/work/actions/actions/snapshot-master/lib:/home/runner/work/actions/actions/snapshot-master/spec/bundler \ -rsupport/hax -rsupport/artifice/fail \ /home/runner/work/actions/actions/snapshot-master/libexec/bundle install --retry 0 Resolving dependencies... Using bundler 2.1.4 Bundle complete! 1 Gemfile dependency, 1 gem now installed. Use `bundle info [gemname]` to see where a bundled gem is installed. fatal: not a git repository (or any of the parent directories): .git fatal: not a git repository (or any of the parent directories): .git fatal: not a git repository (or any of the parent directories): .git # $? => 0 $ /home/runner/work/actions/actions/snapshot-master/ruby \ -I/home/runner/work/actions/actions/snapshot-master/lib:/home/runner/work/actions/actions/snapshot-master/spec/bundler \ -rsupport/hax -rsupport/artifice/fail \ /home/runner/work/actions/actions/snapshot-master/libexec/bundle exec ruby -e \ require\ \'bundler\'\;\ Bundler.setup fatal: not a git repository (or any of the parent directories): .git fatal: not a git repository (or any of the parent directories): .git fatal: not a git repository (or any of the parent directories): .git # $? => 0 # ./spec/bundler/runtime/setup_spec.rb:1056:in `block (3 levels) in <top (required)>' # ./spec/bundler/spec_helper.rb:111:in `block (3 levels) in <top (required)>' # ./spec/bundler/spec_helper.rb:111:in `block (2 levels) in <top (required)>' # ./spec/bundler/spec_helper.rb:78:in `block (2 levels) in <top (required)>' make: *** [yes-test-bundler] Error 1 ```
2020-01-09Fix warnings for URI.encode and URI.decodeJeremy Evans
Use __callee__ to display the called method. Fixes [Bug #16469]
2019-11-11Revert "Revert "Promote uri to default gems""Hiroshi SHIBATA
This reverts commit fdfad905227a0e2e4c224d87181041fb75d5082e. f1f27da6c457684fdbfc0352297e6847f675ce4c resolved this.
2019-11-09Revert "Promote uri to default gems"Hiroshi SHIBATA
This reverts commit c5b4d2a2592942766dc2789f46105b91eba7026a. This commit affects with activation feature of RubyGems. [Bug #16337][ruby-core:95768]
2019-11-09Promote uri to default gemsHiroshi SHIBATA
2019-10-11Use `bind_call` instead of `bind` and `call`Kazuhiro NISHIYAMA
2019-10-08Check for invalid hex escapes in URI#query=Jeremy Evans
Fixes [Bug #11275] Notes: Merged: https://github.com/ruby/ruby/pull/2535
2019-09-27Warn for URI.{,un}{escape,encode}, even if not in verbose modeJeremy Evans
The verbose mode warning has been present for almost 10 years. If we ever plan to remove these methods, we should make the warning a regular deprecation warning so that people are aware. Implements [Feature #15961] Notes: Merged: https://github.com/ruby/ruby/pull/2494
2019-09-27Fix fallback in URI.encode_www_form_component to include #Jeremy Evans
Patch from Matthew Kerwin. Fixes [Bug #14358] Notes: Merged: https://github.com/ruby/ruby/pull/2494
2018-11-02lib/*: Prefer require_relative over require.marcandre
[#15206] [Fix GH-1976] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@65505 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-08-20Update link to Email address specificationkazu
The current link leads to 404, I updated to the actual one. [Fix GH-1929] [ci skip] Author: Nikolay Belov <travelerspb@gmail.com> git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64479 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-07-27Escape debug output in InvalidURIError exceptions.tenderlove
Co-authored-by: Brad Landers <brad@bradlanders.com> git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64079 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-05-17http_proxy setting should respect both parent domain and subdomainnaruse
URI::Generic: Respect no_proxy for both parent domain and subdomains It is now possible to add just the subdomains for proxy bypass. In a setting where the main domain needs to go through proxy while the subdomains don't, it is now possible to just add the subdomains to the no_proxy list. The assumption that subdomains and the parent domain should behave the same wrt no_proxy has been removed. eg: Adding .example.com in no_proxy would allow example.com to go through the proxy. From: Harsimran Singh Maan <maan.harry@gmail.com> fix https://github.com/ruby/ruby/pull/1748 [Bug #14345] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63452 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-04-25[DOC] Fix capitallizing [ci skip]kazu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63260 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-04-25common.rb: unused constantnobu
* lib/uri/common.rb (URI::HTML5ASCIIINCOMPAT): remove the constant which has been unused since r40460, and wrong since r49069 due to the operator precedence. [ruby-core:86678] [Bug #14711] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63259 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-04-23[DOC] URI::Generic#port returns Integer [ci skip]kazu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63247 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-04-21Improve docs for URI librarystomar
* lib/uri/generic.rb: [DOC] fix invalid example code to make it syntax highlighted; drop unnecessary `puts', `p'; adapt to current inspect format without Object id; do not display unnecessary return values in examples; fix or prevent unintended description lists; fix broken RDoc; fix grammar and typos. * lib/uri.rb: ditto. * lib/uri/common.rb: ditto. * lib/uri/file.rb: ditto. * lib/uri/ftp.rb: ditto. * lib/uri/http.rb: ditto. * lib/uri/ldap.rb: ditto. * lib/uri/mailto.rb: ditto. * lib/uri/rfc2396_parser.rb: ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63228 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-04-17lib/uri/generic.rb: fix error in docs for URI::Generic#opaquestomar
* lib/uri/generic.rb: [DOC] fix description of URI::Generic#opaque, and add an example. According to RFC2396, opaque path components do not use the slash "/" character, as opposed to hierarchical path components. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63186 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-04-17lib/uri/ldap.rb: fix errors in docs for URI::LDAPstomar
* lib/uri/ldap.rb: [DOC] fix errors in example code for URI::LDAP.build and URI::LDAP.new. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63185 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-04-17lib/uri/file.rb: fix errors in docs for URI::File.buildstomar
* lib/uri/file.rb: [DOC] fix description and example for URI::File.build; for file URIs the path component must be absolute, escaping of absolute paths is only done for URI::FTP. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63184 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-04-17lib/uri/file.rb: improve docs for URI::Filestomar
* lib/uri/file.rb: [DOC] fix invalid example code for URI::File.build to make it syntax highlighted; drop unnecessary `puts'; fix unintended description list; fix typos. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63182 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-04-02Fix typo on URI.hierarchical? [ci skip]nobu
* lib/uri/generic.rb (hierarchical?): [DOC] Fix typo in the description. [Fix GH-1851] From: Harry Llewelyn <advocation@gmail.com> git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63059 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-03-22set UTF-8 if given URI string is ASCIInaruse
Now URI is normally UTF-8, and US-ASCII URI string is considered as escaped a UTF-8 string. https://github.com/rails/rails/issues/32294 git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62897 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-03-21Docs and tests on URI.hierarchical?, URI.absolute?nobu
Improve code coverage and clarify meaning of hierarchical based on RFC text. [Fix GH-1846] From: Xavier Riley <xavriley@hotmail.com> git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62882 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-03-15Introduce URI::File to handle file URI schemenaruse
* the default value of URI::File's authority is "" (localhost). Both nil and "localhost" is normalized to "" by default. * URI::File ignores setting userinfo and port [Feature #14035] fix https://github.com/ruby/ruby/pull/1719 fic https://github.com/ruby/ruby/pull/1832 git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62767 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-03-08fix error if the input is mixed Unicode and percent-escapesnaruse
Reported by kivikakk (Ashe Connor) with tests and doc fix Patch based on mame and fix by naruse [Bug #14586] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62695 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-01-28uri/common: reduce allocations and retained objectsnormal
Thanks to Sam Saffron for this patch, it shows a nice reduction which affects many web applications: require 'memory_profiler' MemoryProfiler.report do require 'uri' end.pretty_print Before: Total allocated: 986643 bytes (15159 objects) Total retained: 246370 bytes (2532 objects) After: Total allocated: 926903 bytes (13665 objects) Total retained: 208570 bytes (1587 objects) * lib/uri/common.rb: reduce allocations and retained objects [ruby-core:85161] [Feature #14410] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62081 b2dd03c8-39d4-4d8f-98ff-823fe69b080e