Sha256: ab7e6e5321168fe6b218c7e16821cef1e055f51572d13f38919d6c57df5b3937

Contents?: true

Size: 475 Bytes

Versions: 6

Compression:

Stored size: 475 Bytes

Contents

module Bibliothecary
  module MultiParsers
    # Provide JSON Runtime Manifest parsing
    module JSONRuntime
      def parse_json_runtime_manifest(file_contents, options: {}) # rubocop:disable Lint/UnusedMethodArgument
        JSON.parse(file_contents).fetch("dependencies",[]).map do |name, requirement|
          Dependency.new(
            name: name,
            requirement: requirement,
            type: "runtime",
          )
        end
      end
    end
  end
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
bibliothecary-10.2.4 lib/bibliothecary/multi_parsers/json_runtime.rb
bibliothecary-10.2.3 lib/bibliothecary/multi_parsers/json_runtime.rb
bibliothecary-10.2.2 lib/bibliothecary/multi_parsers/json_runtime.rb
bibliothecary-10.2.0 lib/bibliothecary/multi_parsers/json_runtime.rb
bibliothecary-10.1.0 lib/bibliothecary/multi_parsers/json_runtime.rb
bibliothecary-10.0.0 lib/bibliothecary/multi_parsers/json_runtime.rb