Module: Applitools::Calabash

Extended by:
RequireUtils
Defined in:
lib/eyes_calabash.rb,
lib/applitools/calabash/eyes.rb,
lib/applitools/calabash/utils.rb,
lib/applitools/calabash/target.rb,
lib/applitools/calabash/os_versions.rb,
lib/applitools/calabash/eyes_settings.rb,
lib/applitools/calabash/calabash_element.rb,
lib/applitools/calabash/environment_detector.rb,
lib/applitools/calabash/eyes_calabash_screenshot.rb,
lib/applitools/calabash/full_page_capture_algorithm.rb,
lib/applitools/calabash/calabash_screenshot_provider.rb,
lib/applitools/calabash/eyes_calabash_ios_screenshot.rb,
lib/applitools/calabash/eyes_calabash_android_screenshot.rb,
lib/applitools/calabash/full_page_capture_algorithm/base.rb,
lib/applitools/calabash/full_page_capture_algorithm/ios_ui_table_view.rb,
lib/applitools/calabash/full_page_capture_algorithm/android_scroll_view.rb

Defined Under Namespace

Modules: EnvironmentDetector, FullPageCaptureAlgorithm, OsVersions, Utils Classes: AndroidScreenshotProvider, CalabashElement, CalabashScreenshotProvider, Eyes, EyesCalabashAndroidScreenshot, EyesCalabashIosScreenshot, EyesCalabashScreenshot, EyesSettings, IosScreenshotProvider, Target

Class Method Summary collapse

Class Method Details

.require_dir(dir) ⇒ Object



9
10
11
12
13
14
# File 'lib/eyes_calabash.rb', line 9

def self.require_dir(dir)
  load_dir = File.dirname(File.expand_path(__FILE__))
  Dir[File.join(load_dir, 'applitools', dir, '*.rb')].sort.each do |f|
    require f
  end
end

.require_environment(requirement, env) ⇒ Object



16
17
18
19
20
21
22
23
24
# File 'lib/eyes_calabash.rb', line 16

def self.require_environment(requirement, env)
  dirname = File.dirname(requirement)
  filename = File.basename(requirement)
  filename += '.rb' unless /^.*\.rb$/ =~ filename
  file_to_require = File.join(load_dir, dirname, filename)
  env_dependent_requirement = File.join(load_dir, dirname, "#{env}_#{filename}")
  require file_to_require if File.exist?(file_to_require)
  require env_dependent_requirement if File.exist?(env_dependent_requirement)
end