Class: Ocak::StackDetector
- Inherits:
-
Object
- Object
- Ocak::StackDetector
- Defined in:
- lib/ocak/stack_detector.rb
Defined Under Namespace
Classes: Result
Instance Method Summary collapse
- #detect ⇒ Object
-
#initialize(project_dir) ⇒ StackDetector
constructor
A new instance of StackDetector.
Constructor Details
#initialize(project_dir) ⇒ StackDetector
Returns a new instance of StackDetector.
11 12 13 |
# File 'lib/ocak/stack_detector.rb', line 11 def initialize(project_dir) @dir = project_dir end |
Instance Method Details
#detect ⇒ Object
15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 |
# File 'lib/ocak/stack_detector.rb', line 15 def detect lang = detect_language mono = detect_monorepo Result.new( language: lang, framework: detect_framework(lang), test_command: detect_test_command(lang), lint_command: detect_lint_command(lang), format_command: detect_format_command(lang), security_commands: detect_security_commands(lang), setup_command: detect_setup_command(lang), monorepo: mono[:detected], packages: mono[:packages] ) end |