Sha256: 8baee75106397f1a4e583615dc3aaa71738e6520d968efafca5d880294dc583b

Contents?: true

Size: 461 Bytes

Versions: 6

Compression:

Stored size: 461 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|
          {
            name: name,
            requirement: requirement,
            type: "runtime",
          }
        end
      end
    end
  end
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
bibliothecary-9.1.0 lib/bibliothecary/multi_parsers/json_runtime.rb
bibliothecary-9.0.0 lib/bibliothecary/multi_parsers/json_runtime.rb
bibliothecary-8.8.1 lib/bibliothecary/multi_parsers/json_runtime.rb
bibliothecary-8.7.7 lib/bibliothecary/multi_parsers/json_runtime.rb
bibliothecary-8.7.6 lib/bibliothecary/multi_parsers/json_runtime.rb
bibliothecary-8.7.5 lib/bibliothecary/multi_parsers/json_runtime.rb