Skip to content

Commit

Permalink
Restyled by standardrb
Browse files Browse the repository at this point in the history
  • Loading branch information
restyled-commits authored and pbrisbin committed Jan 22, 2024
1 parent a5ea1b6 commit f166ff9
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions lib/dd_validate.rb
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ def initialize
@names = ["http://json-schema.org/draft-07/schema#"]
end

JSON::Validator.register_validator(self.new)
JSON::Validator.register_validator(new)
end

module DDValidate
Expand All @@ -22,10 +22,10 @@ def self.call(version)
res = Net::HTTP.get_response(uri)

unless res.is_a?(Net::HTTPSuccess)
$stderr.puts "Unable to fetch DataDog schema for service-catalog"
$stderr.puts "URI: #{uri}"
$stderr.puts "Response: #{res}"
$stderr.puts "Your schema-version may be invalid"
warn "Unable to fetch DataDog schema for service-catalog"
warn "URI: #{uri}"
warn "Response: #{res}"
warn "Your schema-version may be invalid"
exit 1
end

Expand All @@ -36,7 +36,7 @@ def self.call(version)
class DDService
def self.load(path, schema_fetcher = FetchDDSchema)
YAML.load_stream(File.read(path)).map do |definition|
self.new(definition, schema_fetcher)
new(definition, schema_fetcher)
end
end

Expand Down

0 comments on commit f166ff9

Please sign in to comment.