-
Notifications
You must be signed in to change notification settings - Fork 0
/
boost_distributions.gemspec
67 lines (56 loc) · 2.73 KB
/
boost_distributions.gemspec
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
# frozen_string_literal: true
require_relative "lib/boost_distributions/version"
Gem::Specification.new do |spec|
spec.name = "boost_distributions"
spec.version = BoostDistributions::VERSION
spec.authors = ["fenrir(M.Naruoka)"]
spec.email = ["fenrir.naru@gmail.com"]
spec.summary = "Interface to boost::math::distributions"
spec.description = "This is a Ruby gem to calculate statistical properties of various distributions by using boost::math::distributions."
spec.homepage = "https://github.com/fenrir-naru/ruby-boost_distributions"
spec.required_ruby_version = ">= 2.6.0"
#spec.metadata["allowed_push_host"] = "TODO: Set to your gem server 'https://example.com'"
spec.metadata["homepage_uri"] = spec.homepage
spec.metadata["source_code_uri"] = spec.homepage
spec.metadata["changelog_uri"] = "https://github.com/fenrir-naru/ruby-boost_distributions/blob/main/CHANGELOG.md"
spec.extensions = ["ext/boost_distributions/extconf.rb"]
# Specify which files should be added to the gem when it is released.
# The `git ls-files -z` loads the files in the RubyGem that have been added into git.
spec.files = Dir.chdir(File.expand_path(__dir__)) do
`git ls-files -z`.split("\x0").reject do |f|
(f == __FILE__) || f.match(%r{\A(?:(?:test|spec|features)/|\.(?:git|travis|circleci)|appveyor)})
end
end
spec.bindir = "exe"
spec.executables = spec.files.grep(%r{\Aexe/}) { |f| File.basename(f) }
spec.require_paths = ["lib"]
spec.files += proc{
require 'pathname'
base_dir = Pathname::new(File::absolute_path(File.dirname(__FILE__)))
# get an array of submodule dirs by executing 'pwd' inside each submodule
`git submodule --quiet foreach pwd`.split($/).collect{|dir|
# issue git ls-files in submodule's directory
`git -C #{dir} ls-files -v`.split($/).collect{|f|
next nil unless f =~ /^H */ # consider git sparse checkout
# get relative path
f = Pathname::new(File::join(dir, $'))
begin
(f.relative? ? f : f.relative_path_from(base_dir)).to_s
rescue
# Patch for Windows drive letter problem
base_dir = Pathname::new(base_dir.to_s.sub(/^([^\/])+:\//){"/#{$1}/"})
f.relative_path_from(base_dir).to_s
end
}.compact
}.flatten
}.call
spec.rdoc_options << '--exclude=ext/ninja-scan-light'
spec.extra_rdoc_files = []
# Uncomment to register a new dependency of your gem
# spec.add_dependency "example-gem", "~> 1.0"
spec.add_development_dependency "rake", "~> 13.0"
spec.add_development_dependency "rake-compiler"
spec.add_development_dependency "rspec", "~> 3.0"
# For more information and examples about making a new gem, check out our
# guide at: https://bundler.io/guides/creating_gem.html
end