cocoapods-bin 0.1.9 → 0.1.10

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: 902f182e8ae9120fa4b571887eafae385c120bff
4
- data.tar.gz: 47f9faa87c0761830482b659753ef4d897e1f720
3
+ metadata.gz: f7e7004742f0706b39361c49ccb6514cb2403e4c
4
+ data.tar.gz: 57ddc9568893b8267091a0d8a7635203e7ba34fd
5
5
  SHA512:
6
- metadata.gz: 302b89b97b2f60d2717945dbb9d5f86e5d72ca34180839b5c79415b91d59b147192918083c0e129ef6ad12ce72d9c28926377c9962b2551f86893c1056db3afd
7
- data.tar.gz: 101d2e031114643a146d4aea505b594a5ee5cc38233a86a55d896dc11ccf96ae5365ef2353d0f759260e072ffb5b126c31512cbdc00b7a56de9a572d84c07603
6
+ metadata.gz: fca94fe628bbbeb5169886a82ff851d32f463337e2ed6fc5ee575ed1edb511642bda1eef905cba0fe1c72e57a390e2dda6988b1d1f4725567f457beccf60cc30
7
+ data.tar.gz: 259a3dfe774bdff6592b630eb36c594acda9137a8512b223a199e36a89b1991a133334654faec1f8d18a1ffc313484257845aac3ad4528ae259b46f3c9b93b01
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- cocoapods-bin (0.1.9)
4
+ cocoapods-bin (0.1.10)
5
5
  cocoapods (~> 1.4)
6
6
  parallel
7
7
 
@@ -68,7 +68,7 @@ GEM
68
68
  nanaimo (0.2.6)
69
69
  nap (1.1.0)
70
70
  netrc (0.11.0)
71
- parallel (1.13.0)
71
+ parallel (1.14.0)
72
72
  prettybacon (0.0.2)
73
73
  bacon (~> 1.2)
74
74
  rake (12.3.2)
@@ -1,5 +1,5 @@
1
1
  module CBin
2
- VERSION = "0.1.9"
2
+ VERSION = "0.1.10"
3
3
  end
4
4
 
5
5
  module Pod
@@ -35,7 +35,7 @@ module Pod
35
35
  # 并发更新私有源
36
36
  # 这里多线程会导致 pod update 额外输出 --verbose 的内容
37
37
  # 不知道为什么?
38
- Parallel.each(sources, in_processes: 4) do |source|
38
+ Parallel.each(sources.uniq { |s| s.url }, in_processes: 4) do |source|
39
39
  if source.git?
40
40
  config.sources_manager.update(source.name, true)
41
41
  else
data/lib/cocoapods-bin.rb CHANGED
@@ -1,2 +1,47 @@
1
1
  require 'cocoapods-bin/gem_version'
2
2
  require 'cocoapods-bin/native/sources_manager'
3
+
4
+
5
+ p '============='
6
+ p '============='
7
+ module Pod
8
+ class Command
9
+ class Update < Command
10
+ def initialize(argv)
11
+ @pods = argv.arguments! unless argv.arguments.empty?
12
+
13
+ p config.lockfile
14
+
15
+ source_urls = argv.option('sources', '').split(',')
16
+ excluded_pods = argv.option('exclude-pods', '').split(',')
17
+ unless source_urls.empty?
18
+ source_pods = source_urls.flat_map { |url| config.sources_manager.source_with_name_or_url(url).pods }
19
+ unless source_pods.empty?
20
+ source_pods = source_pods.select { |pod| config.lockfile.pod_names.include?(pod) }
21
+ if @pods
22
+ @pods += source_pods
23
+ else
24
+ @pods = source_pods unless source_pods.empty?
25
+ end
26
+ end
27
+ end
28
+
29
+ unless excluded_pods.empty?
30
+ @pods ||= config.lockfile.pod_names.dup
31
+
32
+ non_installed_pods = (excluded_pods - @pods)
33
+ unless non_installed_pods.empty?
34
+ pluralized_words = non_installed_pods.length > 1 ? %w(Pods are) : %w(Pod is)
35
+ message = "Trying to skip `#{non_installed_pods.join('`, `')}` #{pluralized_words.first} " \
36
+ "which #{pluralized_words.last} not installed"
37
+ raise Informative, message
38
+ end
39
+
40
+ @pods.delete_if { |pod| excluded_pods.include?(pod) }
41
+ end
42
+
43
+ super
44
+ end
45
+ end
46
+ end
47
+ end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: cocoapods-bin
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.9
4
+ version: 0.1.10
5
5
  platform: ruby
6
6
  authors:
7
7
  - tripleCC
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2019-02-25 00:00:00.000000000 Z
11
+ date: 2019-03-07 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: parallel