Skip to content

Commit a6aa123

Browse files
committed
Update gemspec
1 parent 2cd6eb7 commit a6aa123

1 file changed

Lines changed: 24 additions & 14 deletions

File tree

http-form_data.gemspec

Lines changed: 24 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,28 +1,38 @@
11
# frozen_string_literal: true
22

3-
lib = File.expand_path("lib", __dir__)
4-
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
5-
require "http/form_data/version"
3+
require_relative "lib/http/form_data/version"
64

75
Gem::Specification.new do |spec|
86
spec.name = "http-form_data"
97
spec.version = HTTP::FormData::VERSION
10-
spec.homepage = "https://github.com/httprb/form_data.rb"
118
spec.authors = ["Aleksey V Zapparov"]
129
spec.email = ["ixti@member.fsf.org"]
10+
11+
spec.summary = "Build form data request bodies"
12+
spec.homepage = "https://github.com/httprb/form_data"
1313
spec.license = "MIT"
14-
spec.summary = "http-form_data-#{HTTP::FormData::VERSION}"
15-
spec.description = <<-DESC.gsub(/^\s+> /m, "").tr("\n", " ").strip
16-
> Utility-belt to build form data request bodies.
17-
> Provides support for `application/x-www-form-urlencoded` and
18-
> `multipart/form-data` types.
19-
DESC
20-
21-
spec.metadata["changelog_uri"] = "https://github.com/httprb/form_data/blob/master/CHANGES.md"
14+
15+
spec.description = <<~DESCRIPTION.strip.gsub(/\s+/, " ")
16+
Utility-belt to build form data request bodies.
17+
Provides support for `application/x-www-form-urlencoded` and
18+
`multipart/form-data` types.
19+
DESCRIPTION
20+
21+
spec.metadata["homepage_uri"] = spec.homepage
22+
spec.metadata["source_code_uri"] = "#{spec.homepage}/tree/v#{spec.version}"
23+
spec.metadata["bug_tracker_uri"] = "#{spec.homepage}/issues"
24+
spec.metadata["changelog_uri"] = "#{spec.homepage}/blob/v#{spec.version}/CHANGES.md"
25+
spec.metadata["documentation_uri"] = "https://www.rubydoc.info/gems/http-form_data/#{spec.version}"
2226
spec.metadata["rubygems_mfa_required"] = "true"
2327

24-
spec.files = `git ls-files -z`.split("\x0")
25-
spec.executables = spec.files.grep(%r{^bin/}).map { |f| File.basename(f) }
28+
spec.files = IO.popen(%w[git ls-files -z], chdir: __dir__, err: IO::NULL) do |ls|
29+
extras = %w[CHANGES.md LICENSE.txt README.md] << File.basename(__FILE__)
30+
31+
ls.readlines("\x0", chomp: true).select do |f|
32+
f.start_with?("lib/", "sig/") || extras.include?(f)
33+
end
34+
end
35+
2636
spec.require_paths = ["lib"]
2737

2838
spec.required_ruby_version = ">= 3.2"

0 commit comments

Comments
 (0)