Sha256: 54643bf31193c9056f4e9a04290cfe11651824c185af84259bc9c091e0e4291f

Contents?: true

Size: 374 Bytes

Versions: 182

Compression:

Stored size: 374 Bytes

Contents

module Danger
  class RubyGemsClient
    API_URL = "https://rubygems.org/api/v1/versions/danger/latest.json".freeze
    DUMMY_VERSION = "0.0.0".freeze

    def self.latest_danger_version
      require "json"
      json = JSON.parse(Faraday.get(API_URL).body)
      json.fetch("version") { DUMMY_VERSION }
    rescue StandardError => _e
      DUMMY_VERSION
    end
  end
end

Version data entries

182 entries across 182 versions & 2 rubygems

Version Path
danger-3.2.1 lib/danger/clients/rubygems_client.rb
danger-3.2.0 lib/danger/clients/rubygems_client.rb