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.10.0 lib/danger/clients/rubygems_client.rb
danger-5.9.1 lib/danger/clients/rubygems_client.rb
danger-5.9.0 lib/danger/clients/rubygems_client.rb
danger-5.8.2 lib/danger/clients/rubygems_client.rb
danger-5.8.1 lib/danger/clients/rubygems_client.rb
danger-5.8.0 lib/danger/clients/rubygems_client.rb
danger-5.7.1 lib/danger/clients/rubygems_client.rb
danger-5.7.0 lib/danger/clients/rubygems_client.rb
danger-5.6.7 lib/danger/clients/rubygems_client.rb
danger-5.6.6 lib/danger/clients/rubygems_client.rb
danger-5.6.5 lib/danger/clients/rubygems_client.rb
danger-5.6.4 lib/danger/clients/rubygems_client.rb
danger-5.6.3 lib/danger/clients/rubygems_client.rb
danger-5.6.2 lib/danger/clients/rubygems_client.rb
danger-5.6.1 lib/danger/clients/rubygems_client.rb
danger-5.6.0 lib/danger/clients/rubygems_client.rb
danger-5.5.13 lib/danger/clients/rubygems_client.rb
danger-5.5.12 lib/danger/clients/rubygems_client.rb
danger-5.5.11 lib/danger/clients/rubygems_client.rb
danger-5.5.10 lib/danger/clients/rubygems_client.rb