cocoapods-ve 0.0.12 → 0.0.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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 5b1e687ba504aedbcdc44196a8f0570ca7085679a95a11262f9bba51db9091ef
4
- data.tar.gz: 57a895dc6bcb10e068ab2179bbde5143b8a199983b71a114e08f39b8e956bf76
3
+ metadata.gz: 91829cc956633df37b8b405090bf4cf2e8ed8209ed171759f4d59366e13c27f7
4
+ data.tar.gz: a2feee15a53a83fbb61a39ba59cb4600a2555be96f1260a6c829f784619c02fc
5
5
  SHA512:
6
- metadata.gz: 66aeafa326438edb983f025486fce3754d1b48ebe56924a71f21811c5208b594897c0415826ec157ec95e2a3ad1e0ec498ef1b161a5bd4a0db76753b10476ae1
7
- data.tar.gz: 4dfdda0a2f09e929519dab42fbe39ed38fbafdcf5da716d6f3de3a9c66aa6da6fb9be2368aa8a8bb3cbb3cad6b1aa5e3c8869bde14014401fd94387600ccc238
6
+ metadata.gz: e6a30dc2e584192fb9fa126824c6473851ff9a70bf8334693f3baaa41f9a2f625f1ba057ea1783406eaa5e1f7e4cda471db398ec99645190fc7c73eaa73537c8
7
+ data.tar.gz: 2872ee9f36d3ad1b6b729c2bc63b019e50f5539766fd0911e974a142ed8a454f2b56033ae0be99c32ee826b1770c4aaec8cd6888ee809b3d83c26bfd8e0f4f39
@@ -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 :#{@output}"
110
+ File.open(@output,'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
@@ -1 +1 @@
1
- require 'cocoapods-ve/command/ve'
1
+ require 'cocoapods-ve/command/report'
@@ -1,3 +1,5 @@
1
+ # require 'byted-dependency/hook/resolver'
2
+
1
3
  module Pod
2
4
 
3
5
  # The resolver is responsible of generating a list of specifications grouped
@@ -1,3 +1,3 @@
1
1
  module CocoapodsVe
2
- VERSION = "0.0.12"
2
+ VERSION = "0.0.22"
3
3
  end
data/lib/cocoapods-ve.rb CHANGED
@@ -3,3 +3,4 @@ require 'cocoapods-ve/ext/downloader_ext'
3
3
  require 'cocoapods-ve/ext/sources_manager'
4
4
  require 'cocoapods-ve/ext/resolver_ext'
5
5
  require 'cocoapods-ve/ext/requirement_ext'
6
+ require 'cocoapods-ve/command'
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.12
4
+ version: 0.0.22
5
5
  platform: ruby
6
6
  authors:
7
7
  - kyle.zhou
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2021-09-09 00:00:00.000000000 Z
11
+ date: 2022-03-24 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/ve.rb
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.8
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