Sha256: 05918b254dd0597fa25bcbb335b67c6a57de4c51edff2f585d730ceddf27ae3e

Contents?: true

Size: 742 Bytes

Versions: 3

Compression:

Stored size: 742 Bytes

Contents

module Blakey
  module Repository
    class Ruby < Base
      def gem_dependency_version(gem_name)
        gem_dependencies.fetch(gem_name, nil)
      end

      def gem_dependencies
        gemfile_lock_parser.dependencies
      end

      def ruby_version
        ruby_version_fetcher.version
      end

      private

      attr_reader :source

      def ruby_version_fetcher
        @ruby_version_fetcher ||= RubyVersionFetcher.new(
          gemfile_lock_parser: gemfile_lock_parser,
          source: source
        )
      end

      def gemfile_lock_parser
        @gemfile_lock_parser ||= GemfileLockParser.new(
          gemfile_lock_path: options[:gemfile_lock_path],
          source: source
        )
      end
    end
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
blakey-0.4.0 lib/blakey/repository/ruby.rb
blakey-0.3.0 lib/blakey/repository/ruby.rb
blakey-0.1.0 lib/blakey/repository/ruby.rb