Sha256: e5cfd0fa749aa98d8db9910e70ed558dc065e0dcc2ac7d784fd1ddec5edc268e

Contents?: true

Size: 498 Bytes

Versions: 4

Compression:

Stored size: 498 Bytes

Contents

# frozen_string_literal: true

require 'geminabox'
require 'rubygems/indexer'

module Geminabox::Indexer
  def self.updated_gemspecs(indexer)
    specs_mtime = File.stat(indexer.dest_specs_index).mtime rescue Time.at(0)
    newest_mtime = Time.at 0

    updated_gems = indexer.gem_file_list.select do |gem|
      gem_mtime = File.stat(gem).mtime
      newest_mtime = gem_mtime if gem_mtime > newest_mtime
      gem_mtime >= specs_mtime
    end

    indexer.map_gems_to_specs updated_gems
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
geminabox-2.1.0 lib/geminabox/indexer.rb
geminabox-2.1.0.rc.1 lib/geminabox/indexer.rb
geminabox-2.0.0 lib/geminabox/indexer.rb
geminabox-2.0.0.rc.1 lib/geminabox/indexer.rb