Class: CaptiveStackDetector::SystemPackageDetector

Inherits:
Object
  • Object
show all
Defined in:
lib/captive_stack_detector/system_package_detector.rb

Constant Summary collapse

GEM_TO_PACKAGES =
{
  "ruby-vips"        => %w[libvips42 libvips-dev],
  "mini_magick"      => %w[imagemagick],
  "rmagick"          => %w[imagemagick],
  "wkhtmltopdf-binary" => %w[wkhtmltopdf],
  "sqlite3"          => %w[libsqlite3-dev],
}.freeze

Instance Method Summary collapse

Constructor Details

#initialize(gemfile:, aptfile:) ⇒ SystemPackageDetector

Returns a new instance of SystemPackageDetector.



13
14
15
16
# File 'lib/captive_stack_detector/system_package_detector.rb', line 13

def initialize(gemfile:, aptfile:)
  @gemfile = gemfile.to_s
  @aptfile = aptfile.to_s
end

Instance Method Details

#packagesObject



18
19
20
# File 'lib/captive_stack_detector/system_package_detector.rb', line 18

def packages
  (from_gemfile + from_aptfile).uniq
end