gct 0.2.1 → 0.2.2

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: 5a9f289cba73e4497cb116307acf686f709f7deed589382d7c9d79821c46b758
4
- data.tar.gz: 66d4cb837def2ece3db37da9d2b06613f9c0b3048a2cbe256923140ad36d4204
3
+ metadata.gz: 945850f9d0cef1e2922c214e7159e15d65ca3bfd3845ba31523b44613e705a55
4
+ data.tar.gz: dcee6fa0a83431cea1f8f5a76d12a41f3a110430d535825ef65f8f96589bfb0d
5
5
  SHA512:
6
- metadata.gz: 4667aa38cfdad44d547b45f2b71898b73fa3fe37a6c74ea31a7f4e3c92cdb0abbe78c426893a1d8cbbd59fbac2c34adc400275b7ea9071d5f80cc5a93179059e
7
- data.tar.gz: e5b0870876ed010c4411e00ea477ccbf3a4877b04e15de19c16a106d58c7a4b68c36babd41a707e0d17e2efbea9a3cea2e3fb5983a100a1b3465d648a35f5bb3
6
+ metadata.gz: ace7948bf2be1cd6907febc1d351694aef0fa6e9444eeaf2b016b8dbe62b153b3a0b2c3b648404688d9eac328d78d5956049675628862a8900c56740166e17b8
7
+ data.tar.gz: c4e4256053bf0345d9ba12876bb6c6edd59343e537d9633aeea1d323e806a22642a547131b4139ab5e6f2cf5ff8f3d6fe262645733906b9a7ce71fb84ed8a325
@@ -33,11 +33,11 @@ module Gct
33
33
  end
34
34
 
35
35
  def run
36
- system "pod lib create #{@name} objc --template-url=#{Constant.GitURL}pod-template.git"
36
+ system "pod lib create #{@name} objc --template-url=#{Constant.GitThirdURL}pod-template.git"
37
37
  puts "一个新的oc pod创建成功!".green
38
38
 
39
39
  Dir.chdir(Dir.pwd + '/' + @name) do
40
- system "pod repo push iOSCRGTPodSource --sources=https://gi-dev.ccrgt.com/ios/iOSCRGTPodSource.git --verbose --skip-import-validation --use-libraries --allow-warnings" if @push_spec
40
+ system "pod repo push iOSCRGTPodSource --sources=#{Constant.GitURL}iOSCRGTPodSource.git --verbose --skip-import-validation --use-libraries --allow-warnings" if @push_spec
41
41
  end
42
42
  end
43
43
  end
@@ -33,11 +33,11 @@ module Gct
33
33
  end
34
34
 
35
35
  def run
36
- system "pod lib create #{@name} swift --template-url=#{Constant.GitURL}pod-template"
36
+ system "pod lib create #{@name} swift --template-url=#{Constant.GitThirdURL}pod-template"
37
37
  puts "一个新的swift pod创建成功!".green
38
38
 
39
39
  Dir.chdir(Dir.pwd + '/' + @name) do
40
- system "pod repo push iOSCRGTPodSource --sources=https://gi-dev.ccrgt.com/ios/iOSCRGTPodSource.git --verbose --skip-import-validation --use-libraries --allow-warnings" if @push_spec
40
+ system "pod repo push iOSCRGTPodSource --sources=#{Constant.GitURL}iOSCRGTPodSource.git --verbose --skip-import-validation --use-libraries --allow-warnings" if @push_spec
41
41
  end
42
42
  end
43
43
  end
@@ -48,7 +48,7 @@ module Gct
48
48
  `git clone #{branch} #{@url}`
49
49
  puts "git命令为:<-- git clone #{branch} #{@url} -->".green
50
50
  Dir.chdir(path) do
51
- git_url = "#{Constant.GitURL}#{dir}"
51
+ git_url = "#{Constant.GitThirdURL}#{dir}"
52
52
  `git init`
53
53
  `git remote set-url origin #{git_url}.git`
54
54
  `git add .`
@@ -24,7 +24,22 @@ module Gct
24
24
  end
25
25
 
26
26
  def check_pod_spec
27
+ puts ""
28
+ puts "需要一点时间,请耐心等待".green
27
29
  system "pod spec lint --sources='https://gi-dev.ccrgt.com/ios/iOSCRGTPodSource.git' --use-libraries --allow-warnings"
30
+ Dir.foreach(Dir.pwd) do |file|
31
+ if file.to_s.include?'.podspec'
32
+ IO.foreach(file.to_s) { |line|
33
+ if line.include?("GCT.R")
34
+ puts ""
35
+ puts "[WARNING] 'GCT.R': GCT.R依赖不建议放在podspec中,建议放在podfile中".yellow
36
+ break
37
+ end
38
+ }
39
+ break
40
+ end
41
+ end
42
+
28
43
  end
29
44
  end
30
45
  end
data/lib/gct/constant.rb CHANGED
@@ -1,9 +1,13 @@
1
1
  module Gct
2
2
  module Constant
3
3
  class << self
4
- def GitURL
4
+ def GitThirdURL
5
5
  "https://gi-dev.ccrgt.com/ios-thirdpart/"
6
- end
6
+ end
7
+
8
+ def GitURL
9
+ "https://gi-dev.ccrgt.com/ios/"
10
+ end
7
11
  end
8
12
  end
9
13
  end
data/lib/gct/version.rb CHANGED
@@ -2,5 +2,5 @@ module Gct
2
2
  # freeze 冻结对象,将对象变成一个常量
3
3
  # unless 右边的代码块成立,才会运行左边的代码块
4
4
  # defined? 是用来判断本地变量是否存在,也可用来判断是否存在方法
5
- VERSION = "0.2.1".freeze unless defined? Gct::VERSION
5
+ VERSION = "0.2.2".freeze unless defined? Gct::VERSION
6
6
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: gct
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.1
4
+ version: 0.2.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - jieming
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2020-05-09 00:00:00.000000000 Z
11
+ date: 2020-05-11 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler