Class: FunCi::Setup::ProjectDetector
- Inherits:
-
Object
- Object
- FunCi::Setup::ProjectDetector
- Defined in:
- lib/fun_ci/setup/project_detector.rb
Instance Method Summary collapse
- #detect ⇒ Object
-
#initialize(filenames) ⇒ ProjectDetector
constructor
A new instance of ProjectDetector.
Constructor Details
#initialize(filenames) ⇒ ProjectDetector
Returns a new instance of ProjectDetector.
6 7 8 |
# File 'lib/fun_ci/setup/project_detector.rb', line 6 def initialize(filenames) @filenames = filenames end |
Instance Method Details
#detect ⇒ Object
10 11 12 13 14 15 16 17 18 19 |
# File 'lib/fun_ci/setup/project_detector.rb', line 10 def detect return :ruby_bundler if @filenames.include?("Gemfile") return :jvm_gradle_kotlin if @filenames.include?("build.gradle.kts") return :jvm_gradle_kotlin if @filenames.include?("settings.gradle.kts") return :jvm_gradle_groovy if @filenames.include?("build.gradle") return :jvm_gradle_groovy if @filenames.include?("settings.gradle") return :jvm_maven if @filenames.include?("pom.xml") :unknown end |