Module: Ruboto::Util::Setup
Constant Summary collapse
- REPOSITORY_BASE =
'http://dl-ssl.google.com/android/repository'
- REPOSITORY_URL =
"#{REPOSITORY_BASE}/repository-10.xml"
- ADDONS_URL =
"#{REPOSITORY_BASE}/extras/intel/addon.xml"
- SDK_DOWNLOAD_PAGE =
'https://developer.android.com/studio/index.html'
- RUBOTO_GEM_ROOT =
File. '../../../..', __FILE__
- WINDOWS_ELEVATE_CMD =
"#{RUBOTO_GEM_ROOT}/bin/elevate_32.exe -c -w"
Constants included from Verify
Instance Method Summary collapse
-
#setup_ruboto(accept_all, api_levels = [SdkVersions::DEFAULT_TARGET_SDK], upgrade_haxm = false) ⇒ Object
Core Set up Method.
-
#which(cmd) ⇒ Object
OS independent “which” From: stackoverflow.com/questions/2108727/which-in-ruby-checking-if-program-exists-in-path-from-ruby.
Methods included from Verify
#project_api_level, #project_properties, #save_manifest, #save_ruboto_config, #save_test_manifest, #verify_activity, #verify_api, #verify_manifest, #verify_min_sdk, #verify_package, #verify_project_properties, #verify_ruboto_config, #verify_sdk_versions, #verify_strings, #verify_target_sdk, #verify_test_manifest
Instance Method Details
#setup_ruboto(accept_all, api_levels = [SdkVersions::DEFAULT_TARGET_SDK], upgrade_haxm = false) ⇒ Object
Core Set up Method
21 22 23 24 25 26 |
# File 'lib/ruboto/util/setup.rb', line 21 def setup_ruboto(accept_all, api_levels = [SdkVersions::DEFAULT_TARGET_SDK], upgrade_haxm = false) @platform_sdk_loc = {} api_levels = [project_api_level, *api_levels].compact.uniq install_all(accept_all, api_levels, upgrade_haxm) unless check_all(api_levels, upgrade_haxm) config_path(accept_all) end |
#which(cmd) ⇒ Object
OS independent “which” From: stackoverflow.com/questions/2108727/which-in-ruby-checking-if-program-exists-in-path-from-ruby
32 33 34 35 36 37 38 39 40 41 42 43 44 |
# File 'lib/ruboto/util/setup.rb', line 32 def which(cmd) exts = ENV['PATHEXT'] ? ENV['PATHEXT'].split(';') : [''] ENV['PATH'].split(File::PATH_SEPARATOR).each do |path| exts.each do |ext| exe = File.join(path, "#{cmd}#{ext}") if File.executable?(exe) and not File.directory?(exe) exe.gsub!('\\', '/') if windows? return exe end end end nil end |