CDLUC3/datacite-mapping

View on GitHub
datacite-mapping.gemspec

Summary

Maintainability
Test Coverage
# frozen_string_literal: true

lib = File.expand_path('lib', __dir__)
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)

require 'uri'
require 'datacite/mapping/module_info'

Gem::Specification.new do |spec|
  spec.name          = Datacite::Mapping::NAME
  spec.version       = Datacite::Mapping::VERSION
  spec.authors       = ['David Moles']
  spec.email         = ['david.moles@ucop.edu']
  spec.summary       = 'Parses and generates Datacite XML documents'
  spec.description   = 'A gem for working with the Datacite XML format'
  spec.license       = 'MIT'

  origin = `git config --get remote.origin.url`.chomp
  origin_uri = origin.start_with?('http') ? URI(origin) : URI(origin.gsub(%r{git@([^:]+)(.com|.org)[^/]+}, 'http://\1\2'))
  spec.homepage = URI::HTTP.build(host: origin_uri.host, path: origin_uri.path.chomp('.git')).to_s

  spec.required_ruby_version = '>= 3.0.0'

  spec.files         = `git ls-files -z`.split("\x0")
  spec.executables   = spec.files.grep(%r{^bin/}) { |f| File.basename(f) }

  spec.test_files    = spec.files.grep(%r{^(test|spec|features)/})
  spec.require_paths = ['lib']

  spec.add_dependency 'typesafe_enum', '~> 0.1', '>= 0.1.7'
  spec.add_dependency 'xml-mapping_extensions', '~> 0.4', '>= 0.4.7'

  spec.add_development_dependency 'bundler', '>= 2.2.33'
  spec.add_development_dependency 'equivalent-xml', '~> 0.6.0'
  spec.add_development_dependency 'github-markup', '~> 1.4'
  spec.add_development_dependency 'rake', '>= 12.3.3'
  spec.add_development_dependency 'redcarpet', '~> 3.3'
  spec.add_development_dependency 'rspec', '~> 3.2'
  spec.add_development_dependency 'rubocop', '~> 0.52'
  spec.add_development_dependency 'simplecov', '~> 0.9.2'
  spec.add_development_dependency 'simplecov-console', '~> 0.2.0'
  spec.add_development_dependency 'yard', '~> 0.9'
end