-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathgemspec.tpl
49 lines (43 loc) · 1.16 KB
/
gemspec.tpl
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
# frozen_string_literal: true
# vim: ai ts=2 sts=2 et sw=2 ft=ruby
# rubocop:disable all
<?rb
@files = [
'.yardopts',
'README.md',
'bin/*',
'lib/**/*.rb',
'lib/**/version.yml'
].map { |m| Dir.glob(m) }.flatten.keep_if { |f| File.file?(f) }.sort
self.singleton_class.__send__(:define_method, :quote) do |input|
input.to_s.inspect
end
?>
Gem::Specification.new do |s|
s.name = #{quote(@name)}
s.version = #{quote(@version)}
s.date = #{quote(@date)}
s.summary = #{quote(@summary)}
s.description = #{quote(@description)}
s.licenses = #{@licenses}
s.authors = #{@authors}
s.email = #{quote(@email)}
s.homepage = #{quote(@homepage)}
s.required_ruby_version = #{quote(@required_ruby_version)}
s.require_paths = ["lib"]
s.bindir = "bin"
s.executables = [
<?rb for file in @files.dup.keep_if { |fp| /^bin\//.match(fp) }.map { |fp| fp.gsub(/^bin\//, '')} ?>
#{"%s," % quote(file)}
<?rb end ?>
]
s.files = [
<?rb for file in @files ?>
#{"%s," % quote(file)}
<?rb end ?>
]
#{@dependencies.keep(:runtime).to_s.lstrip}
end
# Local Variables:
# mode: ruby
# End: