Debian Codegraph @

ext/strscan/strscan.gemspec

raw
1 # frozen_string_literal: true
2 #
3 source_version = ["", "ext/strscan/"].find do |dir|
4 begin
5 break File.open(File.join(__dir__, "#{dir}strscan.c")) {|f|
6 f.gets("\n#define STRSCAN_VERSION ")
7 f.gets[/\s*"(.+)"/, 1]
8 }
9 rescue Errno::ENOENT
10 end
11 end
12
13 Gem::Specification.new do |s|
14 s.name = "strscan"
15 s.version = source_version
16 s.summary = "Provides lexical scanning operations on a String."
17 s.description = "Provides lexical scanning operations on a String."
18
19 files = [
20 "COPYING",
21 "LICENSE.txt",
22 ]
23 if RUBY_ENGINE == "jruby"
24 s.require_paths = %w{ext/jruby/lib lib}
25 files << "ext/jruby/lib/strscan.rb"
26 files << "lib/strscan.jar"
27 s.platform = "java"
28 else
29 s.require_paths = %w{lib}
30 files << "ext/strscan/extconf.rb"
31 files << "ext/strscan/strscan.c"
32 s.extensions = %w{ext/strscan/extconf.rb}
33 end
34 s.files = files
35 s.required_ruby_version = ">= 2.4.0"
36
37 s.authors = ["Minero Aoki", "Sutou Kouhei", "Charles Oliver Nutter"]
38 s.email = [nil, "[email protected]", "[email protected]"]
39 s.homepage = "https://github.com/ruby/strscan"
40 s.licenses = ["Ruby", "BSD-2-Clause"]
41 end