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-5.5.9 lib/danger/clients/rubygems_client.rb
danger-5.5.8 lib/danger/clients/rubygems_client.rb
danger-5.5.7 lib/danger/clients/rubygems_client.rb
danger-5.5.6 lib/danger/clients/rubygems_client.rb
danger-5.5.5 lib/danger/clients/rubygems_client.rb
danger-5.5.4 lib/danger/clients/rubygems_client.rb
danger-5.5.3 lib/danger/clients/rubygems_client.rb
danger-5.5.2 lib/danger/clients/rubygems_client.rb
danger-5.5.1 lib/danger/clients/rubygems_client.rb
danger-5.5.0 lib/danger/clients/rubygems_client.rb
danger-5.4.3 lib/danger/clients/rubygems_client.rb
danger-5.4.2 lib/danger/clients/rubygems_client.rb
danger-5.4.1 lib/danger/clients/rubygems_client.rb
danger-5.4.0 lib/danger/clients/rubygems_client.rb
danger-5.3.5 lib/danger/clients/rubygems_client.rb
danger-5.3.4 lib/danger/clients/rubygems_client.rb
danger-5.3.3 lib/danger/clients/rubygems_client.rb
danger-5.3.2 lib/danger/clients/rubygems_client.rb
danger-5.3.1 lib/danger/clients/rubygems_client.rb
danger-5.3.0 lib/danger/clients/rubygems_client.rb