cocoapods-packager-ext 0.0.9 → 0.0.15
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/cocoapods-packager-ext.gemspec +2 -1
- data/lib/cocoapods-packager-ext/command/install_ext.rb +70 -45
- data/lib/cocoapods-packager-ext/command/package_ext.rb +17 -7
- data/lib/cocoapods-packager-ext/ext/builder.rb +6 -2
- data/lib/cocoapods-packager-ext/ext/downloader/lnpath.rb +19 -0
- data/lib/cocoapods-packager-ext/ext/downloader_ext.rb +38 -0
- data/lib/cocoapods-packager-ext/gem_version.rb +1 -1
- metadata +9 -7
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 8c9348a830f7157f3b0331be8528d62167b0fc2e57de1e303cd8302a83fab703
|
4
|
+
data.tar.gz: 68acb37a1efc18f3e97dd44e5b49f39d2771b1360cbfeeabacc5480f64d8d1f9
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d57083f40c95d0f75d4045605c877873eb1ebda93685bcdb51d2c7ffe4f0315daf9283ecb5d7d52091bd6ca387dd69ba815f46116d514f51d57b13d88d6ebb79
|
7
|
+
data.tar.gz: a332c19502173bda40694c68879807d4b054ef3b67b1374d226690d3267934f64c0d7e81b642df33f5028f6ace91f25f1104c326affad33b650b54630f43ec4b
|
@@ -20,5 +20,6 @@ Gem::Specification.new do |spec|
|
|
20
20
|
|
21
21
|
spec.add_development_dependency 'bundler', '~> 1.3'
|
22
22
|
spec.add_development_dependency 'rake'
|
23
|
-
spec.
|
23
|
+
spec.add_runtime_dependency(%q<cocoapods-packager>.freeze,["1.5.0"])
|
24
|
+
|
24
25
|
end
|
@@ -6,6 +6,7 @@ module Pod
|
|
6
6
|
if @dry_deps
|
7
7
|
prepare
|
8
8
|
resolve_dependencies
|
9
|
+
exit 0
|
9
10
|
else
|
10
11
|
install_t!
|
11
12
|
end
|
@@ -13,58 +14,82 @@ module Pod
|
|
13
14
|
|
14
15
|
end
|
15
16
|
|
16
|
-
|
17
|
+
class Command
|
17
18
|
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
class << self
|
37
|
-
alias options_t options
|
19
|
+
# This is an example of a cocoapods plugin adding a top-level subcommand
|
20
|
+
# to the 'pod' command.
|
21
|
+
#
|
22
|
+
# You can also create subcommands of existing or new commands. Say you
|
23
|
+
# wanted to add a subcommand to `list` to show newly deprecated pods,
|
24
|
+
# (e.g. `pod list deprecated`), there are a few things that would need
|
25
|
+
# to change.
|
26
|
+
#
|
27
|
+
# - move this file to `lib/pod/command/list/deprecated.rb` and update
|
28
|
+
# the class to exist in the the Pod::Command::List namespace
|
29
|
+
# - change this class to extend from `List` instead of `Command`. This
|
30
|
+
# tells the plugin system that it is a subcommand of `list`.
|
31
|
+
# - edit `lib/cocoapods_plugins.rb` to require this file
|
32
|
+
#
|
33
|
+
# @todo Create a PR to add your plugin to CocoaPods/cocoapods.org
|
34
|
+
# in the `plugins.json` file, once your plugin is released.
|
35
|
+
#
|
36
|
+
module ClassMethods
|
38
37
|
def options
|
39
|
-
|
40
|
-
|
41
|
-
|
38
|
+
options = [
|
39
|
+
['--dry-deps','only test depend'],
|
40
|
+
]
|
41
|
+
options.concat(super)
|
42
42
|
end
|
43
|
-
|
44
43
|
end
|
44
|
+
class Install
|
45
45
|
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
46
|
+
def self.options
|
47
|
+
[
|
48
|
+
['--repo-update', 'Force running `pod repo update` before install'],
|
49
|
+
['--deployment', 'Disallow any changes to the Podfile or the Podfile.lock during installation'],
|
50
|
+
['--clean-install', 'Ignore the contents of the project cache and force a full pod installation. This only applies to projects that have enabled incremental installation.'],
|
51
|
+
['--dry-deps','only test depend'],
|
52
|
+
].concat(super).reject { |(name, _)| name == '--no-repo-update' }
|
53
|
+
end
|
51
54
|
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
|
55
|
+
# class << self
|
56
|
+
# options_t = instance_method(:options)
|
57
|
+
# # alias options_t options
|
58
|
+
# define_method(:options) do
|
59
|
+
# item = options_t.bind(self).call()
|
60
|
+
#
|
61
|
+
# [
|
62
|
+
# ['--dry-deps','only test depend'],
|
63
|
+
# ].concat(item)
|
64
|
+
# end
|
65
|
+
# end
|
66
|
+
# class << self
|
67
|
+
# alias options_t options
|
68
|
+
# def options
|
69
|
+
# o = options_t
|
70
|
+
# o.push(['--dry-deps','only test depend'])
|
71
|
+
# o.concat(super)
|
72
|
+
# end
|
73
|
+
#
|
74
|
+
# end
|
75
|
+
|
76
|
+
def initialize(argv)
|
77
|
+
super
|
78
|
+
@deployment = argv.flag?('deployment', false)
|
79
|
+
@clean_install = argv.flag?('clean-install', false)
|
80
|
+
@dry_deps = argv.flag?('dry-deps',false)
|
81
|
+
end
|
82
|
+
|
83
|
+
alias installer_for_config_t installer_for_config
|
84
|
+
def installer_for_config
|
85
|
+
item = installer_for_config_t
|
86
|
+
if @dry_deps
|
87
|
+
item.dry_deps = @dry_deps
|
88
|
+
end
|
89
|
+
item
|
65
90
|
end
|
66
|
-
end
|
67
91
|
|
92
|
+
|
93
|
+
end
|
68
94
|
end
|
69
|
-
end
|
70
95
|
end
|
@@ -1,3 +1,5 @@
|
|
1
|
+
require 'cocoapods-packager-ext/ext/downloader/lnpath'
|
2
|
+
require 'cocoapods-packager-ext/ext/downloader_ext'
|
1
3
|
module Pod
|
2
4
|
class Command
|
3
5
|
# This is an example of a cocoapods plugin adding a top-level subcommand
|
@@ -19,14 +21,21 @@ module Pod
|
|
19
21
|
#
|
20
22
|
class Package
|
21
23
|
class << self
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
24
|
+
|
25
|
+
begin
|
26
|
+
alias options_t options
|
27
|
+
def options
|
28
|
+
o = options_t
|
29
|
+
o.push(['--all-deps','add all-depends'])
|
30
|
+
o.push(['--archs','select archs'])
|
31
|
+
o.push(['--black-deps','select exclude deps'])
|
32
|
+
o.push(['--podfile','select deps version from podfile'])
|
33
|
+
o.concat(super)
|
34
|
+
end
|
35
|
+
rescue
|
36
|
+
return
|
29
37
|
end
|
38
|
+
|
30
39
|
|
31
40
|
end
|
32
41
|
|
@@ -35,6 +44,7 @@ module Pod
|
|
35
44
|
@all_deps = argv.flag?('all-deps',false)
|
36
45
|
@select_archs = argv.option('archs','').split(',')
|
37
46
|
@black_deps = argv.option('black-deps','').split(',')
|
47
|
+
@podfile = argv.option('podfile','')
|
38
48
|
initialize_t argv
|
39
49
|
end
|
40
50
|
|
@@ -15,12 +15,16 @@ module Pod
|
|
15
15
|
if isBlack
|
16
16
|
return
|
17
17
|
end
|
18
|
+
begin
|
18
19
|
if File.directory? path
|
19
20
|
FileUtils.copy_entry(path,"#{@target_dir_ext_ext}/#{File.basename(path)}", false,false, true)
|
20
21
|
else
|
21
22
|
FileUtils.cp(path,"#{@target_dir_ext_ext}/#{File.basename(path)}")
|
22
|
-
end
|
23
|
-
|
23
|
+
end
|
24
|
+
rescue Exception => e
|
25
|
+
puts e
|
26
|
+
end
|
27
|
+
return
|
24
28
|
end
|
25
29
|
end
|
26
30
|
if File.directory? path
|
@@ -0,0 +1,19 @@
|
|
1
|
+
require 'cocoapods-downloader/remote_file'
|
2
|
+
|
3
|
+
module Pod
|
4
|
+
module Downloader
|
5
|
+
class LocalPath < RemoteFile
|
6
|
+
DEFAULT_PORT = 22
|
7
|
+
|
8
|
+
private
|
9
|
+
|
10
|
+
executable :ln
|
11
|
+
|
12
|
+
def download_file(full_filename)
|
13
|
+
|
14
|
+
ln! "-s",url, full_filename
|
15
|
+
end
|
16
|
+
|
17
|
+
end
|
18
|
+
end
|
19
|
+
end
|
@@ -0,0 +1,38 @@
|
|
1
|
+
module Pod
|
2
|
+
module Downloader
|
3
|
+
autoload :LocalPath,'cocoapods-packager-ext/ext/downloader/lnpath'
|
4
|
+
class << self
|
5
|
+
alias downloader_class_by_key_t downloader_class_by_key
|
6
|
+
def downloader_class_by_key
|
7
|
+
keys = downloader_class_by_key_t
|
8
|
+
keys[:lnpath] = LocalPath
|
9
|
+
return keys
|
10
|
+
end
|
11
|
+
end
|
12
|
+
class RemoteFile
|
13
|
+
executable :ln
|
14
|
+
|
15
|
+
alias filename_with_type_t filename_with_type
|
16
|
+
def filename_with_type(type = :zip)
|
17
|
+
if not type
|
18
|
+
"file"
|
19
|
+
else
|
20
|
+
filename_with_type_t type
|
21
|
+
end
|
22
|
+
end
|
23
|
+
alias extract_with_type_t extract_with_type
|
24
|
+
def extract_with_type(full_filename, type = :zip)
|
25
|
+
if not type
|
26
|
+
unpack_from = url
|
27
|
+
unpack_to = @target_path
|
28
|
+
FileUtils.rm_rf(unpack_to) if File.exist?(unpack_to)
|
29
|
+
FileUtils.rm_rf(unpack_to) if Dir.exist?(unpack_to)
|
30
|
+
ln! '-s',unpack_from,unpack_to
|
31
|
+
else
|
32
|
+
extract_with_type_t full_filename,type
|
33
|
+
end
|
34
|
+
|
35
|
+
end
|
36
|
+
end
|
37
|
+
end
|
38
|
+
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: cocoapods-packager-ext
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.15
|
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-
|
11
|
+
date: 2021-03-26 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -42,16 +42,16 @@ dependencies:
|
|
42
42
|
name: cocoapods-packager
|
43
43
|
requirement: !ruby/object:Gem::Requirement
|
44
44
|
requirements:
|
45
|
-
- -
|
45
|
+
- - '='
|
46
46
|
- !ruby/object:Gem::Version
|
47
|
-
version:
|
48
|
-
type: :
|
47
|
+
version: 1.5.0
|
48
|
+
type: :runtime
|
49
49
|
prerelease: false
|
50
50
|
version_requirements: !ruby/object:Gem::Requirement
|
51
51
|
requirements:
|
52
|
-
- -
|
52
|
+
- - '='
|
53
53
|
- !ruby/object:Gem::Version
|
54
|
-
version:
|
54
|
+
version: 1.5.0
|
55
55
|
description: A short description of cocoapods-packager-ext.
|
56
56
|
email:
|
57
57
|
- kyle.zhou@qq.com
|
@@ -70,6 +70,8 @@ files:
|
|
70
70
|
- lib/cocoapods-packager-ext/command/install_ext.rb
|
71
71
|
- lib/cocoapods-packager-ext/command/package_ext.rb
|
72
72
|
- lib/cocoapods-packager-ext/ext/builder.rb
|
73
|
+
- lib/cocoapods-packager-ext/ext/downloader/lnpath.rb
|
74
|
+
- lib/cocoapods-packager-ext/ext/downloader_ext.rb
|
73
75
|
- lib/cocoapods-packager-ext/gem_version.rb
|
74
76
|
- lib/cocoapods_plugin.rb
|
75
77
|
- spec/command/ext_spec.rb
|