Skip to content

Commit

Permalink
Rubocop format
Browse files Browse the repository at this point in the history
  • Loading branch information
jbampton committed Jun 23, 2021
1 parent e638271 commit 80d49e9
Showing 1 changed file with 8 additions and 5 deletions.
13 changes: 8 additions & 5 deletions .check.rb
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,14 @@
Dir.glob("#{File.dirname __FILE__}/*.gem") do |f|
print "checking #{f}\n"
tree = YAML.parse_file(f).transform
raise "invalid YAML" unless tree["name"] && tree["description"] && tree["author"] && tree["website"] && tree["repository"]
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.kind_of?(String)
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']

tree['dependencies'].to_a.each do |x|
raise 'invalid dependencies' unless x.is_a?(String)
end
end

Expand Down

0 comments on commit 80d49e9

Please sign in to comment.