cocoapods-modularization 0.0.4 → 0.0.7
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/cocoapods-modularization/command/mod/template.rb +40 -0
- data/lib/cocoapods-modularization/command/mod.rb +1 -0
- data/lib/cocoapods-modularization/gem_version.rb +1 -1
- data/lib/cocoapods-modularization/meta/meta_reference.rb +1 -1
- data/lib/cocoapods_plugin.rb +10 -1
- data/lib/hooks.rb +16 -0
- metadata +4 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 4510890b5b9707a51dd5291e4a565674a111844032e5a6b7fdfe5abda75aaaa5
|
4
|
+
data.tar.gz: ec80954f70e23ff54844067ae1eb00b1ce5d55d789c0ac04fa19fe70e25b8ba7
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 489abd5d11b1e4768519dad073826def567196805b03b2804eebab7bbf6c65ffb942fbc434f9dcadf68881159e3a5721141ef14c5091d57eea82bf7fa3d68861
|
7
|
+
data.tar.gz: b09e113d23769e468173f466fc155fe9eca9a3f62473cf691c13bdafae66e6eb312e2d8b13992beed3759b7866574979c9b3d0121c2a8189286c760cb99b2fc2
|
@@ -0,0 +1,40 @@
|
|
1
|
+
require 'fileutils'
|
2
|
+
|
3
|
+
module Pod
|
4
|
+
class Command
|
5
|
+
class Mod < Command
|
6
|
+
class Template < Mod
|
7
|
+
|
8
|
+
self.summary = 'Fetch build.rb from remote'
|
9
|
+
|
10
|
+
self.description = <<-DESC
|
11
|
+
Fetch build.rb from remote
|
12
|
+
DESC
|
13
|
+
|
14
|
+
def initialize(argv)
|
15
|
+
super
|
16
|
+
end
|
17
|
+
|
18
|
+
def validate!
|
19
|
+
super
|
20
|
+
end
|
21
|
+
|
22
|
+
def run
|
23
|
+
build_path = "#{Dir.pwd}/build.rb"
|
24
|
+
if File.exist?(build_path)
|
25
|
+
FileUtils.rm_rf(build_path)
|
26
|
+
end
|
27
|
+
`git clone http://gitlab.appshahe.com/ios-specs/template.git .build`
|
28
|
+
|
29
|
+
unless File.exist?("#{Dir.pwd}/.build")
|
30
|
+
puts "./.build not found"
|
31
|
+
return
|
32
|
+
end
|
33
|
+
|
34
|
+
FileUtils.mv("#{Dir.pwd}/.build/build.rb", "#{Dir.pwd}/build.rb")
|
35
|
+
FileUtils.rm_rf("#{Dir.pwd}/.build")
|
36
|
+
end
|
37
|
+
end
|
38
|
+
end
|
39
|
+
end
|
40
|
+
end
|
@@ -7,6 +7,7 @@ require 'cocoapods-modularization/command/mod/config'
|
|
7
7
|
require 'cocoapods-modularization/command/mod/add'
|
8
8
|
require 'cocoapods-modularization/command/mod/update'
|
9
9
|
require 'cocoapods-modularization/command/mod/base'
|
10
|
+
require 'cocoapods-modularization/command/mod/template'
|
10
11
|
|
11
12
|
module Pod
|
12
13
|
class Command
|
@@ -120,7 +120,7 @@ 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
|
-
|
123
|
+
|
124
124
|
if binary && source_url == Private::PrivateCache.source_repo_url
|
125
125
|
source_url = Private::PrivateCache.binary_repo_url
|
126
126
|
else
|
data/lib/cocoapods_plugin.rb
CHANGED
@@ -1 +1,10 @@
|
|
1
|
-
require 'cocoapods-
|
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.
|
4
|
+
version: 0.0.7
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- lazy
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2022-03-14 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -72,6 +72,7 @@ files:
|
|
72
72
|
- lib/cocoapods-modularization/command/mod/inspect.rb
|
73
73
|
- lib/cocoapods-modularization/command/mod/source.rb
|
74
74
|
- lib/cocoapods-modularization/command/mod/sync.rb
|
75
|
+
- lib/cocoapods-modularization/command/mod/template.rb
|
75
76
|
- lib/cocoapods-modularization/command/mod/update.rb
|
76
77
|
- lib/cocoapods-modularization/gem_version.rb
|
77
78
|
- lib/cocoapods-modularization/generate.rb
|
@@ -85,6 +86,7 @@ files:
|
|
85
86
|
- lib/cocoapods-modularization/private.rb
|
86
87
|
- lib/cocoapods-modularization/private/private_cache.rb
|
87
88
|
- lib/cocoapods_plugin.rb
|
89
|
+
- lib/hooks.rb
|
88
90
|
homepage: https://github.com/EXAMPLE/cocoapods-modularization
|
89
91
|
licenses:
|
90
92
|
- MIT
|