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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: d1a89f2357581085304bd868637395da5c4f6116afaed3badfd90d2830fd9af7
4
- data.tar.gz: 47493fd0e13e323f00e4d8af76fe1e774d5750c22bfd62c037b681e4365369ab
3
+ metadata.gz: 4510890b5b9707a51dd5291e4a565674a111844032e5a6b7fdfe5abda75aaaa5
4
+ data.tar.gz: ec80954f70e23ff54844067ae1eb00b1ce5d55d789c0ac04fa19fe70e25b8ba7
5
5
  SHA512:
6
- metadata.gz: d2d2f22e2ea7abe38a6a1c4b1f61e116d9eee38add7eac48597d7e4e20c954b16c5c7fb34cb0d99974ca54f9726ca548ba3e977c0bb17ce31d1e44a14b138e5d
7
- data.tar.gz: 112c140c067e869b8016d01a7da1ed346b6c1fdec5a9977256104f90b829b86e4d8fa762658813ec86305b2b7f39f9e98129ac8cc5e1e689e28dffadd3a70813
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
@@ -1,3 +1,3 @@
1
1
  module CocoapodsModularization
2
- VERSION = "0.0.4"
2
+ VERSION = "0.0.7"
3
3
  end
@@ -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
- puts "e: #{e}, dependency_data: #{dependency_data}"
123
+
124
124
  if binary && source_url == Private::PrivateCache.source_repo_url
125
125
  source_url = Private::PrivateCache.binary_repo_url
126
126
  else
@@ -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.4
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: 2021-12-30 00:00:00.000000000 Z
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