cocoapods-tdfire-binary 0.1.0 → 0.1.2

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
  SHA1:
3
- metadata.gz: 9c713eaffe23c8039390ae0bcbcb02ff5fc1e7e5
4
- data.tar.gz: b68f18ab9a07c9430c8f4d00899ccf29b727f708
3
+ metadata.gz: fc2eea59094cada53569777975bb4eee561a17c3
4
+ data.tar.gz: a73aec5469a5bf31588a7cc6f05fd4709da29e1d
5
5
  SHA512:
6
- metadata.gz: dad117acb373233901f966a75922cedc4b90719244f7d60888cfb8a8d494177c8f46eda0281cb33e02ab918e79b48bd2a2f9cc96d98727dcf3f3914d98b82d11
7
- data.tar.gz: e9a25efbe4fdcde077d5690abf8119f13e6bfdc6ca337d53499d0768e9a4095fd8b3049df83e5c4bb8baf0cb7d229ae0302c8ad9496ec0d96fa44a819409fcbe
6
+ metadata.gz: 1b43040556944cfacc21448f3c5f5421781b43b45542769bb8461923b5189c0f218fe376e3ba8dd44cee7b1f68fe0132a469822b2fc206cab2ef4f5677a46c44
7
+ data.tar.gz: 28be0dc5cb5d4b0e6c675004efb854f57dca89b9b22d61b9d8886317ed412611465c89a95969c73767406d933c33246f8f0ecfe652f066972a697892b9533388
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- cocoapods-tdfire-binary (0.1.0)
4
+ cocoapods-tdfire-binary (0.1.2)
5
5
  cocoapods (~> 1.4)
6
6
  colorize (~> 0.8)
7
7
 
data/README.md CHANGED
@@ -8,4 +8,41 @@ A description of cocoapods-tdfire-binary.
8
8
 
9
9
  ## Usage
10
10
 
11
- $ pod spec binary POD_NAME
11
+ > For Podfile
12
+
13
+ ```
14
+ ...
15
+ plugin 'cocoapods-tdfire-binary'
16
+
17
+ tdfire_use_binary!
18
+ tdfire_use_source_pods 'AFNetworking'
19
+
20
+ use_frameworks!
21
+
22
+ ...
23
+
24
+ tdfire_external_pods 'SDWebImage'
25
+
26
+ ```
27
+
28
+ > For podspec
29
+
30
+ ```
31
+ s.tdfire_source |s|
32
+ # source configuration
33
+ ...
34
+
35
+ end
36
+
37
+ s.tdfire_binary |s|
38
+ # binary configuration
39
+
40
+ s.vendored_framework = "#{s.name}.framework"
41
+ s.source_files = "#{s.name}.framework/Headers/*"
42
+ s.public_header_files = "#{s.name}.framework/Headers/*"
43
+
44
+ ...
45
+ end
46
+
47
+ s.tdfire_set_binary_download_configurations_at_last
48
+ ```
@@ -10,7 +10,7 @@ Gem::Specification.new do |spec|
10
10
  spec.email = ['triplec.linux@gmail.com']
11
11
  spec.description = %q{cocoapods-tdfire-binary is a plugin which helps developer switching there project dependency between source and binary.}
12
12
  spec.summary = %q{cocoapods-tdfire-binary is a plugin which helps developer switching there project dependency between source and binary.}
13
- spec.homepage = 'https://github.com/EXAMPLE/cocoapods-tdfire-binary'
13
+ spec.homepage = 'https://github.com/tripleCC/cocoapods-tdfire-binary'
14
14
  spec.license = 'MIT'
15
15
 
16
16
  spec.files = `git ls-files`.split($/)
@@ -1,3 +1,3 @@
1
1
  module CocoapodsTdfireBinary
2
- VERSION = "0.1.0"
2
+ VERSION = "0.1.2"
3
3
  end
@@ -7,7 +7,7 @@ module Pod
7
7
  # 使用源码依赖的pod
8
8
  def tdfire_use_source_pods(pods)
9
9
  old_pods = Tdfire::BinaryStateStore.use_source_pods
10
- UI.puts "Tdfire: the use source pods: #{old_pods.join(',')} will be overrided by new pods: #{pods.join(',')}".cyan unless old_pods.empty?
10
+ UI.puts "Tdfire: the use source pods: #{old_pods.join(',')} will be overrided by new pods: #{pods.join(',')}".cyan if (!old_pods.empty? && old_pods != pods )
11
11
 
12
12
  Tdfire::BinaryStateStore.use_source_pods = pods
13
13
  end
@@ -19,11 +19,55 @@ module Pod
19
19
 
20
20
  # 外源组件依赖
21
21
  def tdfire_external_pods(pods, *rest)
22
-
22
+ argvs = rest.last || {}
23
+ if !argvs.kind_of?(Hash)
24
+ info = <<-EOF
25
+ 输入参数错误.
23
26
 
27
+ Example:
28
+ tdfire_external_pods ['TDFCore'] source:'git' group:'ios' branch:'develop'
29
+ tdfire_external_pods 'TDFCore' source:'git' group:'ios' branch:'develop'
30
+ tdfire_external_pods ['TDFCore'] group:'cocoapods'
31
+ ...
32
+
33
+ 默认值:
34
+ source:path
35
+ group:ios
36
+ branch:develop
37
+
38
+ 所有值:
39
+ source -> git path
40
+ group -> 任意
41
+ branch -> 任意
42
+
43
+ 格式可以和pod语法一致
44
+ EOF
45
+ raise Pod::Informative, info
46
+ end
47
+
48
+ UI.puts argvs
49
+ source = argvs[:source] || 'git'
50
+ group = argvs[:group] || 'ios'
51
+ branch = argvs[:branch] || 'develop'
52
+
53
+ case source
54
+ when 'path'
55
+ Array(pods).each do |name|
56
+ if File.exist?("../../#{name}/#{name}.podspec")
57
+ pod name, :path => "../../#{name}"
58
+ else
59
+ pod name, :path => "../#{name}"
60
+ end
61
+ end
62
+ when 'git'
63
+ Array(pods).each do |name|
64
+ pod name, :git => "git@git.2dfire-inc.com:#{group}/#{name}.git", :branch => "#{branch}"
65
+ end
66
+ else
67
+ end
24
68
 
25
69
  # 除了依赖私有源正式版本的组件,其余组件一律进行源码依赖
26
- Tdfire::BinaryStateStore.append_use_source_pods(pods)
70
+ Tdfire::BinaryStateStore.use_source_pods = Array(pods) + Tdfire::BinaryStateStore.use_source_pods
27
71
  end
28
72
  end
29
73
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: cocoapods-tdfire-binary
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.1.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - tripleCC
@@ -90,7 +90,7 @@ files:
90
90
  - lib/cocoapods_plugin.rb
91
91
  - spec/command/binary_spec.rb
92
92
  - spec/spec_helper.rb
93
- homepage: https://github.com/EXAMPLE/cocoapods-tdfire-binary
93
+ homepage: https://github.com/tripleCC/cocoapods-tdfire-binary
94
94
  licenses:
95
95
  - MIT
96
96
  metadata: {}