Skip to content

Commit

Permalink
Merge branch 'main' into freeze_concatenated_strings
Browse files Browse the repository at this point in the history
  • Loading branch information
sporkmonger authored Jul 30, 2022
2 parents 87931d3 + a4d1f8b commit fba909e
Show file tree
Hide file tree
Showing 16 changed files with 41 additions and 54 deletions.
50 changes: 21 additions & 29 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,11 @@ jobs:
matrix:
ruby: [2.7]
idna_mode: [native, pure]
os: [ubuntu-18.04]
os: [ubuntu-20.04]
env:
IDNA_MODE: ${{ matrix.idna_mode }}
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3

- name: Install libidn
run: sudo apt-get install libidn11-dev
Expand Down Expand Up @@ -46,15 +46,15 @@ jobs:
fail-fast: false
matrix:
ruby: [2.7]
os: [ubuntu-18.04]
os: [ubuntu-20.04]
env:
BUNDLE_WITHOUT: development
COVERALLS_SERVICE_NAME: github
COVERALLS_REPO_TOKEN: ${{ secrets.GITHUB_TOKEN }}
COVERALLS_DEBUG: true
CI_BUILD_NUMBER: ${{ github.run_id }}
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3

- name: Install libidn
run: sudo apt-get install libidn11-dev
Expand Down Expand Up @@ -91,46 +91,38 @@ jobs:
- jruby-9.1
- jruby-9.2
- jruby-9.3
- jruby-head
- truffleruby-21.3
- truffleruby-head
- truffleruby-22.1
os:
- ubuntu-18.04
- ubuntu-20.04
gemfile:
- Gemfile
include:
- { os: ubuntu-18.04, ruby: 2.7, gemfile: gemfiles/public_suffix_2.rb }
- { os: ubuntu-18.04, ruby: 2.7, gemfile: gemfiles/public_suffix_3.rb }
# Ubuntu 20.04
- { os: ubuntu-20.04, ruby: 2.7 }
- { os: ubuntu-20.04, ruby: '3.0' }
- { os: ubuntu-20.04, ruby: 3.1 }
- { os: ubuntu-20.04, ruby: 2.7, gemfile: gemfiles/public_suffix_2.rb }
- { os: ubuntu-20.04, ruby: 2.7, gemfile: gemfiles/public_suffix_3.rb }
- { os: ubuntu-20.04, ruby: 2.7, gemfile: gemfiles/public_suffix_4.rb }
# Ubuntu
- { os: ubuntu-18.04, ruby: 2.7 }
- { os: ubuntu-22.04, ruby: 3.1 }
# macOS
- { os: macos-10.15, ruby: 2.7 }
- { os: macos-10.15, ruby: '3.0' }
- { os: macos-10.15, ruby: jruby }
- { os: macos-10.15, ruby: truffleruby-21.3 }
- { os: macos-11, ruby: 2.7 }
- { os: macos-11, ruby: '3.0' }
- { os: macos-11, ruby: 3.1 }
- { os: macos-11, ruby: jruby }
- { os: macos-11, ruby: truffleruby-21.3 }
- { os: macos-12, ruby: 3.1 }
# Windows
- { os: windows-2019, ruby: 2.7 }
- { os: windows-2019, ruby: '3.0' }
- { os: windows-2019, ruby: 3.1 }
- { os: windows-2022, ruby: 3.1 }
- { os: windows-2019, ruby: jruby-9.1 }
- { os: windows-2019, ruby: jruby-9.2 }
- { os: windows-2019, ruby: jruby-9.3 }
- { os: windows-2022, ruby: jruby-9.3 }
# allowed to fail
- { os: ubuntu-18.04, ruby: jruby-head, allow-failure: true }
- { os: ubuntu-18.04, ruby: truffleruby-head, allow-failure: true }
- { os: ubuntu-20.04, ruby: jruby-head, gemfile: Gemfile, allow-failure: true }
- { os: ubuntu-20.04, ruby: truffleruby-head, gemfile: Gemfile, allow-failure: true }
env:
BUNDLE_GEMFILE: ${{ matrix.gemfile }}
BUNDLE_WITHOUT: development:coverage
# Workaround for Windows JRuby JDK issue
# https://github.com/ruby/setup-ruby/issues/339
# https://github.com/jruby/jruby/issues/7182#issuecomment-1112953015
JAVA_OPTS: -Djdk.io.File.enableADS=true
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3

- name: Install libidn (Ubuntu)
if: startsWith(matrix.os, 'ubuntu')
Expand Down
4 changes: 3 additions & 1 deletion Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -25,4 +25,6 @@ group :test, :development do
gem "rake", ">= 12.3.3"
end

gem "idn-ruby", platform: :mri
unless ENV["IDNA_MODE"] == "pure"
gem "idn-ruby", platform: :mri
end
20 changes: 9 additions & 11 deletions addressable.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -6,32 +6,30 @@ Gem::Specification.new do |s|
s.version = "2.8.0"

s.required_rubygems_version = Gem::Requirement.new(">= 0".freeze) if s.respond_to? :required_rubygems_version=
s.metadata = { "changelog_uri" => "https://github.com/sporkmonger/addressable/blob/main/CHANGELOG.md" } if s.respond_to? :metadata=
s.require_paths = ["lib".freeze]
s.authors = ["Bob Aman".freeze]
s.date = "2021-07-03"
s.description = "Addressable is an alternative implementation to the URI implementation that is\npart of Ruby's standard library. It is flexible, offers heuristic parsing, and\nadditionally provides extensive support for IRIs and URI templates.\n".freeze
s.email = "bob@sporkmonger.com".freeze
s.extra_rdoc_files = ["README.md".freeze]
s.files = ["CHANGELOG.md".freeze, "Gemfile".freeze, "LICENSE.txt".freeze, "README.md".freeze, "Rakefile".freeze, "addressable.gemspec".freeze, "benchmark".freeze, "coverage".freeze, "data".freeze, "data/unicode.data".freeze, "documentation".freeze, "gemfiles".freeze, "lib".freeze, "lib/addressable".freeze, "lib/addressable.rb".freeze, "lib/addressable/idna".freeze, "lib/addressable/idna.rb".freeze, "lib/addressable/idna/native.rb".freeze, "lib/addressable/idna/pure.rb".freeze, "lib/addressable/template.rb".freeze, "lib/addressable/uri.rb".freeze, "lib/addressable/version.rb".freeze, "spec".freeze, "spec/addressable".freeze, "spec/addressable/idna_spec.rb".freeze, "spec/addressable/net_http_compat_spec.rb".freeze, "spec/addressable/security_spec.rb".freeze, "spec/addressable/template_spec.rb".freeze, "spec/addressable/uri_spec.rb".freeze, "spec/spec_helper.rb".freeze, "specdoc".freeze, "tasks".freeze, "tasks/clobber.rake".freeze, "tasks/gem.rake".freeze, "tasks/git.rake".freeze, "tasks/metrics.rake".freeze, "tasks/profile.rake".freeze, "tasks/rspec.rake".freeze, "tasks/yard.rake".freeze, "tmp".freeze]
s.files = ["CHANGELOG.md".freeze, "Gemfile".freeze, "LICENSE.txt".freeze, "README.md".freeze, "Rakefile".freeze, "data/unicode.data".freeze, "lib/addressable".freeze, "lib/addressable.rb".freeze, "lib/addressable/idna".freeze, "lib/addressable/idna.rb".freeze, "lib/addressable/idna/native.rb".freeze, "lib/addressable/idna/pure.rb".freeze, "lib/addressable/template.rb".freeze, "lib/addressable/uri.rb".freeze, "lib/addressable/version.rb".freeze, "spec/addressable".freeze, "spec/addressable/idna_spec.rb".freeze, "spec/addressable/net_http_compat_spec.rb".freeze, "spec/addressable/security_spec.rb".freeze, "spec/addressable/template_spec.rb".freeze, "spec/addressable/uri_spec.rb".freeze, "spec/spec_helper.rb".freeze, "tasks/clobber.rake".freeze, "tasks/gem.rake".freeze, "tasks/git.rake".freeze, "tasks/metrics.rake".freeze, "tasks/profile.rake".freeze, "tasks/rspec.rake".freeze, "tasks/yard.rake".freeze]
s.homepage = "https://github.com/sporkmonger/addressable".freeze
s.licenses = ["Apache-2.0".freeze]
s.rdoc_options = ["--main".freeze, "README.md".freeze]
s.required_ruby_version = Gem::Requirement.new(">= 2.0".freeze)
s.rubygems_version = "3.0.3".freeze
s.required_ruby_version = Gem::Requirement.new(">= 2.2".freeze)
s.rubygems_version = "3.3.7".freeze
s.summary = "URI Implementation".freeze

if s.respond_to? :specification_version then
s.specification_version = 4
end

if Gem::Version.new(Gem::VERSION) >= Gem::Version.new('1.2.0') then
s.add_runtime_dependency(%q<public_suffix>.freeze, [">= 2.0.2", "< 5.0"])
s.add_development_dependency(%q<bundler>.freeze, [">= 1.0", "< 3.0"])
else
s.add_dependency(%q<public_suffix>.freeze, [">= 2.0.2", "< 5.0"])
s.add_dependency(%q<bundler>.freeze, [">= 1.0", "< 3.0"])
end
if s.respond_to? :add_runtime_dependency then
s.add_runtime_dependency(%q<public_suffix>.freeze, [">= 2.0.2", "< 6.0"])
s.add_development_dependency(%q<bundler>.freeze, [">= 1.0", "< 3.0"])
else
s.add_dependency(%q<public_suffix>.freeze, [">= 2.0.2", "< 5.0"])
s.add_dependency(%q<public_suffix>.freeze, [">= 2.0.2", "< 6.0"])
s.add_dependency(%q<bundler>.freeze, [">= 1.0", "< 3.0"])
end
end
6 changes: 6 additions & 0 deletions gemfiles/public_suffix_4.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
# frozen_string_literal: true

# Assumes this gemfile is used from the project root
eval_gemfile "../Gemfile"

gem "public_suffix", "~> 4.0"
1 change: 0 additions & 1 deletion lib/addressable/idna.rb
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
# frozen_string_literal: true

# encoding:utf-8
#--
# Copyright (C) Bob Aman
#
Expand Down
1 change: 0 additions & 1 deletion lib/addressable/idna/native.rb
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
# frozen_string_literal: true

# encoding:utf-8
#--
# Copyright (C) Bob Aman
#
Expand Down
1 change: 0 additions & 1 deletion lib/addressable/idna/pure.rb
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
# frozen_string_literal: true

# encoding:utf-8
#--
# Copyright (C) Bob Aman
#
Expand Down
1 change: 0 additions & 1 deletion lib/addressable/template.rb
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
# frozen_string_literal: true

# encoding:utf-8
#--
# Copyright (C) Bob Aman
#
Expand Down
1 change: 0 additions & 1 deletion lib/addressable/uri.rb
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
# frozen_string_literal: true

# encoding:utf-8
#--
# Copyright (C) Bob Aman
#
Expand Down
1 change: 0 additions & 1 deletion lib/addressable/version.rb
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
# frozen_string_literal: true

# encoding:utf-8
#--
# Copyright (C) Bob Aman
#
Expand Down
1 change: 0 additions & 1 deletion spec/addressable/idna_spec.rb
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
# frozen_string_literal: true

# coding: utf-8
# Copyright (C) Bob Aman
#
# Licensed under the Apache License, Version 2.0 (the "License");
Expand Down
1 change: 0 additions & 1 deletion spec/addressable/net_http_compat_spec.rb
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
# frozen_string_literal: true

# coding: utf-8
# Copyright (C) Bob Aman
#
# Licensed under the Apache License, Version 2.0 (the "License");
Expand Down
1 change: 0 additions & 1 deletion spec/addressable/security_spec.rb
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
# frozen_string_literal: true

# coding: utf-8
# Copyright (C) Bob Aman
#
# Licensed under the Apache License, Version 2.0 (the "License");
Expand Down
1 change: 0 additions & 1 deletion spec/addressable/template_spec.rb
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
# frozen_string_literal: true

# coding: utf-8
# Copyright (C) Bob Aman
#
# Licensed under the Apache License, Version 2.0 (the "License");
Expand Down
1 change: 0 additions & 1 deletion spec/addressable/uri_spec.rb
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
# frozen_string_literal: true

# coding: utf-8
# Copyright (C) Bob Aman
#
# Licensed under the Apache License, Version 2.0 (the "License");
Expand Down
4 changes: 2 additions & 2 deletions tasks/gem.rake
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,9 @@ namespace :gem do
exit(1)
end

s.required_ruby_version = ">= 2.0"
s.required_ruby_version = ">= 2.2"

s.add_runtime_dependency "public_suffix", ">= 2.0.2", "< 5.0"
s.add_runtime_dependency "public_suffix", ">= 2.0.2", "< 6.0"
s.add_development_dependency "bundler", ">= 1.0", "< 3.0"

s.require_path = "lib"
Expand Down

0 comments on commit fba909e

Please sign in to comment.