-
-
Notifications
You must be signed in to change notification settings - Fork 122
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- 1 bug fix: - Added a definition of `MIME::Type#hash`. Contributed by Alex Vondrak in [#167][], fixing [#166][]. - Dependency and CI updates: - Update the .github/workflows/ci.yml workflow to test Ruby 3.2 and more reliably test certain combinations rather than depending on exclusions. - Change `.standard.yml` configuration to format for Ruby 2.3 as certain files are not properly detected with Ruby 2.0. - Change from `hoe-git` to `hoe-git2` to support Hoe version 4. - Apply `standardrb --fix`. - The above changes have resulted in the soft deprecation of Ruby versions below 2.6. Any errors reported for Ruby versions 2.0, 2.1, 2.2, 2.3, 2.4, and 2.5 will be resolved, but maintaining CI for these versions is unsustainable. [#166]: #166 [#167]: #167
- Loading branch information
1 parent
b9382fe
commit 3ec2230
Showing
7 changed files
with
52 additions
and
98 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,13 @@ | ||
*.swp | ||
*~ | ||
*.gem | ||
.byebug_history | ||
.rake_tasks~ | ||
.source_index | ||
.vagrant | ||
Gemfile.lock | ||
Vagrantfile | ||
coverage | ||
doc | ||
html | ||
pkg | ||
publish | ||
coverage.info | ||
coverage/ | ||
doc/ | ||
html/ | ||
pkg/ | ||
publish/ | ||
test/cache.tst | ||
tmp/ | ||
.byebug_history | ||
tags |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,60 +1,26 @@ | ||
# frozen_string_literal: true | ||
|
||
require "rubygems" | ||
require "hoe" | ||
require "rake/clean" | ||
|
||
# This is required until https://github.com/seattlerb/hoe/issues/112 is fixed | ||
class Hoe | ||
def with_config | ||
config = Hoe::DEFAULT_CONFIG | ||
|
||
rc = File.expand_path("~/.hoerc") | ||
homeconfig = load_config(rc) | ||
config = config.merge(homeconfig) | ||
|
||
localconfig = load_config(File.expand_path(File.join(Dir.pwd, ".hoerc"))) | ||
config = config.merge(localconfig) | ||
|
||
yield config, rc | ||
end | ||
|
||
def load_config(name) | ||
File.exist?(name) ? safe_load_yaml(name) : {} | ||
end | ||
|
||
def safe_load_yaml(name) | ||
return safe_load_yaml_file(name) if YAML.respond_to?(:safe_load_file) | ||
|
||
data = IO.binread(name) | ||
YAML.safe_load(data, permitted_classes: [Regexp]) | ||
rescue | ||
YAML.safe_load(data, [Regexp]) | ||
end | ||
|
||
def safe_load_yaml_file(name) | ||
YAML.safe_load_file(name, permitted_classes: [Regexp]) | ||
rescue | ||
YAML.safe_load_file(name, [Regexp]) | ||
end | ||
end | ||
|
||
Hoe.plugin :cov | ||
Hoe.plugin :doofus | ||
Hoe.plugin :gemspec2 | ||
Hoe.plugin :git | ||
Hoe.plugin :git2 | ||
Hoe.plugin :minitest | ||
Hoe.plugin :email unless ENV["CI"] | ||
Hoe.plugin :rubygems | ||
|
||
spec = Hoe.spec "mime-types" do | ||
developer("Austin Ziegler", "[email protected]") | ||
|
||
require_ruby_version ">= 2.0" | ||
|
||
self.history_file = "History.md" | ||
self.readme_file = "README.rdoc" | ||
|
||
license "MIT" | ||
|
||
require_ruby_version ">= 2.0" | ||
|
||
spec_extras[:metadata] = ->(val) { val["rubygems_mfa_required"] = "true" } | ||
|
||
extra_deps << ["mime-types-data", "~> 3.2015"] | ||
|
||
extra_dev_deps << ["hoe", ">= 3.0", "< 5"] | ||
|
@@ -69,10 +35,6 @@ spec = Hoe.spec "mime-types" do | |
extra_dev_deps << ["minitest-hooks", "~> 1.4"] | ||
extra_dev_deps << ["rake", ">= 10.0", "< 14.0"] | ||
extra_dev_deps << ["standard", "~> 1.0"] | ||
|
||
if Gem::Version.new(RUBY_VERSION) >= Gem::Version.new("2.0") | ||
extra_dev_deps << ["simplecov", "~> 0.7"] | ||
end | ||
end | ||
|
||
namespace :benchmark do | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,15 @@ | ||
# -*- encoding: utf-8 -*- | ||
# stub: mime-types 3.4.1 ruby lib | ||
# stub: mime-types 3.4.2 ruby lib | ||
|
||
Gem::Specification.new do |s| | ||
s.name = "mime-types".freeze | ||
s.version = "3.4.1" | ||
s.version = "3.4.2" | ||
|
||
s.required_rubygems_version = Gem::Requirement.new(">= 0".freeze) if s.respond_to? :required_rubygems_version= | ||
s.metadata = { "bug_tracker_uri" => "https://github.com/mime-types/ruby-mime-types/issues", "changelog_uri" => "https://github.com/mime-types/ruby-mime-types/blob/master/History.md", "homepage_uri" => "https://github.com/mime-types/ruby-mime-types/", "source_code_uri" => "https://github.com/mime-types/ruby-mime-types/" } if s.respond_to? :metadata= | ||
s.metadata = { "bug_tracker_uri" => "https://github.com/mime-types/ruby-mime-types/issues", "changelog_uri" => "https://github.com/mime-types/ruby-mime-types/blob/master/History.md", "homepage_uri" => "https://github.com/mime-types/ruby-mime-types/", "rubygems_mfa_required" => "true", "source_code_uri" => "https://github.com/mime-types/ruby-mime-types/" } if s.respond_to? :metadata= | ||
s.require_paths = ["lib".freeze] | ||
s.authors = ["Austin Ziegler".freeze] | ||
s.date = "2023-02-17" | ||
s.date = "2023-08-07" | ||
s.description = "The mime-types library provides a library and registry for information about\nMIME content type definitions. It can be used to determine defined filename\nextensions for MIME types, or to use filename extensions to look up the likely\nMIME type definitions.\n\nVersion 3.0 is a major release that requires Ruby 2.0 compatibility and removes\ndeprecated functions. The columnar registry format introduced in 2.6 has been\nmade the primary format; the registry data has been extracted from this library\nand put into {mime-types-data}[https://github.com/mime-types/mime-types-data].\nAdditionally, mime-types is now licensed exclusively under the MIT licence and\nthere is a code of conduct in effect. There are a number of other smaller\nchanges described in the History file.".freeze | ||
s.email = ["[email protected]".freeze] | ||
s.extra_rdoc_files = ["Code-of-Conduct.md".freeze, "Contributing.md".freeze, "History.md".freeze, "Licence.md".freeze, "Manifest.txt".freeze, "README.rdoc".freeze] | ||
|
@@ -18,13 +18,13 @@ Gem::Specification.new do |s| | |
s.licenses = ["MIT".freeze] | ||
s.rdoc_options = ["--main".freeze, "README.rdoc".freeze] | ||
s.required_ruby_version = Gem::Requirement.new(">= 2.0".freeze) | ||
s.rubygems_version = "3.4.7".freeze | ||
s.rubygems_version = "3.4.10".freeze | ||
s.summary = "The mime-types library provides a library and registry for information about MIME content type definitions".freeze | ||
|
||
s.specification_version = 4 | ||
|
||
s.add_runtime_dependency(%q<mime-types-data>.freeze, ["~> 3.2015"]) | ||
s.add_development_dependency(%q<minitest>.freeze, ["~> 5.17"]) | ||
s.add_development_dependency(%q<minitest>.freeze, ["~> 5.19"]) | ||
s.add_development_dependency(%q<hoe>.freeze, [">= 3.0", "< 5"]) | ||
s.add_development_dependency(%q<hoe-doofus>.freeze, ["~> 1.0"]) | ||
s.add_development_dependency(%q<hoe-gemspec2>.freeze, ["~> 1.1"]) | ||
|
@@ -36,6 +36,6 @@ Gem::Specification.new do |s| | |
s.add_development_dependency(%q<minitest-hooks>.freeze, ["~> 1.4"]) | ||
s.add_development_dependency(%q<rake>.freeze, [">= 10.0", "< 14.0"]) | ||
s.add_development_dependency(%q<standard>.freeze, ["~> 1.0"]) | ||
s.add_development_dependency(%q<simplecov>.freeze, ["~> 0.7"]) | ||
s.add_development_dependency(%q<rdoc>.freeze, [">= 4.0", "< 7"]) | ||
s.add_development_dependency(%q<simplecov>.freeze, ["~> 0.21"]) | ||
end |