Class: Pod::Command::Bin::Init::Push
Instance Method Summary
collapse
options
#validate!
#binary_spec, #binary_spec_files, #binary_template_spec, #binary_template_spec_file, #binary_template_spec_files, #clear_binary_spec_file_if_needed, #code_spec, #code_spec_files, #create_binary_spec_file, #find_spec_file, #spec_files
#binary_source, #code_source, #sources_manager, #sources_option, #valid_sources
Constructor Details
#initialize(argv) ⇒ Push
Returns a new instance of Push.
12
13
14
|
# File 'lib/cocoapods-lhj-bin/command/bin/config/push.rb', line 12
def initialize(argv)
super
end
|
Instance Method Details
#push ⇒ Object
25
26
27
28
|
# File 'lib/cocoapods-lhj-bin/command/bin/config/push.rb', line 25
def push
file = File.expand_path("#{Pod::Config.instance.home_dir}/bin_dev.yml")
CBin::OSS::Helper.instance.upload('bin_dev.yml', file)
end
|
#push_cn_hk ⇒ Object
20
21
22
23
|
# File 'lib/cocoapods-lhj-bin/command/bin/config/push.rb', line 20
def push_cn_hk
file = File.expand_path("#{Pod::Config.instance.home_dir}/localizable_config.yml")
CBin::OSS::Helper.instance.upload('localizable_config.yml', file)
end
|
#run ⇒ Object
16
17
18
|
# File 'lib/cocoapods-lhj-bin/command/bin/config/push.rb', line 16
def run
push
end
|
#trans ⇒ Object
30
31
32
33
34
35
36
37
38
39
40
41
42
|
# File 'lib/cocoapods-lhj-bin/command/bin/config/push.rb', line 30
def trans
key_map = {}
path = '/Users/lihaijian/workspace/cocoa/cocoapods-lhj-bin-build-temp/zh2Hant.properties'
File.open(path, 'r+') do |f|
f.each_line do |line|
arr = line.split('=')
key = [arr[0][2, 4].hex].pack("U")
val = arr[1].strip!
key_map[key] = [val[2, 4].hex].pack("U")
end
end
File.open('/Users/lihaijian/workspace/cocoa/cocoapods-lhj-bin-build-temp/zh2hant.yml', 'w') { |f| f.write key_map.to_yaml }
end
|