lib/testcentricity_web/environment.rb in testcentricity_web-1.0.17 vs lib/testcentricity_web/environment.rb in testcentricity_web-1.0.18
- old
+ new
@@ -12,11 +12,11 @@
data = read_yaml_node_data('environments.yml', environ_name)
when :json
data = read_json_node_data('environments.json', environ_name)
end
@current = Environ.new(data)
- Environ.set_current(@current)
+ Environ.current = @current
end
end
class Environ < TestCentricity::DataObject
@@ -77,11 +77,13 @@
def self.session_time_stamp
@session_time_stamp
end
+ # @deprecated Please use {#browser=} instead
def self.set_browser(browser)
+ warn "[DEPRECATION] 'TestCentricity::Environ.set_browser' is deprecated. Please use 'browser=' instead."
@browser = browser.downcase.to_sym
end
def self.browser=(browser)
@browser = browser.downcase.to_sym
@@ -89,11 +91,13 @@
def self.browser
@browser
end
+ # @deprecated Please use {#os=} instead
def self.set_os(os)
+ warn "[DEPRECATION] 'TestCentricity::Environ.set_os' is deprecated. Please use 'os=' instead."
@os = os
end
def self.os=(os)
@os = os
@@ -101,11 +105,13 @@
def self.os
@os
end
+ # @deprecated Please use {#device=} instead
def self.set_device(device)
+ warn "[DEPRECATION] 'TestCentricity::Environ.set_device' is deprecated. Please use 'device=' instead."
@device = device
end
def self.device=(device)
@device = device
@@ -113,11 +119,13 @@
def self.is_device?
@device
end
+ # @deprecated Please use {#device_type=} instead
def self.set_device_type(type)
+ warn "[DEPRECATION] 'TestCentricity::Environ.set_device_type' is deprecated. Please use 'device_type=' instead."
@device_type = type.downcase
end
def self.device_type=(type)
@device_type = type.downcase
@@ -125,11 +133,13 @@
def self.device_type
@device_type
end
+ # @deprecated Please use {#platform=} instead
def self.set_platform(platform)
+ warn "[DEPRECATION] 'TestCentricity::Environ.set_platform' is deprecated. Please use 'platform=' instead."
@platform = platform
end
def self.platform=(platform)
@platform = platform
@@ -149,11 +159,13 @@
def self.is_signed_in?
@signed_in
end
+ # @deprecated Please use {#portal_state=} instead
def self.set_portal_state(portal_state)
+ warn "[DEPRECATION] 'TestCentricity::Environ.set_portal_state' is deprecated. Please use 'portal_state=' instead."
@portal_status = portal_state
end
def self.portal_state=(portal_state)
@portal_status = portal_state
@@ -161,10 +173,12 @@
def self.portal_state
@portal_status
end
+ # @deprecated Please use {#portal_context=} instead
def self.set_portal_context(portal_context)
+ warn "[DEPRECATION] 'TestCentricity::Environ.set_portal_context' is deprecated. Please use 'portal_context=' instead."
@portal_context = portal_context
end
def self.portal_context=(portal_context)
@portal_context = portal_context