cocoapods-bin 0.1.21 → 0.1.22

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: 51cbb730ffaa921ff5aad17ec7d5537e43d977b6085b4be7cbf790db65b2d128
4
- data.tar.gz: d591635037cbb74e971a7d5ed8bd485449765b36f817755ef1ef6c95cde537a0
3
+ metadata.gz: 62860d176c4a7a86c24990e5fd447ef892b591abee25c4d9a179c26bc1a125c4
4
+ data.tar.gz: 535d2e38ae68a5a096cc917ef1b4bd88e560aa4fb36579e6ee37ef07ae2f6f3d
5
5
  SHA512:
6
- metadata.gz: 4fda7fe0adc0b24c1304d9ed570b98ee0d7de5f2786c0ed8675774b865147afb6573b5b5a52a12028df1b2f0aee7ef5b83357ee4cb0c34338468a14cf9f095ff
7
- data.tar.gz: c884716d5edc15cd17b88b430981df10f3dc15c900211a577bd2474a555ea9a38bf659fec6f1b90f7e3515769e87cc6a1d9e9316e7a6cf32fb9be2ae73516507
6
+ metadata.gz: 7453b5fb9cd44625049d12df115b3fe9aa2640e9b88e4b54a914b24b391087c692065331278d287a6399bbcbe8d5dbe545c6c9dd9d8a4548ca74d934a53d38e8
7
+ data.tar.gz: e35de161f71622bd31a149468864f742aff97cdfcd6edc9de5fbcc23ba07bfe232e85dbdb2036bae8e555af31e0153ff984a2a52542cb2a10d7efa8443081bda
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- cocoapods-bin (0.1.21)
4
+ cocoapods-bin (0.1.22)
5
5
  cocoapods (~> 1.4)
6
6
  cocoapods-generate (~> 1.4)
7
7
  parallel
@@ -6,6 +6,7 @@ require 'cocoapods-bin/command/bin/open'
6
6
  require 'cocoapods-bin/command/bin/search'
7
7
  require 'cocoapods-bin/command/bin/list'
8
8
  require 'cocoapods-bin/command/bin/archive'
9
+ require 'cocoapods-bin/command/bin/umbrella'
9
10
  require 'cocoapods-bin/helpers'
10
11
 
11
12
  module Pod
@@ -0,0 +1,49 @@
1
+ module Pod
2
+ class Command
3
+ class Bin < Command
4
+ class Umbrella < Bin
5
+ self.summary = '生成伞头文件 .'
6
+
7
+ self.arguments = [
8
+ CLAide::Argument.new('PATH', false),
9
+ ]
10
+
11
+ def initialize(argv)
12
+ @path = Pathname.new(argv.shift_argument || '.')
13
+ @spec_file = code_spec_files.first
14
+ super
15
+ end
16
+
17
+ def validate!
18
+ super
19
+ help! '[!] No `Podspec` found in the project directory.' if @spec_file.nil?
20
+ end
21
+
22
+ def run
23
+ pod_name = @spec_file.to_s.split('.').first
24
+
25
+ @path += "#{pod_name}.h" if @path.directory?
26
+
27
+ UI.puts "Generateing umbrella file for #{pod_name}"
28
+
29
+ header_generator = Pod::Generator::Header.new(Platform.ios)
30
+ spec = Pod::Specification.from_file(Pathname.new(@spec_file))
31
+ public_header_files = spec.consumer(:ios).public_header_files
32
+ public_header_files = spec.consumer(:ios).source_files if public_header_files.empty?
33
+ public_header_files = Pathname.glob(public_header_files).map(&:basename).select do |pathname|
34
+ pathname.extname.to_s == '.h' &&
35
+ pathname.basename('.h').to_s != pod_name
36
+ end
37
+
38
+ header_generator.imports = public_header_files
39
+
40
+ UI.puts "Save umbrella file to #{@path.expand_path}"
41
+
42
+ header_generator.save_as(@path)
43
+
44
+ UI.puts "Done!".green
45
+ end
46
+ end
47
+ end
48
+ end
49
+ end
@@ -1,5 +1,5 @@
1
1
  module CBin
2
- VERSION = "0.1.21"
2
+ VERSION = "0.1.22"
3
3
  end
4
4
 
5
5
  module Pod
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: cocoapods-bin
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.21
4
+ version: 0.1.22
5
5
  platform: ruby
6
6
  authors:
7
7
  - tripleCC
@@ -111,6 +111,7 @@ files:
111
111
  - lib/cocoapods-bin/command/bin/spec.rb
112
112
  - lib/cocoapods-bin/command/bin/spec/create.rb
113
113
  - lib/cocoapods-bin/command/bin/spec/lint.rb
114
+ - lib/cocoapods-bin/command/bin/umbrella.rb
114
115
  - lib/cocoapods-bin/config/config.rb
115
116
  - lib/cocoapods-bin/config/config_asker.rb
116
117
  - lib/cocoapods-bin/gem_version.rb