cocoapods-aomi-bin 0.0.5 → 0.0.6
Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: e89d1160267cbaca0726951d62739924145ad03acf6b2c8841b728fe2fa15ecb
|
4
|
+
data.tar.gz: de326cca1219934abcc1b23e6bde7a82747fb605c54c67f38542d437df194797
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 2d95cd0bb9a8c9cd9ede100eb9dab67e7ccdc9f4393852c9c0a98fa6d31c2082303a61840a2b23503db3a872a169b1fd0a04debba5a476ce71a3e2033d2778b4
|
7
|
+
data.tar.gz: cb71472ec07895dfdd8499d0a1a571c54ca35210c2c335160b1a5f2375a5626b0263da28f0bd2be575108bc2d0d5995fc65cb0bb48eeaabd467daccaa6aa6fc4
|
@@ -6,6 +6,7 @@ require 'cocoapods-lhj-bin/command/bin/code'
|
|
6
6
|
require 'cocoapods-lhj-bin/command/bin/update'
|
7
7
|
require 'cocoapods-lhj-bin/command/bin/install'
|
8
8
|
require 'cocoapods-lhj-bin/command/bin/import'
|
9
|
+
require 'cocoapods-lhj-bin/command/bin/local'
|
9
10
|
require 'cocoapods-lhj-bin/command/bin/lhj'
|
10
11
|
require 'cocoapods-lhj-bin/helpers'
|
11
12
|
require 'cocoapods-lhj-bin/native'
|
@@ -35,7 +36,6 @@ module Pod
|
|
35
36
|
|
36
37
|
self.abstract_command = true
|
37
38
|
|
38
|
-
self.default_subcommand = 'open'
|
39
39
|
self.summary = '组件二进制化插件.'
|
40
40
|
self.description = <<-DESC
|
41
41
|
组件二进制化插件。利用源码私有源与二进制私有源实现对组件依赖类型的切换。
|
@@ -0,0 +1,55 @@
|
|
1
|
+
require 'csv'
|
2
|
+
|
3
|
+
module Pod
|
4
|
+
class Command
|
5
|
+
class Bin < Command
|
6
|
+
class Local < Bin
|
7
|
+
self.summary = '国际化文件变更'
|
8
|
+
|
9
|
+
def initialize(argv)
|
10
|
+
@current_path = argv.shift_argument || Dir.pwd
|
11
|
+
@key_map = {}
|
12
|
+
super
|
13
|
+
end
|
14
|
+
|
15
|
+
def run
|
16
|
+
read_csv_file
|
17
|
+
write_en_strings
|
18
|
+
write_zh_hans_strings
|
19
|
+
end
|
20
|
+
|
21
|
+
def read_csv_file
|
22
|
+
path = "#{@current_path}/b_lvr_land_a_land.csv"
|
23
|
+
CSV.foreach(path) { |row| @key_map[row[0]] = { zh: row[1], en: row[3] } unless row[0] =~ /[\u4e00-\u9fa5]/ }
|
24
|
+
end
|
25
|
+
|
26
|
+
def file_str(type)
|
27
|
+
str = ''
|
28
|
+
@key_map.each do |k, v|
|
29
|
+
str += "\"#{k}\" = \"#{v[type]}\";\n"
|
30
|
+
end
|
31
|
+
str
|
32
|
+
end
|
33
|
+
|
34
|
+
def write_to_file(file, type)
|
35
|
+
FileUtils.rm_rf(file) if File.exist?(file)
|
36
|
+
File.open(file, 'w+') do |f|
|
37
|
+
str = file_str(type)
|
38
|
+
f.write(str)
|
39
|
+
end
|
40
|
+
end
|
41
|
+
|
42
|
+
def write_en_strings
|
43
|
+
file = "#{@current_path}/Main_en.strings"
|
44
|
+
write_to_file(file, :en)
|
45
|
+
end
|
46
|
+
|
47
|
+
def write_zh_hans_strings
|
48
|
+
file = "#{@current_path}/Main_zh_hans.strings"
|
49
|
+
write_to_file(file, :zh)
|
50
|
+
end
|
51
|
+
|
52
|
+
end
|
53
|
+
end
|
54
|
+
end
|
55
|
+
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: cocoapods-aomi-bin
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.6
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- lihaijian
|
@@ -116,6 +116,7 @@ files:
|
|
116
116
|
- lib/cocoapods-lhj-bin/command/bin/install.rb
|
117
117
|
- lib/cocoapods-lhj-bin/command/bin/lhj.rb
|
118
118
|
- lib/cocoapods-lhj-bin/command/bin/lib/lint.rb
|
119
|
+
- lib/cocoapods-lhj-bin/command/bin/local.rb
|
119
120
|
- lib/cocoapods-lhj-bin/command/bin/repo/update.rb
|
120
121
|
- lib/cocoapods-lhj-bin/command/bin/spec/create.rb
|
121
122
|
- lib/cocoapods-lhj-bin/command/bin/spec/push.rb
|