class BotConfig
Public Class Methods
new()
click to toggle source
# File lib/bot_config.rb, line 7 def initialize @filename = File.expand_path('~/.bot-sync-github.cfg') if (!File.exists? @filename) $stderr.puts "Missing configuration file #{@filename}" exit 1 end @config = ParseConfig.new(@filename) # Make sure every param is configured properly since param will throw an error for a missing key [:xcode_server, :github_url, :github_repo, :github_access_token, :xcode_devices, :xcode_scheme, :xcode_project_or_workspace].each do |key| param key end end
Public Instance Methods
github_access_token()
click to toggle source
# File lib/bot_config.rb, line 26 def github_access_token param :github_access_token end
github_repo()
click to toggle source
# File lib/bot_config.rb, line 34 def github_repo param :github_repo end
param(key)
click to toggle source
# File lib/bot_config.rb, line 50 def param(key) value = @config[key.to_s] if (value.nil?) $stderr.puts "Missing configuration key #{key} in #{@filename}" exit 1 end value end
scm_path()
click to toggle source
# File lib/bot_config.rb, line 30 def scm_path param :github_url end
xcode_devices()
click to toggle source
# File lib/bot_config.rb, line 38 def xcode_devices param(:xcode_devices).split('|') end
xcode_project_or_workspace()
click to toggle source
# File lib/bot_config.rb, line 46 def xcode_project_or_workspace param :xcode_project_or_workspace end
xcode_scheme()
click to toggle source
# File lib/bot_config.rb, line 42 def xcode_scheme param :xcode_scheme end
xcode_server_hostname()
click to toggle source
# File lib/bot_config.rb, line 22 def xcode_server_hostname param :xcode_server end