Class: GDK::Dependencies::GitlabVersions
- Inherits:
-
Object
- Object
- GDK::Dependencies::GitlabVersions
- Defined in:
- lib/gdk/dependencies/gitlab_versions.rb
Constant Summary collapse
- REPOSITORY_RAW_URL =
'https://gitlab.com/gitlab-org/gitlab/-/raw/master/'- VersionNotDetected =
Class.new(StandardError)
Instance Method Summary collapse
-
#ruby_version ⇒ String
Return GitLab’s ruby version from local repository or fallback to remote repository when no code is still installed.
Instance Method Details
#ruby_version ⇒ String
Return GitLab’s ruby version from local repository or fallback to remote repository when no code is still installed
16 17 18 19 20 |
# File 'lib/gdk/dependencies/gitlab_versions.rb', line 16 def ruby_version (local_ruby_version || remote_ruby_version).tap do |version| raise(VersionNotDetected, "Failed to determine GitLab's Ruby version") unless version.match?(/^[0-9]\.[0-9]+(.[0-9]+)/) end end |