Module: Libgss

Defined in:
lib/libgss.rb,
lib/libgss/action.rb,
lib/libgss/fontana.rb,
lib/libgss/network.rb,
lib/libgss/outputs.rb,
lib/libgss/version.rb,
lib/libgss/asset_request.rb,
lib/libgss/action_request.rb,
lib/libgss/async_action_request.rb,
lib/libgss/http_client_with_signature_key.rb

Defined Under Namespace

Modules: Fontana Classes: Action, ActionRequest, AssetRequest, AsyncActionRequest, ClientError, Error, ErrorResponse, HttpClientWithSignatureKey, InvalidResponse, Network, Outputs, ServerBlockError

Constant Summary collapse

MAX_RETRY_COUNT =
(ENV["LIBGSS_MAX_RETRY_COUNT"] || 10).to_i
VERSION =
"0.11.0"

Class Attribute Summary collapse

Class Method Summary collapse

Class Attribute Details

.use_oauth_gemObject

Returns the value of attribute use_oauth_gem.



16
17
18
# File 'lib/libgss.rb', line 16

def use_oauth_gem
  @use_oauth_gem
end

Class Method Details

.with_retry(name) ⇒ Object



62
63
64
65
66
67
68
69
70
71
72
73
# File 'lib/libgss.rb', line 62

def with_retry(name)
  retry_count = 0
  begin
    return yield
  rescue OpenSSL::SSL::SSLError => e
    $stderr.puts("retrying #{name} [#{e.class.name}] #{e.message}")
    sleep(0.2)
    retry_count += 1
    retry if retry_count <= MAX_RETRY_COUNT
    raise e
  end
end