Sha256: ce2431d20260efb91ea6c16376cabc939e936b84aa83d3e4323a104d21af9130

Contents?: true

Size: 628 Bytes

Versions: 40

Compression:

Stored size: 628 Bytes

Contents

module Bibliothecary
  module MultiParsers
    module BundlerLikeManifest
      # this takes parsed Bundler and Bundler-like (CocoaPods)
      # manifests and turns them into a list of dependencies.
      def parse_ruby_manifest(manifest)
        manifest.dependencies.inject([]) do |deps, dep|
          deps.push({
            name: dep.name,
            requirement: dep
              .requirement
              .requirements
              .sort_by(&:last)
              .map { |op, version| "#{op} #{version}" }
              .join(", "),
            type: dep.type
          })
        end.uniq
      end
    end
  end
end

Version data entries

40 entries across 40 versions & 1 rubygems

Version Path
bibliothecary-8.7.4 lib/bibliothecary/multi_parsers/bundler_like_manifest.rb
bibliothecary-8.7.3 lib/bibliothecary/multi_parsers/bundler_like_manifest.rb
bibliothecary-8.7.2 lib/bibliothecary/multi_parsers/bundler_like_manifest.rb
bibliothecary-8.7.1 lib/bibliothecary/multi_parsers/bundler_like_manifest.rb
bibliothecary-8.7.0 lib/bibliothecary/multi_parsers/bundler_like_manifest.rb
bibliothecary-8.6.5 lib/bibliothecary/multi_parsers/bundler_like_manifest.rb
bibliothecary-8.6.4 lib/bibliothecary/multi_parsers/bundler_like_manifest.rb
bibliothecary-8.6.3 lib/bibliothecary/multi_parsers/bundler_like_manifest.rb
bibliothecary-8.6.2 lib/bibliothecary/multi_parsers/bundler_like_manifest.rb
bibliothecary-8.6.1 lib/bibliothecary/multi_parsers/bundler_like_manifest.rb
bibliothecary-8.6.0 lib/bibliothecary/multi_parsers/bundler_like_manifest.rb
bibliothecary-8.5.1 lib/bibliothecary/multi_parsers/bundler_like_manifest.rb
bibliothecary-8.5.0 lib/bibliothecary/multi_parsers/bundler_like_manifest.rb
bibliothecary-8.4.6 lib/bibliothecary/multi_parsers/bundler_like_manifest.rb
bibliothecary-8.4.5 lib/bibliothecary/multi_parsers/bundler_like_manifest.rb
bibliothecary-8.4.4 lib/bibliothecary/multi_parsers/bundler_like_manifest.rb
bibliothecary-8.4.3 lib/bibliothecary/multi_parsers/bundler_like_manifest.rb
bibliothecary-8.4.2 lib/bibliothecary/multi_parsers/bundler_like_manifest.rb
bibliothecary-8.4.1 lib/bibliothecary/multi_parsers/bundler_like_manifest.rb
bibliothecary-8.4.0 lib/bibliothecary/multi_parsers/bundler_like_manifest.rb