cocoapods-bin 0.1.21 → 0.1.22
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 +4 -4
- data/Gemfile.lock +1 -1
- data/lib/cocoapods-bin/command/bin.rb +1 -0
- data/lib/cocoapods-bin/command/bin/umbrella.rb +49 -0
- data/lib/cocoapods-bin/gem_version.rb +1 -1
- metadata +2 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 62860d176c4a7a86c24990e5fd447ef892b591abee25c4d9a179c26bc1a125c4
|
4
|
+
data.tar.gz: 535d2e38ae68a5a096cc917ef1b4bd88e560aa4fb36579e6ee37ef07ae2f6f3d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 7453b5fb9cd44625049d12df115b3fe9aa2640e9b88e4b54a914b24b391087c692065331278d287a6399bbcbe8d5dbe545c6c9dd9d8a4548ca74d934a53d38e8
|
7
|
+
data.tar.gz: e35de161f71622bd31a149468864f742aff97cdfcd6edc9de5fbcc23ba07bfe232e85dbdb2036bae8e555af31e0153ff984a2a52542cb2a10d7efa8443081bda
|
data/Gemfile.lock
CHANGED
@@ -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
|
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.
|
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
|