cocoapods-packager-ext 0.0.8 → 0.0.14

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: bde6209b36fbd764e913f1d0ff422b53911af653372adf1c8060f90aaa09fb3a
4
- data.tar.gz: 04f905fde5bfb3fc6e56226f79e5857b8d850ca73ea83c4e1d4e7824525bf8ad
3
+ metadata.gz: 6587776c4fe5a2244f5e1a6122daa3edcf8249dfec1b9fb9fcaf9c3bd2a07b30
4
+ data.tar.gz: 994411d350114cb823bd793f68513d494e76b934789aef738928eec955605cea
5
5
  SHA512:
6
- metadata.gz: 2edc0c4b2ac1a7f1622b12ff22effb2fa5d052a2afd7e07fef9823996c54b618e545e32967bcc36b095b23fe692407bc9d82159cf8b8f6d42a6368cd30ba161f
7
- data.tar.gz: a60ba2ca993f9a755af67c8a709e0b3ae821ab3ce65627f495552215bc2c3677ce07d1d8c66bc42086ebe71cbfa1c62395c018ef631552716a7f36394a068979
6
+ metadata.gz: 98061e99be38cbecec7a398c79a96bf4c1e8152281895adab2841d897437353e180187ea7f612fdddd0ed8edfd1220febf097b6c0b06f479b436cd64bdc904e9
7
+ data.tar.gz: d97a8923331a79cff89a85a606234b7a0c4f43cd52d58168198d2f228218025d263f344fe3511649e482928694f3563437ac7515111359c611be938d2f298470
@@ -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.add_development_dependency 'cocoapods-packager'
23
+ spec.add_runtime_dependency(%q<cocoapods-packager>.freeze,["1.5.0"])
24
+
24
25
  end
@@ -1 +1,2 @@
1
- require 'cocoapods-packager-ext/command/ext'
1
+ require 'cocoapods-packager-ext/command/install_ext'
2
+ require 'cocoapods-packager-ext/command/package_ext'
@@ -0,0 +1,94 @@
1
+ module Pod
2
+ class Installer
3
+ attr_accessor :dry_deps
4
+ alias install_t! install!
5
+ def install!()
6
+ if @dry_deps
7
+ prepare
8
+ resolve_dependencies
9
+ else
10
+ install_t!
11
+ end
12
+ end
13
+
14
+ end
15
+
16
+ class Command
17
+
18
+ # This is an example of a cocoapods plugin adding a top-level subcommand
19
+ # to the 'pod' command.
20
+ #
21
+ # You can also create subcommands of existing or new commands. Say you
22
+ # wanted to add a subcommand to `list` to show newly deprecated pods,
23
+ # (e.g. `pod list deprecated`), there are a few things that would need
24
+ # to change.
25
+ #
26
+ # - move this file to `lib/pod/command/list/deprecated.rb` and update
27
+ # the class to exist in the the Pod::Command::List namespace
28
+ # - change this class to extend from `List` instead of `Command`. This
29
+ # tells the plugin system that it is a subcommand of `list`.
30
+ # - edit `lib/cocoapods_plugins.rb` to require this file
31
+ #
32
+ # @todo Create a PR to add your plugin to CocoaPods/cocoapods.org
33
+ # in the `plugins.json` file, once your plugin is released.
34
+ #
35
+ module ClassMethods
36
+ def options
37
+ options = [
38
+ ['--dry-deps','only test depend'],
39
+ ]
40
+ options.concat(super)
41
+ end
42
+ end
43
+ class Install
44
+
45
+ def self.options
46
+ [
47
+ ['--repo-update', 'Force running `pod repo update` before install'],
48
+ ['--deployment', 'Disallow any changes to the Podfile or the Podfile.lock during installation'],
49
+ ['--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.'],
50
+ ['--dry-deps','only test depend'],
51
+ ].concat(super).reject { |(name, _)| name == '--no-repo-update' }
52
+ end
53
+
54
+ # class << self
55
+ # options_t = instance_method(:options)
56
+ # # alias options_t options
57
+ # define_method(:options) do
58
+ # item = options_t.bind(self).call()
59
+ #
60
+ # [
61
+ # ['--dry-deps','only test depend'],
62
+ # ].concat(item)
63
+ # end
64
+ # end
65
+ # class << self
66
+ # alias options_t options
67
+ # def options
68
+ # o = options_t
69
+ # o.push(['--dry-deps','only test depend'])
70
+ # o.concat(super)
71
+ # end
72
+ #
73
+ # end
74
+
75
+ def initialize(argv)
76
+ super
77
+ @deployment = argv.flag?('deployment', false)
78
+ @clean_install = argv.flag?('clean-install', false)
79
+ @dry_deps = argv.flag?('dry-deps',false)
80
+ end
81
+
82
+ alias installer_for_config_t installer_for_config
83
+ def installer_for_config
84
+ item = installer_for_config_t
85
+ if @dry_deps
86
+ item.dry_deps = @dry_deps
87
+ end
88
+ item
89
+ end
90
+
91
+
92
+ end
93
+ end
94
+ 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
- alias options_t options
23
- def options
24
- o = options_t
25
- o.push(['--all-deps','add all-depends'])
26
- o.push(['--archs','select archs'])
27
- o.push(['--black-deps','select exclude deps'])
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
- return
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
@@ -1,3 +1,3 @@
1
1
  module CocoapodsPackagerExt
2
- VERSION = "0.0.8"
2
+ VERSION = "0.0.14"
3
3
  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.8
4
+ version: 0.0.14
5
5
  platform: ruby
6
6
  authors:
7
7
  - kyle.zhou
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2020-11-20 00:00:00.000000000 Z
11
+ date: 2021-03-18 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: '0'
48
- type: :development
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: '0'
54
+ version: 1.5.0
55
55
  description: A short description of cocoapods-packager-ext.
56
56
  email:
57
57
  - kyle.zhou@qq.com
@@ -67,8 +67,11 @@ files:
67
67
  - cocoapods-packager-ext.gemspec
68
68
  - lib/cocoapods-packager-ext.rb
69
69
  - lib/cocoapods-packager-ext/command.rb
70
- - lib/cocoapods-packager-ext/command/ext.rb
70
+ - lib/cocoapods-packager-ext/command/install_ext.rb
71
+ - lib/cocoapods-packager-ext/command/package_ext.rb
71
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
72
75
  - lib/cocoapods-packager-ext/gem_version.rb
73
76
  - lib/cocoapods_plugin.rb
74
77
  - spec/command/ext_spec.rb