Sha256: 70dc64de7f6b9b61316de9da37eb70097a1bd94ec882c69a15c7453a9f9c3866
Contents?: true
Size: 485 Bytes
Versions: 7
Compression:
Stored size: 485 Bytes
Contents
# frozen_string_literal: true require "core" module Pennyworth module Loaders # Loads an array gems from the RubyGems API. class Gem include Import[:configuration, :http] def call endpoint http.get("#{configuration.ruby_gems_api_url}/#{endpoint}") .then do |response| return JSON response.body.to_s, symbolize_names: true if response.status.success? Core::EMPTY_HASH end end end end end
Version data entries
7 entries across 7 versions & 1 rubygems