Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 7 additions & 7 deletions .check.rb
Original file line number Diff line number Diff line change
@@ -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
Comment thread
bovi marked this conversation as resolved.
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|
Comment thread
bovi marked this conversation as resolved.
raise "invalid dependencies" unless x.is_a?(String)
end
end

Expand Down
6 changes: 6 additions & 0 deletions .github/linters/.rubocop.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,9 @@ AllCops:

Style/FrozenStringLiteralComment:
Enabled: false

Style/StringLiterals:
EnforcedStyle: double_quotes

Style/StringLiteralsInInterpolation:
Enabled: false
4 changes: 2 additions & 2 deletions Gemfile
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
source 'https://rubygems.org'
source "https://rubygems.org"

gem 'yaml'
gem "yaml"
12 changes: 6 additions & 6 deletions Rakefile
Original file line number Diff line number Diff line change
@@ -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