diff --git a/.check.rb b/.check.rb index edfbace..ffd63ff 100755 --- a/.check.rb +++ b/.check.rb @@ -1,18 +1,18 @@ #!/usr/bin/env ruby -require 'yaml' +require "yaml" Dir.glob("#{File.dirname __FILE__}/*.gem") do |f| print "checking #{f}\n" tree = YAML.parse_file(f).transform - unless tree['name'] && tree['description'] && tree['author'] && tree['website'] && tree['repository'] - raise 'invalid YAML' + unless tree["name"] && tree["description"] && tree["author"] && tree["website"] && tree["repository"] + raise "invalid YAML" end - raise 'invalid protocol' unless ['git'].include? tree['protocol'] # TODO - raise 'no license' unless tree['license'] + raise "invalid protocol" unless ["git"].include? tree["protocol"] # TODO + raise "no license" unless tree["license"] - tree['dependencies'].to_a.each do |x| - raise 'invalid dependencies' unless x.is_a?(String) + tree["dependencies"].to_a.each do |x| + raise "invalid dependencies" unless x.is_a?(String) end end diff --git a/.github/linters/.rubocop.yml b/.github/linters/.rubocop.yml index 9eccfb8..719d95b 100644 --- a/.github/linters/.rubocop.yml +++ b/.github/linters/.rubocop.yml @@ -4,3 +4,9 @@ AllCops: Style/FrozenStringLiteralComment: Enabled: false + +Style/StringLiterals: + EnforcedStyle: double_quotes + +Style/StringLiteralsInInterpolation: + Enabled: false diff --git a/Gemfile b/Gemfile index 2af88db..d9736ca 100644 --- a/Gemfile +++ b/Gemfile @@ -1,3 +1,3 @@ -source 'https://rubygems.org' +source "https://rubygems.org" -gem 'yaml' +gem "yaml" diff --git a/Rakefile b/Rakefile index b857edc..7663d6a 100644 --- a/Rakefile +++ b/Rakefile @@ -1,14 +1,14 @@ -desc 'run all pre-commit hooks against all files' +desc "run all pre-commit hooks against all files" task :check do - sh 'pre-commit run --all-files' + sh "pre-commit run --all-files" end -desc 'install the pre-commit hooks' +desc "install the pre-commit hooks" task :checkinstall do - sh 'pre-commit install' + sh "pre-commit install" end -desc 'check the pre-commit hooks for updates' +desc "check the pre-commit hooks for updates" task :checkupdate do - sh 'pre-commit autoupdate' + sh "pre-commit autoupdate" end