bytedance 0.1.14 → 0.1.15
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/bin/bytedance +1 -1
- data/lib/bytedance.rb +115 -45
- data/lib/bytedance/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: b0c5f08b6d0ebebad734c325f305387bdaffcdd9
|
4
|
+
data.tar.gz: 359a42a979b99172a1cc2435ab76dd0c376c71c4
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 271d81fdda87cee1f3147805b27b62480bb41c16e290ef271ca3568aa88c05901bde7a316fc845935d84dc53eccfa35c08e4c82fca900e3a82fbbfbce0915cfe
|
7
|
+
data.tar.gz: 7820c9e6b5bfc40c24b0df9a786e45e635c3b37222159172f25137f4ed7a989bc0fb1591f9e0bb2a7d089e08c2ed77d7cd1a2511c4e561db098163b2aed71547
|
data/bin/bytedance
CHANGED
data/lib/bytedance.rb
CHANGED
@@ -1,47 +1,117 @@
|
|
1
|
-
|
2
|
-
|
1
|
+
# encoding: utf-8
|
2
|
+
|
3
|
+
require 'claide'
|
4
|
+
require 'colored'
|
3
5
|
require 'cocoapods'
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
6
|
+
|
7
|
+
class BytedanceManager < CLAide::Command
|
8
|
+
self.abstract_command = true
|
9
|
+
|
10
|
+
self.description = <<-DESC
|
11
|
+
|
12
|
+
DESC
|
13
|
+
|
14
|
+
self.command = 'bytedance'
|
15
|
+
|
16
|
+
def self.options
|
17
|
+
[
|
18
|
+
|
19
|
+
].concat(super)
|
20
|
+
end
|
21
|
+
|
22
|
+
def run
|
23
|
+
|
24
|
+
end
|
25
|
+
|
26
|
+
class Lib < BytedanceManager
|
27
|
+
|
28
|
+
self.abstract_command = true
|
29
|
+
self.summary = ''
|
30
|
+
|
31
|
+
self.description = <<-DESC
|
32
|
+
|
33
|
+
DESC
|
34
|
+
|
35
|
+
def run
|
36
|
+
super
|
37
|
+
|
38
|
+
end
|
39
|
+
|
40
|
+
class Create < Lib
|
41
|
+
self.summary = ''
|
42
|
+
|
43
|
+
def self.options
|
44
|
+
[['--platform', '是否引入平台基础库,默认引入,不引入使用--no-platform'],
|
45
|
+
['--components=[none|optional|all]', 'none 不引入任何组件,optional 选择自己想要的(default), all 引入全部组件,于平台一致'],
|
46
|
+
['--prefix', '可选,默认 prefix = TT']].concat(super)
|
47
|
+
end
|
48
|
+
|
49
|
+
def initialize(params)
|
50
|
+
formatParam(params)
|
51
|
+
super
|
52
|
+
end
|
53
|
+
|
54
|
+
def validate!
|
55
|
+
super
|
56
|
+
if @components && !%w(none optional all).include?(@components)
|
57
|
+
help! "`#{@components}' is not a valid components."
|
58
|
+
end
|
59
|
+
end
|
60
|
+
|
61
|
+
def run
|
62
|
+
super
|
63
|
+
finalParams = CLAide::ARGV.new(@arguments)
|
64
|
+
Pod::Command::Lib::Create.new(finalParams).run
|
65
|
+
end
|
66
|
+
|
67
|
+
def formatParam(params)
|
68
|
+
@arguments = params.arguments
|
69
|
+
@arguments.insert(0,params.shift_argument)
|
70
|
+
if params.flag?('platform') == nil
|
71
|
+
addParam('--platform')
|
72
|
+
end
|
73
|
+
@components = params.option('components')
|
74
|
+
if @components == nil
|
75
|
+
addParam('--components=optional')
|
76
|
+
end
|
77
|
+
|
78
|
+
if params.option('prefix') == nil
|
79
|
+
puts "输入prfix:"
|
80
|
+
result = STDIN.gets.chomp
|
81
|
+
if result == nil
|
82
|
+
result = "TT"
|
83
|
+
end
|
84
|
+
addParam('--prefix=' + result)
|
85
|
+
end
|
86
|
+
addParam('--template-url=git@code.byted.org:jialei.jay/pod-template.git')
|
87
|
+
end
|
88
|
+
|
89
|
+
def addParam(param)
|
90
|
+
@arguments.insert(1,param)
|
91
|
+
end
|
92
|
+
|
93
|
+
end
|
94
|
+
|
95
|
+
class Publish < Lib
|
96
|
+
self.summary = ''
|
97
|
+
|
98
|
+
def self.options
|
99
|
+
[['--iced', 'the ice-tea version']].concat(super)
|
100
|
+
end
|
101
|
+
|
102
|
+
def initialize(argv)
|
103
|
+
@flavor = argv.shift_argument
|
104
|
+
@iced = argv.flag?('iced')
|
105
|
+
super
|
106
|
+
end
|
107
|
+
|
108
|
+
def run
|
109
|
+
super
|
110
|
+
|
111
|
+
end
|
112
|
+
end
|
113
|
+
|
114
|
+
end
|
115
|
+
|
47
116
|
end
|
117
|
+
|
data/lib/bytedance/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: bytedance
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.15
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- jialei
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2018-05-
|
11
|
+
date: 2018-05-04 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|