Sha256: 3fb973cec81e66d13415537e905b23da8ada5d38e4008dd381cde4e236487ad1

Contents?: true

Size: 280 Bytes

Versions: 11

Compression:

Stored size: 280 Bytes

Contents

module Latest
  class MRIRetriever

    def retrieve(mri)
      page = Net::HTTP.get(URI(mri.source + mri.short_ver + '/'))
      page.scan(/(#{ Regexp.escape(mri.short_ver) }\.\d(?:-[a-z0-9]+)?)\.zip/x).
        uniq.flatten.map { |v| RubyVersion.new(v) }.max
    end

  end
end

Version data entries

11 entries across 11 versions & 1 rubygems

Version Path
latest_ruby-3.3.0 lib/latest_ruby/retrievers/mri_retriever.rb
latest_ruby-3.2.0 lib/latest_ruby/retrievers/mri_retriever.rb
latest_ruby-3.1.0 lib/latest_ruby/retrievers/mri_retriever.rb
latest_ruby-3.0.2 lib/latest_ruby/retrievers/mri_retriever.rb
latest_ruby-3.0.1 lib/latest_ruby/retrievers/mri_retriever.rb
latest_ruby-3.0.0 lib/latest_ruby/retrievers/mri_retriever.rb
latest_ruby-2.0.0 lib/latest_ruby/retrievers/mri_retriever.rb
latest_ruby-1.0.0 lib/latest_ruby/retrievers/mri_retriever.rb
latest_ruby-0.0.7 lib/latest_ruby/retrievers/mri_retriever.rb
latest_ruby-0.0.6 lib/latest_ruby/retrievers/mri_retriever.rb
latest_ruby-0.0.5 lib/latest_ruby/retrievers/mri_retriever.rb