Sha256: fb52ec5c6a877bd4a782c08156b0cd18c4647d5dd62dff4618ede0b1bb345d8c

Contents?: true

Size: 1.66 KB

Versions: 12

Compression:

Stored size: 1.66 KB

Contents

version = File.foreach(File.join(__dir__, "lib/json/version.rb")) do |line|
  /^\s*VERSION\s*=\s*'(.*)'/ =~ line and break $1
end rescue nil

spec = Gem::Specification.new do |s|
  java_ext = Gem::Platform === s.platform && s.platform =~ 'java' || RUBY_ENGINE == 'jruby'

  s.name = "json"
  s.version = version

  s.summary = "JSON Implementation for Ruby"
  s.homepage = "https://ruby.github.io/json"
  s.metadata = {
    'bug_tracker_uri'   => 'https://github.com/ruby/json/issues',
    'changelog_uri'     => 'https://github.com/ruby/json/blob/master/CHANGES.md',
    'documentation_uri' => 'https://ruby.github.io/json/doc/index.html',
    'homepage_uri'      => s.homepage,
    'source_code_uri'   => 'https://github.com/ruby/json',
    'wiki_uri'          => 'https://github.com/ruby/json/wiki'
  }

  s.required_ruby_version = Gem::Requirement.new(">= 2.3")

  if java_ext
    s.description = "A JSON implementation as a JRuby extension."
    s.author = "Daniel Luz"
    s.email = "dev+ruby@mernen.com"
  else
    s.description = "This is a JSON implementation as a Ruby extension in C."
    s.authors = ["Florian Frank"]
    s.email = "flori@ping.de"
  end

  s.licenses = ["Ruby"]

  s.extra_rdoc_files = ["README.md"]
  s.rdoc_options = ["--title", "JSON implementation for Ruby", "--main", "README.md"]

  s.files = [
    "CHANGES.md",
    "COPYING",
    "BSDL",
    "LEGAL",
    "README.md",
    "json.gemspec",
    *Dir["lib/**/*.rb"],
  ]

  if java_ext
    s.platform = 'java'
  else
    s.extensions = Dir["ext/json/**/extconf.rb"]
    s.files += Dir["ext/json/**/*.{c,h,rl}"]
  end
end

if RUBY_ENGINE == 'jruby' && $0 == __FILE__
  Gem::Builder.new(spec).build
else
  spec
end

Version data entries

12 entries across 12 versions & 1 rubygems

Version Path
json-2.7.6-java json.gemspec
json-2.7.6 json.gemspec
json-2.7.5 json.gemspec
json-2.7.5-java json.gemspec
json-2.7.4-java json.gemspec
json-2.7.4 json.gemspec
json-2.7.4.rc2 json.gemspec
json-2.7.4.rc1 json.gemspec
json-2.7.3-java json.gemspec
json-2.7.3 json.gemspec
json-2.7.3.rc1-java json.gemspec
json-2.7.3.rc1 json.gemspec