cocoapods-ve 0.0.12 → 0.0.20
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/lib/cocoapods-ve/command/report.rb +122 -0
- data/lib/cocoapods-ve/command.rb +1 -1
- data/lib/cocoapods-ve/ext/resolver_ext.rb +2 -0
- data/lib/cocoapods-ve/gem_version.rb +1 -1
- data/lib/cocoapods-ve.rb +1 -0
- metadata +4 -4
- data/lib/cocoapods-ve/command/ve.rb +0 -44
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 78346ce53c484940cb8b06df643342fc2a8fce63fee9f3469e467b73aac6b4a6
|
4
|
+
data.tar.gz: 502932d88039e14c07018ca12892006387630bdb236d4475ba9d918bd45b8ec8
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d2e7c51a6f88a72c1db823130dd52ef497e6e0f347be3d5c324203e21c7909973a053e6c2e43ab284d5559165f0bdec3905fa6b90da23b27979b894359bb6700
|
7
|
+
data.tar.gz: 88457275167d9938d95a7ddee773f832d40b4ead38e168c63f0287472470bf0fd393320692fa57bc8ddee0c673644140594e2f955af7d6a819b72b419b3f93e9
|
@@ -0,0 +1,122 @@
|
|
1
|
+
module Pod
|
2
|
+
class Command
|
3
|
+
# This is an example of a cocoapods plugin adding a top-level subcommand
|
4
|
+
# to the 'pod' command.
|
5
|
+
#
|
6
|
+
# You can also create subcommands of existing or new commands. Say you
|
7
|
+
# wanted to add a subcommand to `list` to show newly deprecated pods,
|
8
|
+
# (e.g. `pod list deprecated`), there are a few things that would need
|
9
|
+
# to change.
|
10
|
+
#
|
11
|
+
# - move this file to `lib/pod/command/list/deprecated.rb` and update
|
12
|
+
# the class to exist in the the Pod::Command::List namespace
|
13
|
+
# - change this class to extend from `List` instead of `Command`. This
|
14
|
+
# tells the plugin system that it is a subcommand of `list`.
|
15
|
+
# - edit `lib/cocoapods_plugins.rb` to require this file
|
16
|
+
#
|
17
|
+
# @todo Create a PR to add your plugin to CocoaPods/cocoapods.org
|
18
|
+
# in the `plugins.json` file, once your plugin is released.
|
19
|
+
#
|
20
|
+
class Report < Command
|
21
|
+
self.summary = 'report extern source spec depend files.'
|
22
|
+
|
23
|
+
self.description = <<-DESC
|
24
|
+
Longer description of cocoapods-ve.
|
25
|
+
DESC
|
26
|
+
|
27
|
+
self.arguments = [
|
28
|
+
]
|
29
|
+
def self.options
|
30
|
+
[
|
31
|
+
['--platform', 'select platform'],
|
32
|
+
['--podspec', 'select podspec'],
|
33
|
+
['--subspec', 'select subspec'],
|
34
|
+
['--output', 'set output path']
|
35
|
+
]
|
36
|
+
end
|
37
|
+
def initialize(argv)
|
38
|
+
@output = argv.option('output', nil )
|
39
|
+
|
40
|
+
@platform = argv.option('platform', :ios)
|
41
|
+
@podspec = argv.option('podspec', nil )
|
42
|
+
if not @podspec
|
43
|
+
@podspec = Dir.glob(FileUtils.pwd.to_s + '/**.podspec')
|
44
|
+
if @podspec.length > 1
|
45
|
+
@podspec = @podspec[0]
|
46
|
+
UI.puts "Multiple PodSpecs found, the first is selected by default:"+@podspec
|
47
|
+
elsif @podspec.length == 0
|
48
|
+
UI.puts "No PodSpecs found, "
|
49
|
+
exit(1)
|
50
|
+
end
|
51
|
+
end
|
52
|
+
@podspec = Pathname.new(@podspec)
|
53
|
+
@subspec = argv.option('subspec', nil )
|
54
|
+
if @subspec
|
55
|
+
@subspec = @subspec.split(',')
|
56
|
+
else
|
57
|
+
@subspec = []
|
58
|
+
end
|
59
|
+
super
|
60
|
+
end
|
61
|
+
|
62
|
+
def validate!
|
63
|
+
super
|
64
|
+
# help! 'A Pod name is required.' unless @specname
|
65
|
+
end
|
66
|
+
|
67
|
+
def fetch_dependencies(subspec,fileAccessors)
|
68
|
+
if @root_spec.name == Specification.root_name(subspec)
|
69
|
+
subspec = @root_spec.subspec_by_name(subspec)
|
70
|
+
else
|
71
|
+
return
|
72
|
+
end
|
73
|
+
|
74
|
+
if not fileAccessors[subspec.name]
|
75
|
+
|
76
|
+
fileAccessors[subspec.name] = Sandbox::FileAccessor.new(@root_path_list, subspec.consumer(@platform))
|
77
|
+
dependencies = subspec.dependencies
|
78
|
+
for depend in dependencies
|
79
|
+
fetch_dependencies depend.name,fileAccessors
|
80
|
+
end
|
81
|
+
else
|
82
|
+
return
|
83
|
+
end
|
84
|
+
end
|
85
|
+
def run
|
86
|
+
|
87
|
+
@root_spec = Specification.from_file(@podspec)
|
88
|
+
@root_path_list = Sandbox::PathList.new(@podspec.dirname)
|
89
|
+
|
90
|
+
file_accessors={}
|
91
|
+
files = []
|
92
|
+
if @subspec.length > 0
|
93
|
+
for subspecName in @subspec
|
94
|
+
fetch_dependencies(@root_spec.name+'/'+subspecName,file_accessors)
|
95
|
+
end
|
96
|
+
end
|
97
|
+
|
98
|
+
i=0
|
99
|
+
while i < file_accessors.values.length
|
100
|
+
file_accessor = file_accessors.values[i]
|
101
|
+
files.concat file_accessor.source_files
|
102
|
+
files.concat file_accessor.resources
|
103
|
+
files.concat file_accessor.developer_files
|
104
|
+
i += 1
|
105
|
+
end
|
106
|
+
files.uniq!
|
107
|
+
if @output
|
108
|
+
if Pathname.new(@output).parent.exist?
|
109
|
+
puts "write result to :"+log_file
|
110
|
+
File.open(log_file,'w+') do |file|
|
111
|
+
files.each { |file_name| file.puts(file_name.to_s) }
|
112
|
+
end
|
113
|
+
else
|
114
|
+
files.each { |file_name| puts(file_name.to_s) }
|
115
|
+
end
|
116
|
+
else
|
117
|
+
files.each { |file_name| puts(file_name.to_s) }
|
118
|
+
end
|
119
|
+
end
|
120
|
+
end
|
121
|
+
end
|
122
|
+
end
|
data/lib/cocoapods-ve/command.rb
CHANGED
@@ -1 +1 @@
|
|
1
|
-
require 'cocoapods-ve/command/
|
1
|
+
require 'cocoapods-ve/command/report'
|
data/lib/cocoapods-ve.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: cocoapods-ve
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.20
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- kyle.zhou
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2022-03-21 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -67,7 +67,7 @@ files:
|
|
67
67
|
- cocoapods-ve.gemspec
|
68
68
|
- lib/cocoapods-ve.rb
|
69
69
|
- lib/cocoapods-ve/command.rb
|
70
|
-
- lib/cocoapods-ve/command/
|
70
|
+
- lib/cocoapods-ve/command/report.rb
|
71
71
|
- lib/cocoapods-ve/ext/downloader_ext.rb
|
72
72
|
- lib/cocoapods-ve/ext/requirement_ext.rb
|
73
73
|
- lib/cocoapods-ve/ext/resolver_ext.rb
|
@@ -95,7 +95,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
95
95
|
- !ruby/object:Gem::Version
|
96
96
|
version: '0'
|
97
97
|
requirements: []
|
98
|
-
rubygems_version: 3.0.
|
98
|
+
rubygems_version: 3.0.9
|
99
99
|
signing_key:
|
100
100
|
specification_version: 4
|
101
101
|
summary: A longer description of cocoapods-ve.
|
@@ -1,44 +0,0 @@
|
|
1
|
-
module Pod
|
2
|
-
class Command
|
3
|
-
# This is an example of a cocoapods plugin adding a top-level subcommand
|
4
|
-
# to the 'pod' command.
|
5
|
-
#
|
6
|
-
# You can also create subcommands of existing or new commands. Say you
|
7
|
-
# wanted to add a subcommand to `list` to show newly deprecated pods,
|
8
|
-
# (e.g. `pod list deprecated`), there are a few things that would need
|
9
|
-
# to change.
|
10
|
-
#
|
11
|
-
# - move this file to `lib/pod/command/list/deprecated.rb` and update
|
12
|
-
# the class to exist in the the Pod::Command::List namespace
|
13
|
-
# - change this class to extend from `List` instead of `Command`. This
|
14
|
-
# tells the plugin system that it is a subcommand of `list`.
|
15
|
-
# - edit `lib/cocoapods_plugins.rb` to require this file
|
16
|
-
#
|
17
|
-
# @todo Create a PR to add your plugin to CocoaPods/cocoapods.org
|
18
|
-
# in the `plugins.json` file, once your plugin is released.
|
19
|
-
#
|
20
|
-
class Ve < Command
|
21
|
-
self.summary = 'Short description of cocoapods-ve.'
|
22
|
-
|
23
|
-
self.description = <<-DESC
|
24
|
-
Longer description of cocoapods-ve.
|
25
|
-
DESC
|
26
|
-
|
27
|
-
self.arguments = []
|
28
|
-
|
29
|
-
def initialize(argv)
|
30
|
-
@name = argv.shift_argument
|
31
|
-
super
|
32
|
-
end
|
33
|
-
|
34
|
-
def validate!
|
35
|
-
super
|
36
|
-
help! 'A Pod name is required.' unless @name
|
37
|
-
end
|
38
|
-
|
39
|
-
def run
|
40
|
-
UI.puts "Add your implementation for the cocoapods-ve plugin in #{__FILE__}"
|
41
|
-
end
|
42
|
-
end
|
43
|
-
end
|
44
|
-
end
|