~ubuntu-branches/ubuntu/utopic/ruby-excon/utopic

« back to all changes in this revision

Viewing changes to lib/excon/constants.rb

  • Committer: Package Import Robot
  • Author(s): Praveen Arimbrathodiyil
  • Date: 2014-01-14 18:44:24 UTC
  • mfrom: (1.1.4)
  • Revision ID: package-import@ubuntu.com-20140114184424-3nx5mqudhzjpcrjs
Tags: 0.31.0-1
* Team upload
* New upstream release
* Refresh patches
* Bump standards version to 3.9.5 (no changes)

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
module Excon
2
2
 
 
3
  VERSION = '0.31.0'
 
4
 
3
5
  CR_NL = "\r\n"
4
6
 
5
7
  DEFAULT_CA_FILE = '/etc/ssl/certs/ca-certificates.crt'
11
13
    CHUNK_SIZE = DEFAULT_CHUNK_SIZE
12
14
  end
13
15
 
14
 
  DEFAULT_NONBLOCK = OpenSSL::SSL::SSLSocket.public_method_defined?(:connect_nonblock) &&
15
 
    OpenSSL::SSL::SSLSocket.public_method_defined?(:read_nonblock) &&
16
 
    OpenSSL::SSL::SSLSocket.public_method_defined?(:write_nonblock)
17
 
 
18
16
  DEFAULT_RETRY_LIMIT = 4
19
17
 
20
18
  FORCE_ENC = CR_NL.respond_to?(:force_encoding)
29
27
 
30
28
  REDACTED = 'REDACTED'
31
29
 
32
 
  VALID_CONNECTION_KEYS = [
 
30
  UNIX = 'unix'
 
31
 
 
32
  USER_AGENT = 'excon/' << VERSION
 
33
 
 
34
  VALID_REQUEST_KEYS = [
33
35
    :body,
34
36
    :captures,
35
37
    :chunk_size,
36
 
    :client_key,
37
 
    :client_cert,
38
 
    :certificate,
39
 
    :private_key,
40
 
    :connect_timeout,
41
 
    :connection,
42
38
    :debug_request,
43
39
    :debug_response,
44
 
    :error,
45
 
    :exception,
46
40
    :expects,
47
 
    :family,
48
41
    :headers,
49
 
    :host,
50
42
    :idempotent,
51
43
    :instrumentor,
52
44
    :instrumentor_name,
53
45
    :method,
54
46
    :middlewares,
55
47
    :mock,
56
 
    :nonblock,
57
 
    :omit_default_port,
58
 
    :password,
59
48
    :path,
 
49
    :persistent,
60
50
    :pipeline,
61
 
    :port,
62
 
    :proxy,
63
51
    :query,
64
52
    :read_timeout,
65
53
    :request_block,
66
 
    :response,
67
54
    :response_block,
68
 
    :retries_remaining,
 
55
    :retries_remaining, # used internally
69
56
    :retry_limit,
 
57
    :write_timeout
 
58
  ]
 
59
 
 
60
  VALID_CONNECTION_KEYS = VALID_REQUEST_KEYS + [
 
61
    :ciphers,
 
62
    :client_key,
 
63
    :client_cert,
 
64
    :certificate,
 
65
    :certificate_path,
 
66
    :private_key,
 
67
    :private_key_path,
 
68
    :connect_timeout,
 
69
    :family,
 
70
    :host,
 
71
    :omit_default_port,
 
72
    :nonblock,
 
73
    :password,
 
74
    :port,
 
75
    :proxy,
70
76
    :scheme,
 
77
    :socket,
 
78
    :ssl_ca_file,
 
79
    :ssl_verify_peer,
 
80
    :ssl_version,
71
81
    :tcp_nodelay,
72
82
    :uri_parser,
73
 
    :user,
74
 
    :ssl_ca_file,
75
 
    :ssl_verify_peer,
76
 
    :stack,
77
 
    :write_timeout
 
83
    :user
78
84
  ]
79
85
 
80
 
  VERSION = '0.25.1'
81
 
 
82
86
  unless ::IO.const_defined?(:WaitReadable)
83
87
    class ::IO
84
88
      module WaitReadable; end