Module: Cliver
- Extended by:
- Cliver
- Included in:
- Cliver
- Defined in:
- lib/cliver.rb,
lib/cliver/which.rb,
lib/cliver/filter.rb,
lib/cliver/version.rb,
lib/cliver/detector.rb,
lib/cliver/assertion.rb,
lib/cliver/which/posix.rb,
lib/cliver/which/windows.rb
Overview
Cliver is tool for making dependency assertions against command-line executables.
Defined Under Namespace
Modules: Filter, Which Classes: Assertion, Detector
Constant Summary collapse
- VERSION =
Cliver follows SemVer
'0.1.4'
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(executable, *requirements, options = {}) ⇒ Assertion
Wraps Cliver::assert and returns truthy/false instead of raising.
Class Method Details
Instance Method Details
#initialize(executable, *requirements, options = {}) ⇒ Assertion
Wraps Cliver::assert and returns truthy/false instead of raising
28 29 30 31 32 33 34 35 |
# File 'lib/cliver.rb', line 28 def dependency_unmet?(*args, &block) Cliver.assert(*args, &block) false rescue Assertion::DependencyNotMet => error # Cliver::Assertion::VersionMismatch -> 'Version Mismatch' reason = error.class.name.split(':').last.gsub(/([a-z])([A-Z])/, '\\1 \\2') "#{reason}: #{error.}" end |