From 8638257b6a1b96c7bcfa4d5ee49ef8e44e197a1e Mon Sep 17 00:00:00 2001 From: Lamont Granquist Date: Tue, 15 Jan 2019 12:55:27 -0800 Subject: [PATCH] chefstyle myself Signed-off-by: Lamont Granquist --- bin/chefstyle | 4 ++-- chefstyle.gemspec | 8 ++++---- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/bin/chefstyle b/bin/chefstyle index 2064004..f22fa4e 100755 --- a/bin/chefstyle +++ b/bin/chefstyle @@ -1,11 +1,11 @@ #!/usr/bin/env ruby # -*- encoding: utf-8 -*- -$LOAD_PATH.unshift File.join(File.dirname(__FILE__), %w[.. lib]) +$LOAD_PATH.unshift File.join(File.dirname(__FILE__), %w{.. lib}) require "chefstyle" -if ARGV.size == 1 && %w[-v --version].include?(ARGV.first) +if ARGV.size == 1 && %w{-v --version}.include?(ARGV.first) puts "Chefstyle #{Chefstyle::VERSION}" print " * RuboCop " end diff --git a/chefstyle.gemspec b/chefstyle.gemspec index ba6bdc7..60f5f0b 100644 --- a/chefstyle.gemspec +++ b/chefstyle.gemspec @@ -1,7 +1,7 @@ # coding: utf-8 -lib = File.expand_path('../lib', __FILE__) +lib = File.expand_path("../lib", __FILE__) $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib) -require 'chefstyle/version' +require "chefstyle/version" Gem::Specification.new do |spec| spec.name = "chefstyle" @@ -14,8 +14,8 @@ Gem::Specification.new do |spec| spec.license = "Apache-2.0" spec.required_ruby_version = ">= 2.2" - spec.files = %w{LICENSE chefstyle.gemspec Gemfile} + Dir.glob("{bin,config,lib}/**/*", File::FNM_DOTMATCH).reject { |f| File.directory?(f) } - spec.executables = %w[chefstyle] + spec.files = %w{LICENSE chefstyle.gemspec Gemfile} + Dir.glob("{bin,config,lib}/**/*", File::FNM_DOTMATCH).reject { |f| File.directory?(f) } + spec.executables = %w{chefstyle} spec.require_paths = ["lib"] spec.add_development_dependency "bundler"