ronin.gemspec in ronin-2.0.0 vs ronin.gemspec in ronin-2.0.1
- old
+ new
@@ -1,6 +1,6 @@
-# encoding: utf-8
+# frozen_string_literal: true
require 'yaml'
Gem::Specification.new do |gem|
gemspec = YAML.load_file('gemspec.yml')
@@ -19,21 +19,22 @@
gem.licenses = Array(gemspec['license'])
gem.authors = Array(gemspec['authors'])
gem.email = gemspec['email']
gem.homepage = gemspec['homepage']
- glob = lambda { |patterns| gem.files & Dir[*patterns] }
+ glob = ->(patterns) { gem.files & Dir[*patterns] }
gem.files = `git ls-files`.split($/)
gem.files = glob[gemspec['files']] if gemspec['files']
gem.files += Array(gemspec['generated_files'])
# exclude test files from the packages gem
gem.files -= glob[gemspec['test_files'] || 'spec/{**/}*']
gem.executables = gemspec.fetch('executables') do
glob['bin/*'].map { |path| File.basename(path) }
end
+
gem.default_executable = gem.executables.first if Gem::VERSION < '1.7.'
gem.extensions = glob[gemspec['extensions'] || 'ext/**/extconf.rb']
gem.extra_rdoc_files = glob[gemspec['extra_doc_files'] || '*.{txt,md}']
@@ -44,10 +45,10 @@
gem.requirements = gemspec['requirements']
gem.required_ruby_version = gemspec['required_ruby_version']
gem.required_rubygems_version = gemspec['required_rubygems_version']
gem.post_install_message = gemspec['post_install_message']
- split = lambda { |string| string.split(/,\s*/) }
+ split = ->(string) { string.split(/,\s*/) }
if gemspec['dependencies']
gemspec['dependencies'].each do |name,versions|
gem.add_dependency(name,split[versions])
end