Class: Gemkeeper::ManifestValidator
- Inherits:
-
Object
- Object
- Gemkeeper::ManifestValidator
- Defined in:
- lib/gemkeeper/manifest_validator.rb
Overview
Validates a manifest file structurally and, optionally, by probing git remotes.
Constant Summary collapse
- VALID_GIT_URL =
%r{\A(git@|https?://|ssh://)}- VALID_HTTP_URL =
%r{\Ahttps?://}- RESOLVE_TIMEOUT =
5
Instance Method Summary collapse
-
#initialize(path) ⇒ ManifestValidator
constructor
A new instance of ManifestValidator.
- #validate(resolve: false, output: $stdout) ⇒ Object
Constructor Details
#initialize(path) ⇒ ManifestValidator
Returns a new instance of ManifestValidator.
14 15 16 |
# File 'lib/gemkeeper/manifest_validator.rb', line 14 def initialize(path) @path = path end |
Instance Method Details
#validate(resolve: false, output: $stdout) ⇒ Object
18 19 20 21 22 23 |
# File 'lib/gemkeeper/manifest_validator.rb', line 18 def validate(resolve: false, output: $stdout) errors = static_errors return errors if errors.any? errors + (resolve ? resolve_errors(output) : []) end |