| 1 |
# -*- encoding: utf-8 -*- |
| 2 |
# frozen_string_literal: true |
| 3 |
|
| 4 |
version_module = Module.new do |
| 5 |
version_rb = File.join(__dir__, "lib/psych/versions.rb") |
| 6 |
module_eval(File.read(version_rb), version_rb) |
| 7 |
end |
| 8 |
|
| 9 |
Gem::Specification.new do |s| |
| 10 |
s.name = "psych" |
| 11 |
s.version = version_module::Psych::VERSION |
| 12 |
s.authors = ["Aaron Patterson", "SHIBATA Hiroshi", "Charles Oliver Nutter"] |
| 13 |
s.email = ["[email protected]", "[email protected]", "[email protected]"] |
| 14 |
s.summary = "Psych is a YAML parser and emitter" |
| 15 |
s.description = <<-DESCRIPTION |
| 16 |
Psych is a YAML parser and emitter. Psych leverages libyaml[https://pyyaml.org/wiki/LibYAML] |
| 17 |
for its YAML parsing and emitting capabilities. In addition to wrapping libyaml, |
| 18 |
Psych also knows how to serialize and de-serialize most Ruby objects to and from the YAML format. |
| 19 |
DESCRIPTION |
| 20 |
s.homepage = "https://github.com/ruby/psych" |
| 21 |
s.licenses = ["MIT"] |
| 22 |
s.require_paths = ["lib"] |
| 23 |
|
| 24 |
# for ruby core repository. |
| 25 |
# It was generated by |
| 26 |
# `git ls-files -z`.split("\x0").reject { |f| |
| 27 |
# f.match(%r{^\.git|^(test|spec|features|bin|tool)/|^[A-Z]\w+file$|/extlibs$|\.(gemspec|java)$|jar}) |
| 28 |
# } |
| 29 |
s.files = [ |
| 30 |
"CONTRIBUTING.md", "LICENSE", "README.md", "ext/psych/depend", |
| 31 |
"ext/psych/extconf.rb", "ext/psych/psych.c", "ext/psych/psych.h", |
| 32 |
"ext/psych/psych_emitter.c", "ext/psych/psych_emitter.h", |
| 33 |
"ext/psych/psych_parser.c", "ext/psych/psych_parser.h", |
| 34 |
"ext/psych/psych_to_ruby.c", "ext/psych/psych_to_ruby.h", |
| 35 |
"ext/psych/psych_yaml_tree.c", "ext/psych/psych_yaml_tree.h", |
| 36 |
"lib/psych.rb", "lib/psych/class_loader.rb", "lib/psych/coder.rb", |
| 37 |
"lib/psych/core_ext.rb", "lib/psych/exception.rb", "lib/psych/handler.rb", |
| 38 |
"lib/psych/handlers/document_stream.rb", "lib/psych/handlers/recorder.rb", |
| 39 |
"lib/psych/json/ruby_events.rb", "lib/psych/json/stream.rb", |
| 40 |
"lib/psych/json/tree_builder.rb", "lib/psych/json/yaml_events.rb", |
| 41 |
"lib/psych/nodes.rb", "lib/psych/nodes/alias.rb", |
| 42 |
"lib/psych/nodes/document.rb", "lib/psych/nodes/mapping.rb", |
| 43 |
"lib/psych/nodes/node.rb", "lib/psych/nodes/scalar.rb", |
| 44 |
"lib/psych/nodes/sequence.rb", "lib/psych/nodes/stream.rb", |
| 45 |
"lib/psych/omap.rb", "lib/psych/parser.rb", "lib/psych/scalar_scanner.rb", |
| 46 |
"lib/psych/set.rb", "lib/psych/stream.rb", "lib/psych/streaming.rb", |
| 47 |
"lib/psych/syntax_error.rb", "lib/psych/tree_builder.rb", |
| 48 |
"lib/psych/versions.rb", "lib/psych/visitors.rb", |
| 49 |
"lib/psych/visitors/depth_first.rb", "lib/psych/visitors/emitter.rb", |
| 50 |
"lib/psych/visitors/json_tree.rb", "lib/psych/visitors/to_ruby.rb", |
| 51 |
"lib/psych/visitors/visitor.rb", "lib/psych/visitors/yaml_tree.rb", |
| 52 |
"lib/psych/y.rb" |
| 53 |
] |
| 54 |
|
| 55 |
s.rdoc_options = ["--main", "README.md"] |
| 56 |
s.extra_rdoc_files = ["README.md"] |
| 57 |
|
| 58 |
s.required_ruby_version = Gem::Requirement.new(">= 2.5.0") |
| 59 |
s.required_rubygems_version = Gem::Requirement.new(">= 0") |
| 60 |
|
| 61 |
if RUBY_ENGINE == 'jruby' |
| 62 |
s.platform = 'java' |
| 63 |
s.files.concat [ |
| 64 |
"ext/java/org/jruby/ext/psych/PsychEmitter.java", |
| 65 |
"ext/java/org/jruby/ext/psych/PsychLibrary.java", |
| 66 |
"ext/java/org/jruby/ext/psych/PsychParser.java", |
| 67 |
"ext/java/org/jruby/ext/psych/PsychToRuby.java", |
| 68 |
"lib/psych_jars.rb", |
| 69 |
"lib/psych.jar" |
| 70 |
] |
| 71 |
s.requirements = "jar org.snakeyaml:snakeyaml-engine, #{version_module::Psych::DEFAULT_SNAKEYAML_VERSION}" |
| 72 |
s.add_dependency 'jar-dependencies', '>= 0.1.7' |
| 73 |
else |
| 74 |
s.extensions = ["ext/psych/extconf.rb"] |
| 75 |
s.add_dependency 'stringio' |
| 76 |
end |
| 77 |
|
| 78 |
s.metadata['msys2_mingw_dependencies'] = 'libyaml' |
| 79 |
|
| 80 |
end |