Sha256: 5a0447edef97ba33dd43967d6fa84b8c672580a3fe8c29d8819f5f1b087e0da2
Contents?: true
Size: 718 Bytes
Versions: 1
Compression:
Stored size: 718 Bytes
Contents
require 'bundler' module Blakey module Repository class Ruby::RubyVersionFetcher def initialize(gemfile_lock_parser:, source:) @gemfile_lock_parser = gemfile_lock_parser @source = source end def version format_version(fetched_version) end private attr_reader :gemfile_lock_parser, :source def format_version(version_string) version_string.gsub(/^(.*?)(?=[0-9])/, '').strip end def fetched_version gemfile_lock_parser.ruby_version || fetch_version_from_ruby_version_file end def fetch_version_from_ruby_version_file source.read_file('.ruby-version') end end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
blakey-0.4.0 | lib/blakey/repository/ruby/ruby_version_fetcher.rb |