cocoapods-modularization 0.0.6 → 0.0.9

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: de8f24caef31650588dd309bd663416bb5322030af7c3b642f6c44db43d49d21
4
- data.tar.gz: e955afc7b9efd3b975ad53cf8be764de90c5e881e0557ef458fa4aa43375373d
3
+ metadata.gz: dee12d6bf89d2080866eda1d8b3874540b42543ac5c0c4e152712601b2184be9
4
+ data.tar.gz: 9f58ed706518c4ede6e02380788b7fbf5593fa7cc8fb3566622d9a68a68a4aa5
5
5
  SHA512:
6
- metadata.gz: 54f16cd703bc29bab7a39b4427106e1eab975444898d624309b0aac426b1700b7d7b48db9671db39dbdfd63f4af564120deab327c8083519520ee33c5b82c387
7
- data.tar.gz: 9fe85d77afaf64152ce9b4ce33e2790f50f4f8c7c6ee2d09f38804c4ef73d36af26c6c800e505290b0dd2b2a3a16decc8189514678b2e1a4262aaf194db34111
6
+ metadata.gz: 5c8305419f53ec1ba079f7f2f821c3d36d7878eab84832c9054b1027e1e41a37e2fe998743b5d1e05aff83c0e3435af2e4677779276573509e7dca11a2861baf
7
+ data.tar.gz: 03ac4e27ec91dae661a666981516d3a73e6488fe72bd3145a4772ef31d61670a5164b7343c3ad5439605e8c88b02b39047bb846d634297045994a74683fa4a9f
@@ -37,6 +37,7 @@ module Pod
37
37
  ['--clean-install', 'Ignore the contents of the project cache and force a full pod installation. This only ' \
38
38
  'applies to projects that have enabled incremental installation'],
39
39
  ['--enable-branch', 'Enable branch dependency'],
40
+ ['--original', 'Run pod install ignore cocoapods-modularization']
40
41
  ].concat(super).reject { |(name, _)| name == '--no-repo-update' }
41
42
  end
42
43
 
@@ -45,14 +46,17 @@ module Pod
45
46
  @deployment = argv.flag?('deployment', false)
46
47
  @clean_install = argv.flag?('clean-install', false)
47
48
  @enable_branch = argv.flag?('enable-branch', false)
49
+ @original = argv.flag?('original', false)
48
50
  end
49
51
 
50
52
  def run
51
53
  # encode podfile
52
- begin
53
- Meta::MetaReference.encode_podfile(@enable_branch)
54
- rescue Exception => e
55
- UI.puts "pod install error: #{e}"
54
+ unless @original
55
+ begin
56
+ Meta::MetaReference.encode_podfile(@enable_branch)
57
+ rescue Exception => e
58
+ UI.puts "pod install error: #{e}"
59
+ end
56
60
  end
57
61
 
58
62
  # install
@@ -64,10 +68,12 @@ module Pod
64
68
  installer.clean_install = @clean_install
65
69
  installer.install!
66
70
 
67
- begin
68
- add_modularization_into_xcode_reference
69
- rescue Exception => e
70
- UI.puts e
71
+ unless @original
72
+ begin
73
+ add_modularization_into_xcode_reference
74
+ rescue Exception => e
75
+ UI.puts e
76
+ end
71
77
  end
72
78
  end
73
79
 
@@ -1,3 +1,3 @@
1
1
  module CocoapodsModularization
2
- VERSION = "0.0.6"
2
+ VERSION = "0.0.9"
3
3
  end
@@ -120,8 +120,8 @@ module Pod
120
120
  def try_source(e, dependency_data)
121
121
  binary = dependency_data[MetaConstants.binary_key]
122
122
  source_url = dependency_data[MetaConstants.source_key]
123
- puts "e: #{e}, dependency_data: #{dependency_data}"
124
- if binary && source_url == Private::PrivateCache.source_repo_url
123
+
124
+ if binary && (source_url == Private::PrivateCache.source_repo_url || source_url == nil)
125
125
  source_url = Private::PrivateCache.binary_repo_url
126
126
  else
127
127
  source_url ||= Private::PrivateCache.source_repo_url
@@ -1 +1,10 @@
1
- require 'cocoapods-modularization/command'
1
+ require 'cocoapods-core'
2
+ require_relative 'hooks.rb'
3
+
4
+ module Pod
5
+ module CocoapodsModularization
6
+ Pod::HooksManager.register('cocoapods-modularization', :post_install) do |context|
7
+ Hooks.new.hook_post_install(context)
8
+ end
9
+ end
10
+ end
data/lib/hooks.rb ADDED
@@ -0,0 +1,16 @@
1
+ require 'cocoapods'
2
+ require 'cocoapods-modularization/command'
3
+
4
+ module Pod
5
+ module CocoapodsModularization
6
+ class Hooks
7
+ require 'xcodeproj'
8
+
9
+ def hook_post_install(context)
10
+ Dir.glob("#{Meta::MetaConstants.post_install_hooks_path}/**/*.rb").each do |script|
11
+ system("/usr/bin/ruby #{script}")
12
+ end
13
+ end
14
+ end
15
+ end
16
+ end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: cocoapods-modularization
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.6
4
+ version: 0.0.9
5
5
  platform: ruby
6
6
  authors:
7
7
  - lazy
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2021-12-31 00:00:00.000000000 Z
11
+ date: 2022-06-01 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -86,6 +86,7 @@ files:
86
86
  - lib/cocoapods-modularization/private.rb
87
87
  - lib/cocoapods-modularization/private/private_cache.rb
88
88
  - lib/cocoapods_plugin.rb
89
+ - lib/hooks.rb
89
90
  homepage: https://github.com/EXAMPLE/cocoapods-modularization
90
91
  licenses:
91
92
  - MIT