Debian Codegraph @

lib/net/http/net-http.gemspec

raw
1 # frozen_string_literal: true
2
3 name = File.basename(__FILE__, ".gemspec")
4 version = ["lib", Array.new(name.count("-")+1, "..").join("/")].find do |dir|
5 file = File.join(__dir__, dir, "#{name.tr('-', '/')}.rb")
6 begin
7 break File.foreach(file, mode: "rb") do |line|
8 /^\s*VERSION\s*=\s*"(.*)"/ =~ line and break $1
9 end
10 rescue SystemCallError
11 next
12 end
13 end
14
15 Gem::Specification.new do |spec|
16 spec.name = name
17 spec.version = version
18 spec.authors = ["NARUSE, Yui"]
19 spec.email = ["[email protected]"]
20
21 spec.summary = %q{HTTP client api for Ruby.}
22 spec.description = %q{HTTP client api for Ruby.}
23 spec.homepage = "https://github.com/ruby/net-http"
24 spec.required_ruby_version = Gem::Requirement.new(">= 2.6.0")
25 spec.licenses = ["Ruby", "BSD-2-Clause"]
26
27 spec.metadata["homepage_uri"] = spec.homepage
28 spec.metadata["source_code_uri"] = spec.homepage
29
30 # Specify which files should be added to the gem when it is released.
31 # The `git ls-files -z` loads the files in the RubyGem that have been added into git.
32 spec.files = Dir.chdir(File.expand_path('..', __FILE__)) do
33 `git ls-files -z 2>#{IO::NULL}`.split("\x0").reject { |f| f.match(%r{\A(?:(?:test|spec|features)/|\.git)}) }
34 end
35 spec.bindir = "exe"
36 spec.require_paths = ["lib"]
37
38 spec.add_dependency "uri"
39 end