From 51990ce639aced8eff143bbd40c967ab6303e7f0 Mon Sep 17 00:00:00 2001 From: Braiden Vasco Date: Thu, 20 Jul 2017 21:22:37 +0000 Subject: [PATCH] Unify gemspec style --- lita-tox.gemspec | 46 +++++++++++++++++++++++++--------------------- 1 file changed, 25 insertions(+), 21 deletions(-) diff --git a/lita-tox.gemspec b/lita-tox.gemspec index 586eeb1..55f985d 100644 --- a/lita-tox.gemspec +++ b/lita-tox.gemspec @@ -1,38 +1,42 @@ # coding: utf-8 # frozen_string_literal: true -Gem::Specification.new do |spec| - spec.name = 'lita-tox' - spec.version = '0.3.0' - spec.authors = ['Braiden Vasco'] - spec.email = ['braiden-vasco@users.noreply.github.com'] +lib = File.expand_path('lib', __dir__).freeze +$LOAD_PATH.unshift lib unless $LOAD_PATH.include? lib - spec.summary = 'Tox adapter for the Lita chat bot' - spec.description = 'Tox adapter for the Lita chat bot.' - spec.homepage = 'https://github.com/toxon/lita-tox' - spec.license = 'GPL-3.0' +Gem::Specification.new do |spec| + spec.name = 'lita-tox' + spec.version = '0.3.0' + spec.license = 'GPL-3.0' + spec.homepage = 'https://github.com/toxon/lita-tox' + spec.summary = 'Tox adapter for the Lita chat bot' + spec.platform = Gem::Platform::RUBY + + spec.authors = ['Braiden Vasco'] + spec.email = %w[braiden-vasco@users.noreply.github.com] spec.required_ruby_version = '~> 2.3' + spec.description = 'Tox adapter for the Lita chat bot.' + spec.metadata['lita_plugin_type'] = 'adapter' spec.files = `git ls-files -z`.split("\x0").reject do |f| - f.match(%r{^(test|spec|features)/}) + f.match %r{^(test|spec|features)/} end - spec.bindir = 'exe' - spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) } - spec.require_paths = ['lib'] + spec.bindir = 'exe' + spec.executables = spec.files.grep %r{^exe/}, &File.method(:basename) - spec.add_development_dependency 'bundler', '~> 1.7' - spec.add_development_dependency 'rake', '~> 10.0' - spec.add_development_dependency 'rubocop', '~> 0.31' - spec.add_development_dependency 'rspec', '~> 3.3' - spec.add_development_dependency 'simplecov', '~> 0.10' - spec.add_development_dependency 'yard', '~> 0.8' - spec.add_development_dependency 'redcarpet', '~> 3.3' + spec.add_development_dependency 'bundler', '~> 1.7' + spec.add_development_dependency 'rake', '~> 10.0' + spec.add_development_dependency 'rubocop', '~> 0.31' + spec.add_development_dependency 'rspec', '~> 3.3' + spec.add_development_dependency 'simplecov', '~> 0.10' + spec.add_development_dependency 'yard', '~> 0.8' + spec.add_development_dependency 'redcarpet', '~> 3.3' spec.add_development_dependency 'github_changelog_generator', '~> 1.6' - spec.add_development_dependency 'pry', '~> 0.10' + spec.add_development_dependency 'pry', '~> 0.10' spec.add_runtime_dependency 'lita', '~> 4.7' spec.add_runtime_dependency 'tox', '~> 0.0.1'