Module: Ruboto::Util::Setup
Constant Summary collapse
- REPOSITORY_BASE =
'https://dl-ssl.google.com/android/repository'
- REPOSITORY_URL =
"#{REPOSITORY_BASE}/repository-8.xml"
Instance Method Summary collapse
-
#setup_ruboto(accept_all, api_levels = [SdkVersions::DEFAULT_TARGET_SDK]) ⇒ 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]) ⇒ Object
Core Set up Method
16 17 18 19 20 21 |
# File 'lib/ruboto/util/setup.rb', line 16 def setup_ruboto(accept_all, api_levels = [SdkVersions::DEFAULT_TARGET_SDK]) @platform_sdk_loc = {} api_levels = [project_api_level, *api_levels].compact.uniq install_all(accept_all, api_levels) unless check_all(api_levels) 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
27 28 29 30 31 32 33 34 35 36 |
# File 'lib/ruboto/util/setup.rb', line 27 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}") return exe if File.executable? exe end end nil end |