~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): Laurent Bigonville
  • Date: 2012-03-07 16:36:21 UTC
  • Revision ID: package-import@ubuntu.com-20120307163621-bztj2b8860dxpzs7
Tags: upstream-0.10.0
ImportĀ upstreamĀ versionĀ 0.10.0

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
module Excon
 
2
  unless const_defined?(:VERSION)
 
3
    VERSION = '0.10.0'
 
4
  end
 
5
 
 
6
  unless const_defined?(:CHUNK_SIZE)
 
7
    CHUNK_SIZE = 1048576 # 1 megabyte
 
8
  end
 
9
 
 
10
  unless const_defined?(:CR_NL)
 
11
    CR_NL = "\r\n"
 
12
  end
 
13
 
 
14
  unless const_defined?(:DEFAULT_RETRY_LIMIT)
 
15
    DEFAULT_RETRY_LIMIT = 4
 
16
  end
 
17
 
 
18
  unless const_defined?(:FORCE_ENC)
 
19
    FORCE_ENC = CR_NL.respond_to?(:force_encoding)
 
20
  end
 
21
 
 
22
  unless const_defined?(:HTTP_1_1)
 
23
    HTTP_1_1 = " HTTP/1.1\r\n"
 
24
  end
 
25
 
 
26
  unless const_defined?(:HTTP_VERBS)
 
27
    HTTP_VERBS = %w{connect delete get head options post put trace}
 
28
  end
 
29
 
 
30
  unless const_defined?(:HTTPS)
 
31
    HTTPS = 'https'
 
32
  end
 
33
 
 
34
  unless const_defined?(:NO_ENTITY)
 
35
    NO_ENTITY = [204, 205, 304].freeze
 
36
  end
 
37
 
 
38
  unless ::IO.const_defined?(:WaitReadable)
 
39
    class ::IO
 
40
      module WaitReadable; end
 
41
    end
 
42
  end
 
43
 
 
44
  unless ::IO.const_defined?(:WaitWritable)
 
45
    class ::IO
 
46
      module WaitWritable; end
 
47
    end
 
48
  end
 
49
end