Method: Warbler::Traits::Gemspec#update_archive

Defined in:
lib/warbler/traits/gemspec.rb

#update_archive(jar) ⇒ Object



35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
# File 'lib/warbler/traits/gemspec.rb', line 35

def update_archive(jar)
  @spec.files.each do |f|
    unless File.exist?(f)
      warn "update your gemspec; skipping missing file #{f}"
      next
    end
    file_key = jar.apply_pathmaps(config, f, :application)
    next if jar.files[file_key]
    jar.files[file_key] = f
  end

  config.compiled_ruby_files.each do |f|
    f = f.sub(/\.rb$/, '.class')
    next unless File.exist?(f)
    jar.files[apply_pathmaps(config, f, :application)] = f
  end

  update_archive_add_executable(jar)
end