forked from chrisle/gattica
/
settings.rb
39 lines (32 loc) · 870 Bytes
/
settings.rb
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
module Gattica
module Settings
USE_SSL = true
SSL_PORT = 443
NON_SSL_PORT = 80
NO_VERIFY_SSL_MODE = OpenSSL::SSL::VERIFY_NONE
VERIFY_SSL_MODE = OpenSSL::SSL::VERIFY_PEER
TIMEOUT = 100
DEFAULT_ARGS = {
:start_date => nil,
:end_date => nil,
:dimensions => [],
:metrics => [],
:filters => [],
:sort => []
}
DEFAULT_OPTIONS = {
:email => nil, # eg: 'email@gmail.com'
:password => nil, # eg: '$up3r_$ekret'
:token => nil,
:api_key => nil,
:profile_id => nil,
:debug => false,
:headers => {},
:logger => Logger.new(STDOUT),
:verify_ssl => true,
:http_proxy => {}
}
FILTER_METRIC_OPERATORS = %w{ == != > < >= <= }
FILTER_DIMENSION_OPERATORS = %w{ == != =~ !~ =@ ~@ }
end
end