bytedance 0.1.15 → 0.1.16

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: b0c5f08b6d0ebebad734c325f305387bdaffcdd9
4
- data.tar.gz: 359a42a979b99172a1cc2435ab76dd0c376c71c4
3
+ metadata.gz: 66a7433a4956a13e77d9f3398ab531a0b7c9020e
4
+ data.tar.gz: 2189202ba7835134a4730012668d800fdcbb1081
5
5
  SHA512:
6
- metadata.gz: 271d81fdda87cee1f3147805b27b62480bb41c16e290ef271ca3568aa88c05901bde7a316fc845935d84dc53eccfa35c08e4c82fca900e3a82fbbfbce0915cfe
7
- data.tar.gz: 7820c9e6b5bfc40c24b0df9a786e45e635c3b37222159172f25137f4ed7a989bc0fb1591f9e0bb2a7d089e08c2ed77d7cd1a2511c4e561db098163b2aed71547
6
+ metadata.gz: aa141f9e88b464a4059aed0d4f42aecafc08049ae818ea64b221d6e5291b36509cc6a7e1f9a06a5d94ee20b7cc24c16dae293c29b863749967b5f0cac9bd4d9f
7
+ data.tar.gz: 0137f8d7576282646b028ef603f1aeae3f94cfc5a2fbf2bcc137f0190ee20015fa039d8c1bb04b9a9f277aed4e05befb0c68e3679f903b6502813f3c7a1342c1
@@ -1,3 +1,3 @@
1
1
  module Bytedance
2
- VERSION = "0.1.15"
2
+ VERSION = "0.1.16"
3
3
  end
data/lib/bytedance.rb CHANGED
@@ -47,49 +47,31 @@ class BytedanceManager < CLAide::Command
47
47
  end
48
48
 
49
49
  def initialize(params)
50
- formatParam(params)
50
+ @projectName = params.shift_argument
51
+ @components = params.option('components','optional')
52
+ @prefix = params.option('prefix','TT')
53
+ @platform = params.flag?('platform',true)
51
54
  super
52
55
  end
53
56
 
54
57
  def validate!
55
58
  super
56
59
  if @components && !%w(none optional all).include?(@components)
57
- help! "`#{@components}' is not a valid components."
60
+ help! "`#{@components}' 参数无效,components = none optional 或 all "
58
61
  end
62
+
63
+ if !@projectName
64
+ help! "参数错误,需要输入项目名称,bytedance lib create projectName"
65
+ end
66
+
59
67
  end
60
68
 
61
69
  def run
62
70
  super
63
- finalParams = CLAide::ARGV.new(@arguments)
71
+ parameter = [@projectName,'--components='+ @components,'--prefix=' + @prefix, @platform ? '--platform' : '--no-platform', '--template-url=git@code.byted.org:TTIOS/pod-template.git']
72
+ finalParams = CLAide::ARGV.new(parameter)
64
73
  Pod::Command::Lib::Create.new(finalParams).run
65
74
  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
75
  end
94
76
 
95
77
  class Publish < Lib
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: bytedance
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.15
4
+ version: 0.1.16
5
5
  platform: ruby
6
6
  authors:
7
7
  - jialei