Sha256: f09565645714439adb2c4f6866cab1007478a6e527bdc1481005b182dc5f0b08

Contents?: true

Size: 498 Bytes

Versions: 21

Compression:

Stored size: 498 Bytes

Contents

# frozen_string_literal: true

module Pennyworth
  module Integrations
    module RubyGems
      # Provides low-level API access to the RubyGems API.
      class Client
        include Import[:configuration, :http]

        def get endpoint
          http.get("#{configuration.ruby_gems_api_url}/#{endpoint}")
              .then do |response|
                response.status.success? ? JSON(response.body.to_s, symbolize_names: true) : {}
              end
        end
      end
    end
  end
end

Version data entries

21 entries across 21 versions & 1 rubygems

Version Path
pennyworth-15.0.3 lib/pennyworth/integrations/ruby_gems/client.rb
pennyworth-15.0.2 lib/pennyworth/integrations/ruby_gems/client.rb
pennyworth-15.0.1 lib/pennyworth/integrations/ruby_gems/client.rb
pennyworth-15.0.0 lib/pennyworth/integrations/ruby_gems/client.rb
pennyworth-14.3.0 lib/pennyworth/integrations/ruby_gems/client.rb
pennyworth-14.2.1 lib/pennyworth/integrations/ruby_gems/client.rb
pennyworth-14.2.0 lib/pennyworth/integrations/ruby_gems/client.rb
pennyworth-14.1.2 lib/pennyworth/integrations/ruby_gems/client.rb
pennyworth-14.1.1 lib/pennyworth/integrations/ruby_gems/client.rb
pennyworth-14.1.0 lib/pennyworth/integrations/ruby_gems/client.rb
pennyworth-14.0.0 lib/pennyworth/integrations/ruby_gems/client.rb
pennyworth-13.8.0 lib/pennyworth/integrations/ruby_gems/client.rb
pennyworth-13.7.0 lib/pennyworth/integrations/ruby_gems/client.rb
pennyworth-13.6.0 lib/pennyworth/integrations/ruby_gems/client.rb
pennyworth-13.5.0 lib/pennyworth/integrations/ruby_gems/client.rb
pennyworth-13.4.0 lib/pennyworth/integrations/ruby_gems/client.rb
pennyworth-13.3.0 lib/pennyworth/integrations/ruby_gems/client.rb
pennyworth-13.2.0 lib/pennyworth/integrations/ruby_gems/client.rb
pennyworth-13.1.0 lib/pennyworth/integrations/ruby_gems/client.rb
pennyworth-13.0.1 lib/pennyworth/integrations/ruby_gems/client.rb