Remove HashValidator
This commit is contained in:
parent
516c61057b
commit
4dcd5ac47f
@ -6,8 +6,6 @@ require "timeout"
|
||||
require "utils/user"
|
||||
require "cask/artifact/abstract_artifact"
|
||||
require "cask/pkg"
|
||||
require "extend/hash_validator"
|
||||
using HashValidator
|
||||
|
||||
module Cask
|
||||
module Artifact
|
||||
|
||||
@ -3,9 +3,6 @@
|
||||
|
||||
require "cask/artifact/moved"
|
||||
|
||||
require "extend/hash_validator"
|
||||
using HashValidator
|
||||
|
||||
module Cask
|
||||
module Artifact
|
||||
# Generic artifact corresponding to the `artifact` stanza.
|
||||
|
||||
@ -3,9 +3,6 @@
|
||||
|
||||
require "cask/artifact/abstract_artifact"
|
||||
|
||||
require "extend/hash_validator"
|
||||
using HashValidator
|
||||
|
||||
module Cask
|
||||
module Artifact
|
||||
# Artifact corresponding to the `installer` stanza.
|
||||
|
||||
@ -6,9 +6,6 @@ require "plist"
|
||||
require "utils/user"
|
||||
require "cask/artifact/abstract_artifact"
|
||||
|
||||
require "extend/hash_validator"
|
||||
using HashValidator
|
||||
|
||||
module Cask
|
||||
module Artifact
|
||||
# Artifact corresponding to the `pkg` stanza.
|
||||
|
||||
@ -3,9 +3,6 @@
|
||||
|
||||
require "cask/artifact/abstract_artifact"
|
||||
|
||||
require "extend/hash_validator"
|
||||
using HashValidator
|
||||
|
||||
module Cask
|
||||
module Artifact
|
||||
# Superclass for all artifacts which have a source and a target location.
|
||||
|
||||
@ -6,9 +6,6 @@ require "json"
|
||||
require "lazy_object"
|
||||
require "locale"
|
||||
|
||||
require "extend/hash_validator"
|
||||
using HashValidator
|
||||
|
||||
module Cask
|
||||
# Configuration for installing casks.
|
||||
#
|
||||
|
||||
@ -3,9 +3,6 @@
|
||||
|
||||
require "delegate"
|
||||
|
||||
require "extend/hash_validator"
|
||||
using HashValidator
|
||||
|
||||
module Cask
|
||||
class DSL
|
||||
# Class corresponding to the `conflicts_with` stanza.
|
||||
|
||||
@ -1,13 +0,0 @@
|
||||
# typed: false
|
||||
# frozen_string_literal: true
|
||||
|
||||
module HashValidator
|
||||
refine Hash do
|
||||
def assert_valid_keys!(*valid_keys)
|
||||
unknown_keys = keys - valid_keys
|
||||
return if unknown_keys.empty?
|
||||
|
||||
raise ArgumentError, "invalid keys: #{unknown_keys.map(&:inspect).join(", ")}"
|
||||
end
|
||||
end
|
||||
end
|
||||
@ -1,6 +0,0 @@
|
||||
# typed: strict
|
||||
|
||||
class Hash
|
||||
sig { params(valid_keys: T.untyped).void }
|
||||
def assert_valid_keys!(*valid_keys); end
|
||||
end
|
||||
@ -7,7 +7,6 @@ require "shellwords"
|
||||
|
||||
require "extend/io"
|
||||
require "extend/predicable"
|
||||
require "extend/hash_validator"
|
||||
|
||||
require "extend/time"
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user