class Pod::Setting
Attributes
host[RW]
password[RW]
repo[RW]
suffix[RW]
user[RW]
Public Class Methods
new(parameters={})
click to toggle source
# File lib/cocoapods-uploader/command/maven/config.rb, line 7 def initialize(parameters={}) parameters = {'suffix'=>"/artifactory/service/local/repositories/+repo+/content/"}.merge(parameters) @host = parameters['host'] @repo = parameters['repo'] @user = parameters['user'] @password = parameters['password'] @suffix = parameters['suffix'] end
Public Instance Methods
==(other)
click to toggle source
# File lib/cocoapods-uploader/command/maven/config.rb, line 47 def == other to_hash == other.to_hash end
open()
click to toggle source
# File lib/cocoapods-uploader/command/maven/config.rb, line 16 def open path = "#{Pod::Config.instance.home_dir}/maven.yml" if File.exist?(path) config = YAML.load_file(path) @host = config['host'] @repo = config['repo'] @user = config['user'] @password = config['password'] @suffix = config['suffix'] end end
save()
click to toggle source
# File lib/cocoapods-uploader/command/maven/config.rb, line 28 def save path = "#{Pod::Config.instance.home_dir}/maven.yml" File.open(path, "w+") do |file| config = {'host'=>host,'repo'=>repo,'user'=>user,'password'=>password,'suffix'=>suffix} file.puts(config.to_yaml) end end
to_hash()
click to toggle source
# File lib/cocoapods-uploader/command/maven/config.rb, line 37 def to_hash hash = {} hash['host'] = host hash['repo'] = repo hash['user'] = user hash['password'] = password hash['suffix'] = suffix hash end