uri 1.0.1 → 1.0.2

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: cd3d7dc37d0488ad25f3cc84a6c8d75baeafe620393c5853db53658aedd6c848
4
- data.tar.gz: 55418aa52949ba4a07d06a7160c6c238020bf1b94afe5c64ea594485c6b98dee
3
+ metadata.gz: 7745ca16bcb1296a3d31816a6c93f6f75487e9fc25b354e31d1ac426e90205ca
4
+ data.tar.gz: 1fa45ab9c8cf8d169a04966e736eba693f4f92e08fa9d3d56940c05fa5169541
5
5
  SHA512:
6
- metadata.gz: c1ad53e9f8bfac0f38450e735bd72bfb2ad0fe1a5617d2f4e68a4e6721863cc3fe7965ca8e88b24e928f6f71ed79933ae650b7e3cfa14a12afae0e27e498799a
7
- data.tar.gz: cc76741218cd86803df72dea8f535c537896d3388bcacb9ec29f0a83adf7035a75ee9c501e509ffb53d85903690b38b206e93c11ee2eb94c03aa68811af5d843
6
+ metadata.gz: c7c73e1f12f5bb4a668a3c57d11b3fcf6b0ae0ed59eb40a33e6d1e6cf5f34919e965c6e4f9302d65d06faaf1f04f038246a87fd6b7d3df754bc3f10f245e102e
7
+ data.tar.gz: f725b0282712bdb74d5643e0e1444a208f8430cf5d8a3149f705bd1b8808d32df52ce428fcf04857f156c041f81571250037bff9b20757bb56bce5f2877f6439
data/lib/uri/common.rb CHANGED
@@ -31,15 +31,10 @@ module URI
31
31
  if Parser == RFC2396_Parser
32
32
  const_set("REGEXP", URI::RFC2396_REGEXP)
33
33
  const_set("PATTERN", URI::RFC2396_REGEXP::PATTERN)
34
- Parser.new.pattern.each_pair do |sym, str|
35
- unless REGEXP::PATTERN.const_defined?(sym)
36
- REGEXP::PATTERN.const_set(sym, str)
37
- end
38
- end
39
34
  end
40
35
 
41
36
  Parser.new.regexp.each_pair do |sym, str|
42
- remove_const(sym) if const_defined?(sym)
37
+ remove_const(sym) if const_defined?(sym, false)
43
38
  const_set(sym, str)
44
39
  end
45
40
  end
@@ -536,4 +536,11 @@ module URI
536
536
  end
537
537
 
538
538
  end # class Parser
539
+
540
+ # Backward compatibility for URI::REGEXP::PATTERN::*
541
+ RFC2396_Parser.new.pattern.each_pair do |sym, str|
542
+ unless RFC2396_REGEXP::PATTERN.const_defined?(sym, false)
543
+ RFC2396_REGEXP::PATTERN.const_set(sym, str)
544
+ end
545
+ end
539
546
  end # module URI
@@ -142,25 +142,25 @@ module URI
142
142
 
143
143
  # Compatibility for RFC2396 parser
144
144
  def extract(str, schemes = nil, &block) # :nodoc:
145
- warn "URI::RFC3986_PARSER.extract is obsoleted. Use URI::RFC2396_PARSER.extract explicitly.", uplevel: 1 if $VERBOSE
145
+ warn "URI::RFC3986_PARSER.extract is obsolete. Use URI::RFC2396_PARSER.extract explicitly.", uplevel: 1 if $VERBOSE
146
146
  RFC2396_PARSER.extract(str, schemes, &block)
147
147
  end
148
148
 
149
149
  # Compatibility for RFC2396 parser
150
150
  def make_regexp(schemes = nil) # :nodoc:
151
- warn "URI::RFC3986_PARSER.make_regexp is obsoleted. Use URI::RFC2396_PARSER.make_regexp explicitly.", uplevel: 1 if $VERBOSE
151
+ warn "URI::RFC3986_PARSER.make_regexp is obsolete. Use URI::RFC2396_PARSER.make_regexp explicitly.", uplevel: 1 if $VERBOSE
152
152
  RFC2396_PARSER.make_regexp(schemes)
153
153
  end
154
154
 
155
155
  # Compatibility for RFC2396 parser
156
156
  def escape(str, unsafe = nil) # :nodoc:
157
- warn "URI::RFC3986_PARSER.escape is obsoleted. Use URI::RFC2396_PARSER.escape explicitly.", uplevel: 1 if $VERBOSE
157
+ warn "URI::RFC3986_PARSER.escape is obsolete. Use URI::RFC2396_PARSER.escape explicitly.", uplevel: 1 if $VERBOSE
158
158
  unsafe ? RFC2396_PARSER.escape(str, unsafe) : RFC2396_PARSER.escape(str)
159
159
  end
160
160
 
161
161
  # Compatibility for RFC2396 parser
162
162
  def unescape(str, escaped = nil) # :nodoc:
163
- warn "URI::RFC3986_PARSER.unescape is obsoleted. Use URI::RFC2396_PARSER.unescape explicitly.", uplevel: 1 if $VERBOSE
163
+ warn "URI::RFC3986_PARSER.unescape is obsolete. Use URI::RFC2396_PARSER.unescape explicitly.", uplevel: 1 if $VERBOSE
164
164
  escaped ? RFC2396_PARSER.unescape(str, escaped) : RFC2396_PARSER.unescape(str)
165
165
  end
166
166
 
data/lib/uri/version.rb CHANGED
@@ -1,6 +1,6 @@
1
1
  module URI
2
2
  # :stopdoc:
3
- VERSION_CODE = '010001'.freeze
3
+ VERSION_CODE = '010002'.freeze
4
4
  VERSION = VERSION_CODE.scan(/../).collect{|n| n.to_i}.join('.').freeze
5
5
  # :startdoc:
6
6
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: uri
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.1
4
+ version: 1.0.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Akira Yamada
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2024-11-08 00:00:00.000000000 Z
11
+ date: 2024-11-14 00:00:00.000000000 Z
12
12
  dependencies: []
13
13
  description: URI is a module providing classes to handle Uniform Resource Identifiers
14
14
  email:
@@ -17,18 +17,9 @@ executables: []
17
17
  extensions: []
18
18
  extra_rdoc_files: []
19
19
  files:
20
- - ".github/dependabot.yml"
21
- - ".github/workflows/gh-pages.yml"
22
- - ".github/workflows/push_gem.yml"
23
- - ".github/workflows/test.yml"
24
- - ".gitignore"
25
20
  - BSDL
26
21
  - COPYING
27
- - Gemfile
28
22
  - README.md
29
- - Rakefile
30
- - bin/console
31
- - bin/setup
32
23
  - lib/uri.rb
33
24
  - lib/uri/common.rb
34
25
  - lib/uri/file.rb
@@ -44,8 +35,6 @@ files:
44
35
  - lib/uri/version.rb
45
36
  - lib/uri/ws.rb
46
37
  - lib/uri/wss.rb
47
- - rakelib/sync_tool.rake
48
- - uri.gemspec
49
38
  homepage: https://github.com/ruby/uri
50
39
  licenses:
51
40
  - Ruby
@@ -1,6 +0,0 @@
1
- version: 2
2
- updates:
3
- - package-ecosystem: 'github-actions'
4
- directory: '/'
5
- schedule:
6
- interval: 'weekly'
@@ -1,46 +0,0 @@
1
- name: Deploy RDoc site to Pages
2
-
3
- on:
4
- push:
5
- branches: [ 'master' ]
6
- workflow_dispatch:
7
-
8
- permissions:
9
- contents: read
10
- pages: write
11
- id-token: write
12
-
13
- concurrency:
14
- group: "pages"
15
- cancel-in-progress: true
16
-
17
- jobs:
18
- build:
19
- runs-on: ubuntu-latest
20
- steps:
21
- - name: Checkout
22
- uses: actions/checkout@v4
23
- - name: Setup Ruby
24
- uses: ruby/setup-ruby@250fcd6a742febb1123a77a841497ccaa8b9e939 # v1.152.0
25
- with:
26
- ruby-version: '3.3'
27
- bundler-cache: true
28
- - name: Setup Pages
29
- id: pages
30
- uses: actions/configure-pages@v5
31
- - name: Build with RDoc
32
- # Outputs to the './_site' directory by default
33
- run: bundle exec rake rdoc
34
- - name: Upload artifact
35
- uses: actions/upload-pages-artifact@v3
36
-
37
- deploy:
38
- environment:
39
- name: github-pages
40
- url: ${{ steps.deployment.outputs.page_url }}
41
- runs-on: ubuntu-latest
42
- needs: build
43
- steps:
44
- - name: Deploy to GitHub Pages
45
- id: deployment
46
- uses: actions/deploy-pages@v4
@@ -1,46 +0,0 @@
1
- name: Publish gem to rubygems.org
2
-
3
- on:
4
- push:
5
- tags:
6
- - 'v*'
7
-
8
- permissions:
9
- contents: read
10
-
11
- jobs:
12
- push:
13
- if: github.repository == 'ruby/uri'
14
- runs-on: ubuntu-latest
15
-
16
- environment:
17
- name: rubygems.org
18
- url: https://rubygems.org/gems/uri
19
-
20
- permissions:
21
- contents: write
22
- id-token: write
23
-
24
- steps:
25
- - name: Harden Runner
26
- uses: step-security/harden-runner@91182cccc01eb5e619899d80e4e971d6181294a7 # v2.10.1
27
- with:
28
- egress-policy: audit
29
-
30
- - uses: actions/checkout@0ad4b8fadaa221de15dcec353f45205ec38ea70b # v4.1.4
31
-
32
- - name: Set up Ruby
33
- uses: ruby/setup-ruby@a6e6f86333f0a2523ece813039b8b4be04560854 # v1.190.0
34
- with:
35
- bundler-cache: true
36
- ruby-version: ruby
37
-
38
- - name: Publish to RubyGems
39
- uses: rubygems/release-gem@612653d273a73bdae1df8453e090060bb4db5f31 # v1
40
-
41
- - name: Create GitHub release
42
- run: |
43
- tag_name="$(git describe --tags --abbrev=0)"
44
- gh release create "${tag_name}" --verify-tag --generate-notes
45
- env:
46
- GITHUB_TOKEN: ${{ secrets.MATZBOT_GITHUB_WORKFLOW_TOKEN }}
@@ -1,30 +0,0 @@
1
- name: CI
2
-
3
- on: [push, pull_request]
4
-
5
- jobs:
6
- ruby-versions:
7
- uses: ruby/actions/.github/workflows/ruby_versions.yml@master
8
- with:
9
- min_version: 2.5
10
-
11
- build:
12
- needs: ruby-versions
13
- name: build (${{ matrix.ruby }} / ${{ matrix.os }})
14
- strategy:
15
- matrix:
16
- ruby: ${{ fromJson(needs.ruby-versions.outputs.versions) }}
17
- os: [ ubuntu-latest, macos-latest ]
18
- exclude:
19
- - ruby: 2.5
20
- os: macos-latest
21
- runs-on: ${{ matrix.os }}
22
- steps:
23
- - uses: actions/checkout@v4
24
- - name: Set up Ruby
25
- uses: ruby/setup-ruby@v1
26
- with:
27
- ruby-version: ${{ matrix.ruby }}
28
- - run: bundle install --jobs 4 --retry 3
29
- - name: Run test
30
- run: rake test
data/.gitignore DELETED
@@ -1,10 +0,0 @@
1
- /.bundle/
2
- /.yardoc
3
- /_yardoc/
4
- /coverage/
5
- /doc/
6
- /pkg/
7
- /spec/reports/
8
- /tmp/
9
- Gemfile.lock
10
- /_site
data/Gemfile DELETED
@@ -1,10 +0,0 @@
1
- source "https://rubygems.org"
2
-
3
- gemspec
4
-
5
- group :development do
6
- gem "bundler"
7
- gem "rake"
8
- gem "test-unit"
9
- gem "test-unit-ruby-core"
10
- end
data/Rakefile DELETED
@@ -1,18 +0,0 @@
1
- require "bundler/gem_tasks"
2
- require "rake/testtask"
3
-
4
- Rake::TestTask.new(:test) do |t|
5
- t.libs << "test/lib"
6
- t.ruby_opts << "-rhelper"
7
- t.test_files = FileList["test/**/test_*.rb"]
8
- end
9
-
10
- require "rdoc/task"
11
- RDoc::Task.new do |doc|
12
- doc.main = "README.md"
13
- doc.title = "URI - handle Uniform Resource Identifiers"
14
- doc.rdoc_files = FileList.new %w[lib README.md LICENSE.txt]
15
- doc.rdoc_dir = "_site" # for github pages
16
- end
17
-
18
- task :default => :test
data/bin/console DELETED
@@ -1,14 +0,0 @@
1
- #!/usr/bin/env ruby
2
-
3
- require "bundler/setup"
4
- require "uri"
5
-
6
- # You can add fixtures and/or initialization code here to make experimenting
7
- # with your gem easier. You can also use a different console, if you like.
8
-
9
- # (If you use this, don't forget to add pry to your Gemfile!)
10
- # require "pry"
11
- # Pry.start
12
-
13
- require "irb"
14
- IRB.start(__FILE__)
data/bin/setup DELETED
@@ -1,8 +0,0 @@
1
- #!/usr/bin/env bash
2
- set -euo pipefail
3
- IFS=$'\n\t'
4
- set -vx
5
-
6
- bundle install
7
-
8
- # Do any other automated setup that you need to do here
@@ -1,17 +0,0 @@
1
- task :sync_tool, [:from] do |t, from: nil|
2
- from ||= (File.identical?(__dir__, "rakelib") ? "../ruby/tool" : File.dirname(__dir__))
3
-
4
- require 'fileutils'
5
-
6
- {
7
- "rakelib/sync_tool.rake" => "rakelib",
8
- "lib/core_assertions.rb" => "test/lib",
9
- "lib/envutil.rb" => "test/lib",
10
- "lib/find_executable.rb" => "test/lib",
11
- "lib/helper.rb" => "test/lib",
12
- }.each do |src, dest|
13
- FileUtils.mkpath(dest)
14
- FileUtils.cp "#{from}/#{src}", dest
15
- rescue Errno::ENOENT
16
- end
17
- end
data/uri.gemspec DELETED
@@ -1,39 +0,0 @@
1
- begin
2
- require_relative "lib/uri/version"
3
- rescue LoadError # Fallback to load version file in ruby core repository
4
- require_relative "version"
5
- end
6
-
7
- Gem::Specification.new do |spec|
8
- spec.name = "uri"
9
- spec.version = URI::VERSION
10
- spec.authors = ["Akira Yamada"]
11
- spec.email = ["akira@ruby-lang.org"]
12
-
13
- spec.summary = %q{URI is a module providing classes to handle Uniform Resource Identifiers}
14
- spec.description = spec.summary
15
-
16
- github_link = "https://github.com/ruby/uri"
17
-
18
- spec.homepage = github_link
19
- spec.licenses = ["Ruby", "BSD-2-Clause"]
20
-
21
- spec.required_ruby_version = '>= 2.5'
22
-
23
- spec.metadata = {
24
- "bug_tracker_uri" => "#{github_link}/issues",
25
- "changelog_uri" => "#{github_link}/releases",
26
- "documentation_uri" => "https://ruby.github.io/uri/",
27
- "homepage_uri" => spec.homepage,
28
- "source_code_uri" => github_link
29
- }
30
-
31
- # Specify which files should be added to the gem when it is released.
32
- # The `git ls-files -z` loads the files in the RubyGem that have been added into git.
33
- spec.files = Dir.chdir(File.expand_path('..', __FILE__)) do
34
- `git ls-files -z 2>#{IO::NULL}`.split("\x0").reject { |f| f.match(%r{^(test|spec|features)/}) }
35
- end
36
- spec.bindir = "exe"
37
- spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
38
- spec.require_paths = ["lib"]
39
- end