class PhoneGap::Build::Credentials
Attributes
config[R]
password[R]
token[RW]
username[R]
Public Instance Methods
load()
click to toggle source
# File lib/phone_gap/build/credentials.rb, line 19 def load if config_file && File.exists?(config_file) @config = YAML::load(ERB.new(File.read(config_file)).result) @token = @config['token'] end self end
set(credentials)
click to toggle source
# File lib/phone_gap/build/credentials.rb, line 12 def set(credentials) @username = credentials[:username] @password = credentials[:password] @token = credentials[:token] self end
Private Instance Methods
config_file()
click to toggle source
# File lib/phone_gap/build/credentials.rb, line 29 def config_file if ENV['BUNDLE_GEMFILE'] application_root = ENV['BUNDLE_GEMFILE'].gsub('Gemfile', '') File.expand_path(File.join(application_root, 'config', 'phonegap.yml'), __FILE__) else false end end