cocoapods-ipub 0.0.1 → 0.0.2

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: e973f83cdd6dfe7049fb36562a52201fe18ba775471c21d7e9c6baad33f8c519
4
- data.tar.gz: 2f5e1dea9de1f172e4809f331b960fdd96c9378fb740ef217f8517b8ec2831d9
3
+ metadata.gz: b9f6f90be07b1fdfdd38b878aa18e735e2783bbc90e9d24aa569d0a23b99beec
4
+ data.tar.gz: a2bc5ed75e872a93cf72200c96429fa13ccad97c6e4b8737b1a1cef798fcf446
5
5
  SHA512:
6
- metadata.gz: 27fbc2dba420cc006028e69fedbd00faa5d96c80c8d86ae5013a7f4e9496253cc30c9c9d2c1e2ba0e08716862e23f2ccdce5448304332a6d8af63f257b3677f3
7
- data.tar.gz: a94b4b3d3f341b0bbf1b161c67b57fe0e850263db54790d3d3f3e562fd6b7dce70e8512612508c5a930d3b605a3a1f51a4405a393444aa11687502ba969d782f
6
+ metadata.gz: f96e3860757b9643a6bfe7b9e6f8ff53c0cd8a77d4c40acd8b59d71c899fddfba0f9cc38d19843a1cc510f40ac37a5668c6d1bd94a845e9d766bf8ac1ebb7e16
7
+ data.tar.gz: cede05f023efc115d4a9b670326fbe39840bfd1e398d9af4f73cbb627364946889a1df8248b7b88425eaeafa9fd79b5016f8ac53ee9f8ea125d48e80587ab1f8
data/Rakefile CHANGED
@@ -6,7 +6,7 @@ end
6
6
 
7
7
  def build
8
8
  sh('gem build cocoapods-ipub.gemspec')
9
- sh('sudo gem install cocoapods-ipub-0.0.1.gem')
9
+ sh('sudo gem install cocoapods-ipub-0.0.2.gem')
10
10
  end
11
11
 
12
12
  desc 'Builds the gem'
@@ -1,3 +1,2 @@
1
1
  require 'cocoapods-ipub/gem_version'
2
2
  require 'cocoapods-ipub/pod_ipub'
3
-
@@ -1,3 +1,3 @@
1
1
  module CocoapodsIpub
2
- VERSION = "0.0.1"
2
+ VERSION = "0.0.2"
3
3
  end
@@ -9,11 +9,68 @@ module Pod
9
9
  pod(name, *requirements)
10
10
  current_target_definition.store_ipub(name)
11
11
  end
12
+
13
+ def use_ipub(context = nil)
14
+ unless context
15
+ raise "method need call in post_install"
16
+ end
17
+
18
+ podfile = context.podfile
19
+ @isFramework = false
20
+ podfile.target_definition_list.each do |target_definition|
21
+ if target_definition.uses_frameworks?
22
+ @isFramework = true
23
+ break
24
+ end
25
+ end
26
+ return unless @isFramework
27
+
28
+ @ipubFrameworks = []
29
+ # context.umbrella_targets[0].specs.each do | spec|
30
+ # puts "...ooo#{context.pod_targets}"
31
+ context.pod_targets.each do | pod_target|
32
+ # puts "...aaaa#{pod_target}"
33
+ if pod_target.root_spec.is_ipub
34
+ @ipubFrameworks << pod_target.root_spec.name
35
+ end
36
+ end
37
+ return unless @ipubFrameworks.count != 0
38
+ #spec.name
39
+
40
+ # puts "__1__#{@ipubFrameworks}"
41
+
42
+ non_ipub_frameworks =
43
+ context.pods_project.targets.map do |target|
44
+ if !target.name.include? "Pods-" and !@ipubFrameworks.include? target.name
45
+ "${PODS_CONFIGURATION_BUILD_DIR}/#{target.name}"
46
+ end
47
+ end
48
+
49
+ context.pods_project.targets.each do |target|
50
+ if !target.name.include? "Pods-" and @ipubFrameworks.include? target.name
51
+ str = "$(inherited) "
52
+ str << non_ipub_frameworks.compact.join(" ")
53
+ str << " "
54
+ str << @ipubFrameworks.map { |item| item == target.name ?
55
+ nil: "${PODS_CONFIGURATION_BUILD_DIR}/#{item}" }.compact.join(" ")
56
+ target.build_configurations.each do |config|
57
+ config.build_settings['FRAMEWORK_SEARCH_PATHS'] = str
58
+ end
59
+ # puts "__2__#{target}"
60
+ end
61
+ target.build_configurations.each do |config|
62
+ config.build_settings['CLANG_WARN_DOCUMENTATION_COMMENTS'] = 'NO'
63
+ config.build_settings['CLANG_WARN_STRICT_PROTOTYPES'] = 'NO'
64
+ end
65
+ end
66
+ end
12
67
  end
13
68
 
14
69
  class TargetDefinition
15
70
  # @return [Array<String>]
16
71
  attr_accessor :ipub_dependency_names
72
+
73
+ # attr_accessor :is_frameworks_ipub
17
74
 
18
75
  def store_ipub(name)
19
76
  @ipub_dependency_names ||= []
@@ -36,13 +93,17 @@ module Pod
36
93
 
37
94
  class IPubPodfile < Pod::Podfile
38
95
  end
39
-
40
-
41
-
42
96
  class Dependency
43
97
  attr_accessor :is_ipub
44
98
  end
45
99
 
100
+ class Specification
101
+
102
+ module DSL
103
+ attr_accessor :is_ipub
104
+ end
105
+ end
106
+
46
107
 
47
108
 
48
109
  end
data/sh.sh ADDED
@@ -0,0 +1,3 @@
1
+ #!/bin/bash
2
+ gem build cocoapods-ipub.gemspec
3
+ sudo gem install cocoapods-ipub-0.0.2.gem
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: cocoapods-ipub
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.1
4
+ version: 0.0.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - welkiner
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2018-09-20 00:00:00.000000000 Z
11
+ date: 2018-09-30 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -57,6 +57,7 @@ files:
57
57
  - lib/cocoapods-ipub/gem_version.rb
58
58
  - lib/cocoapods-ipub/pod_ipub.rb
59
59
  - lib/cocoapods_plugin.rb
60
+ - sh.sh
60
61
  - spec/spec_helper.rb
61
62
  homepage: https://github.com/welkiner/cocoapods-ipub
62
63
  licenses: