cocoapods-pahealth-bin 0.0.3 → 0.0.4

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: 289d20bfac5def5a0989035912a4414e76572be944e4d0dded1fdacebc027e5d
4
- data.tar.gz: 87a9ebdce164352588eccc39c080a767f568c0f2cd66a0ca1c10db15d9941571
3
+ metadata.gz: 94a1fea35fcbe57752bef46c23661a3068639783bbb6fa0ecd567c6eb84eb694
4
+ data.tar.gz: 2c9472f051b88873423a2ca004d5a350c997b0e4aa469a1a1669361a322d7730
5
5
  SHA512:
6
- metadata.gz: d97649ac7523edee63b653f6696f67e71f9fcd5ea14a383f8beddd817aa7076aa9d60dce08db0f66168a27bc6baa98cd3cc041a2d6994a72c56a27b97c413762
7
- data.tar.gz: f64d47d0516025c0f7decbe2c1b6a7c4f32354c264b813e41d811e5e05a2144dc3b86838e0822c0a9b2fb13ad67b7751564e40b2854e09c34a41633cec5c8a57
6
+ metadata.gz: f5d8836a8bc3f9e38a0fbc906d65f259932c16a8d39e93d02c01e30bb73b34bf466917affa0c92cc38b12a2d206222cc7d687c2a03043ee71ccc9076609e661e
7
+ data.tar.gz: 20e867d0745fdcf6a0a096c4d3f87a2fd9181a0a86841af28e7e5676db493b4ad9936ea0d9e993b7f3f582769ec065237d53fc50e923bef498f351b6b9153690
@@ -1,5 +1,6 @@
1
1
  require 'cocoapods-pahealth-bin/command/bin/init'
2
2
  require 'cocoapods-pahealth-bin/command/bin/spec'
3
+ require 'cocoapods-pahealth-bin/command/bin/update'
3
4
  require 'cocoapods-pahealth-bin/helpers'
4
5
 
5
6
  module Pod
@@ -0,0 +1,36 @@
1
+ require 'parallel'
2
+
3
+ module Pod
4
+ class Command
5
+ class Bin < Command
6
+ class Repo < Bin
7
+ class Update < Repo
8
+ self.summary = '更新私有源'
9
+
10
+ self.arguments = [
11
+ CLAide::Argument.new('NAME', false)
12
+ ]
13
+
14
+ def self.options
15
+ [
16
+ ['--trunk-repo-update', '更新官方源']
17
+ ].concat(super)
18
+ end
19
+
20
+ def initialize(argv)
21
+ @trunk = argv.flag?('trunk-repo-update',false )
22
+ super
23
+ end
24
+
25
+ def run
26
+ show_output = !config.silent?
27
+ Parallel.each(valid_sources(!@trunk), in_threads: 4) do |source|
28
+ source.update(show_output)
29
+ end
30
+ end
31
+ end
32
+ end
33
+ end
34
+ end
35
+ end
36
+
@@ -0,0 +1,45 @@
1
+ require 'cocoapods-pahealth-bin/command/bin/repo/update'
2
+ require 'cocoapods'
3
+
4
+ module Pod
5
+ class Command
6
+ class Bin < Command
7
+ class Update < Bin
8
+ self.summary = 'pod update私有源'
9
+ self.arguments = [
10
+ CLAide::Argument.new('NAME.podspec', false)
11
+ ]
12
+
13
+ def initialize(argv)
14
+ super
15
+ end
16
+
17
+ def run
18
+ #1.clone Private repo
19
+ clone_private_repo
20
+ #2.执行 pod update --no-repo-update
21
+ pod_update_no_repo_update
22
+ end
23
+
24
+ def clone_private_repo
25
+ argvs = []
26
+ private = Pod::Command::Bin::Repo::Update.new(CLAide::ARGV.new(argvs))
27
+ private.validate!
28
+ private.run
29
+ end
30
+
31
+ def pod_update_no_repo_update
32
+ argvs = [
33
+ "--no-repo-update",
34
+ "--sources=#{sources_option(true, @sources)}"
35
+ ]
36
+ update = Pod::Command::Update.new(CLAide::ARGV.new(argvs))
37
+ update.validate!
38
+ update.run
39
+ end
40
+
41
+ end
42
+ end
43
+ end
44
+ end
45
+
@@ -1,3 +1,3 @@
1
1
  module CocoapodsPahealthBin
2
- VERSION = "0.0.3"
2
+ VERSION = "0.0.4"
3
3
  end
@@ -23,11 +23,10 @@ module CBin
23
23
  # 只允许二进制的 specification subspec 比源码的 specification subspec 多
24
24
  #
25
25
  def valid_sources(code_dependencies = false)
26
- sources = [code_source,trunk_source]
27
- # unless code_dependencies
28
- # sources << binary_source
29
- # sources.reverse!
30
- # end
26
+ sources = [code_source]
27
+ unless code_dependencies
28
+ sources << trunk_source
29
+ end
31
30
  sources
32
31
  end
33
32
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: cocoapods-pahealth-bin
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.3
4
+ version: 0.0.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - GitWangKai
@@ -91,8 +91,10 @@ files:
91
91
  - lib/cocoapods-pahealth-bin/command.rb
92
92
  - lib/cocoapods-pahealth-bin/command/bin.rb
93
93
  - lib/cocoapods-pahealth-bin/command/bin/init.rb
94
+ - lib/cocoapods-pahealth-bin/command/bin/repo/update.rb
94
95
  - lib/cocoapods-pahealth-bin/command/bin/spec.rb
95
96
  - lib/cocoapods-pahealth-bin/command/bin/spec/lint.rb
97
+ - lib/cocoapods-pahealth-bin/command/bin/update.rb
96
98
  - lib/cocoapods-pahealth-bin/config/config.rb
97
99
  - lib/cocoapods-pahealth-bin/config/config_asker.rb
98
100
  - lib/cocoapods-pahealth-bin/gem_version.rb