class ECSBundler::BundlerScanner

Public Class Methods

run() click to toggle source
# File lib/ecs_bundler/bundler_scanner.rb, line 6
def run
  project_specification = ProjectSpecification.new
  {
    project: ECSBundler.config[:project],
    module: project_specification.name,
    moduleId: "bundler:#{project_specification.name}",
    dependencies: [specification_to_h(project_specification)]
  }
end

Private Class Methods

specification_to_h(spec) click to toggle source
# File lib/ecs_bundler/bundler_scanner.rb, line 18
def specification_to_h(spec)
  {
    name: spec.name,
    key: "bundler:#{spec.name}",
    description: spec.description,
    private: true,
    licenses: spec.license ? [{ name: spec.license }] : [],
    homepageUrl: spec.homepage,
    repoUrl: RepositoryFinder.url(spec),
    versions: [spec.version.to_s].compact,
    dependencies: spec.runtime_dependencies.map { |dependency| specification_to_h(dependency.to_spec) }
  }
end