(PDOC-74) Update gemspec not to rely on metadata

Prior to this commit, the gemspec for strings relied on the module
metadata.json. Since we would ultimately like to stop releasing
strings as a module entirely, update the gemspec not to rely on the
module metadata so it is not broken when we ultimately remove it.
This commit is contained in:
Hailee Kenney 2016-03-15 23:31:31 -07:00
parent 0a4233614d
commit 3e56169d5e
1 changed files with 5 additions and 10 deletions

View File

@ -1,16 +1,11 @@
require 'json'
puppet_metadata = JSON.load File.open(File.expand_path(File.join(__FILE__, '..', 'metadata.json'))).read
Gem::Specification.new do |s|
s.name = 'puppet-strings'
%w(author version license summary).each do |section|
s.send("#{section}=", puppet_metadata[section])
end
s.author = 'Puppet Labs'
s.version = '0.4.0'
s.license = 'Apache-2.0'
s.summary = 'Puppet documentation via YARD'
s.email = 'info@puppetlabs.com'
s.homepage = puppet_metadata['project_page']
s.homepage = 'https://github.com/puppetlabs/puppetlabs-strings'
s.description = s.summary
s.files = Dir['lib/**/*'].reject { |f| f if File.directory?(f) }