Module: Rox::Core::Environment

Defined in:
lib/rox/core/consts/environment.rb

Class Method Summary collapse

Class Method Details

.analytics_pathObject



45
46
47
# File 'lib/rox/core/consts/environment.rb', line 45

def self.analytics_path
  @analytics_path
end

.api_pathObject



33
34
35
# File 'lib/rox/core/consts/environment.rb', line 33

def self.api_path
  @api_path
end

.cdn_pathObject



29
30
31
# File 'lib/rox/core/consts/environment.rb', line 29

def self.cdn_path
  @cdn_path
end

.notifications_pathObject



49
50
51
# File 'lib/rox/core/consts/environment.rb', line 49

def self.notifications_path
  @notifications_path
end

.reset(rox_options = nil) ⇒ Object



4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
# File 'lib/rox/core/consts/environment.rb', line 4

def self.reset(rox_options = nil)
  @roxy_internal_path = 'device/request_configuration'
  if !rox_options&.network_configurations_options.nil?
      @cdn_path = rox_options&.network_configurations_options&.get_config_cloud_endpoint
      @api_path = rox_options&.network_configurations_options&.get_config_api_endpoint
      @state_cdn_path = rox_options&.network_configurations_options&.send_state_cloud_endpoint
      @state_api_path = rox_options&.network_configurations_options&.send_state_api_endpoint
      @analytics_path = rox_options&.network_configurations_options&.analytics_endpoint
      @notifications_path = rox_options&.network_configurations_options&.push_notification_endpoint
  else
    case ENV['ROLLOUT_MODE']
    when 'QA'
      setQA
    when 'LOCAL'
      setLOCAL
    else
      setDefault(rox_options)
    end
  end
end

.roxy_internal_pathObject



25
26
27
# File 'lib/rox/core/consts/environment.rb', line 25

def self.roxy_internal_path
  @roxy_internal_path
end

.state_api_pathObject



41
42
43
# File 'lib/rox/core/consts/environment.rb', line 41

def self.state_api_path
  @state_api_path
end

.state_cdn_pathObject



37
38
39
# File 'lib/rox/core/consts/environment.rb', line 37

def self.state_cdn_path
  @state_cdn_path
end