cocoapods-tdfire-binary 0.1.0
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 +7 -0
- data/.gitignore +3 -0
- data/Gemfile +13 -0
- data/Gemfile.lock +100 -0
- data/LICENSE.txt +22 -0
- data/README.md +11 -0
- data/Rakefile +13 -0
- data/cocoapods-tdfire-binary.gemspec +27 -0
- data/lib/cocoapods-tdfire-binary.rb +1 -0
- data/lib/cocoapods-tdfire-binary/binary_state_store.rb +31 -0
- data/lib/cocoapods-tdfire-binary/gem_version.rb +3 -0
- data/lib/cocoapods-tdfire-binary/podfile_dsl.rb +30 -0
- data/lib/cocoapods-tdfire-binary/podfile_hook.rb +54 -0
- data/lib/cocoapods-tdfire-binary/specification_dsl.rb +97 -0
- data/lib/cocoapods_plugin.rb +3 -0
- data/spec/command/binary_spec.rb +12 -0
- data/spec/spec_helper.rb +50 -0
- metadata +120 -0
checksums.yaml
ADDED
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
---
|
|
2
|
+
SHA1:
|
|
3
|
+
metadata.gz: 9c713eaffe23c8039390ae0bcbcb02ff5fc1e7e5
|
|
4
|
+
data.tar.gz: b68f18ab9a07c9430c8f4d00899ccf29b727f708
|
|
5
|
+
SHA512:
|
|
6
|
+
metadata.gz: dad117acb373233901f966a75922cedc4b90719244f7d60888cfb8a8d494177c8f46eda0281cb33e02ab918e79b48bd2a2f9cc96d98727dcf3f3914d98b82d11
|
|
7
|
+
data.tar.gz: e9a25efbe4fdcde077d5690abf8119f13e6bfdc6ca337d53499d0768e9a4095fd8b3049df83e5c4bb8baf0cb7d229ae0302c8ad9496ec0d96fa44a819409fcbe
|
data/.gitignore
ADDED
data/Gemfile
ADDED
data/Gemfile.lock
ADDED
|
@@ -0,0 +1,100 @@
|
|
|
1
|
+
PATH
|
|
2
|
+
remote: .
|
|
3
|
+
specs:
|
|
4
|
+
cocoapods-tdfire-binary (0.1.0)
|
|
5
|
+
cocoapods (~> 1.4)
|
|
6
|
+
colorize (~> 0.8)
|
|
7
|
+
|
|
8
|
+
GEM
|
|
9
|
+
remote: https://rubygems.org/
|
|
10
|
+
specs:
|
|
11
|
+
CFPropertyList (2.3.6)
|
|
12
|
+
activesupport (4.2.10)
|
|
13
|
+
i18n (~> 0.7)
|
|
14
|
+
minitest (~> 5.1)
|
|
15
|
+
thread_safe (~> 0.3, >= 0.3.4)
|
|
16
|
+
tzinfo (~> 1.1)
|
|
17
|
+
atomos (0.1.1)
|
|
18
|
+
bacon (1.2.0)
|
|
19
|
+
claide (1.0.2)
|
|
20
|
+
cocoapods (1.4.0)
|
|
21
|
+
activesupport (>= 4.0.2, < 5)
|
|
22
|
+
claide (>= 1.0.2, < 2.0)
|
|
23
|
+
cocoapods-core (= 1.4.0)
|
|
24
|
+
cocoapods-deintegrate (>= 1.0.2, < 2.0)
|
|
25
|
+
cocoapods-downloader (>= 1.1.3, < 2.0)
|
|
26
|
+
cocoapods-plugins (>= 1.0.0, < 2.0)
|
|
27
|
+
cocoapods-search (>= 1.0.0, < 2.0)
|
|
28
|
+
cocoapods-stats (>= 1.0.0, < 2.0)
|
|
29
|
+
cocoapods-trunk (>= 1.3.0, < 2.0)
|
|
30
|
+
cocoapods-try (>= 1.1.0, < 2.0)
|
|
31
|
+
colored2 (~> 3.1)
|
|
32
|
+
escape (~> 0.0.4)
|
|
33
|
+
fourflusher (~> 2.0.1)
|
|
34
|
+
gh_inspector (~> 1.0)
|
|
35
|
+
molinillo (~> 0.6.4)
|
|
36
|
+
nap (~> 1.0)
|
|
37
|
+
ruby-macho (~> 1.1)
|
|
38
|
+
xcodeproj (>= 1.5.4, < 2.0)
|
|
39
|
+
cocoapods-core (1.4.0)
|
|
40
|
+
activesupport (>= 4.0.2, < 6)
|
|
41
|
+
fuzzy_match (~> 2.0.4)
|
|
42
|
+
nap (~> 1.0)
|
|
43
|
+
cocoapods-deintegrate (1.0.2)
|
|
44
|
+
cocoapods-downloader (1.1.3)
|
|
45
|
+
cocoapods-plugins (1.0.0)
|
|
46
|
+
nap
|
|
47
|
+
cocoapods-search (1.0.0)
|
|
48
|
+
cocoapods-stats (1.0.0)
|
|
49
|
+
cocoapods-trunk (1.3.0)
|
|
50
|
+
nap (>= 0.8, < 2.0)
|
|
51
|
+
netrc (~> 0.11)
|
|
52
|
+
cocoapods-try (1.1.0)
|
|
53
|
+
colored2 (3.1.2)
|
|
54
|
+
colorize (0.8.1)
|
|
55
|
+
concurrent-ruby (1.0.5)
|
|
56
|
+
escape (0.0.4)
|
|
57
|
+
fourflusher (2.0.1)
|
|
58
|
+
fuzzy_match (2.0.4)
|
|
59
|
+
gh_inspector (1.1.0)
|
|
60
|
+
i18n (0.9.3)
|
|
61
|
+
concurrent-ruby (~> 1.0)
|
|
62
|
+
metaclass (0.0.4)
|
|
63
|
+
minitest (5.11.3)
|
|
64
|
+
mocha (1.3.0)
|
|
65
|
+
metaclass (~> 0.0.1)
|
|
66
|
+
mocha-on-bacon (0.2.3)
|
|
67
|
+
mocha (>= 0.13.0)
|
|
68
|
+
molinillo (0.6.4)
|
|
69
|
+
nanaimo (0.2.3)
|
|
70
|
+
nap (1.1.0)
|
|
71
|
+
netrc (0.11.0)
|
|
72
|
+
prettybacon (0.0.2)
|
|
73
|
+
bacon (~> 1.2)
|
|
74
|
+
rake (12.3.0)
|
|
75
|
+
ruby-macho (1.1.0)
|
|
76
|
+
thread_safe (0.3.6)
|
|
77
|
+
tzinfo (1.2.4)
|
|
78
|
+
thread_safe (~> 0.1)
|
|
79
|
+
xcodeproj (1.5.5)
|
|
80
|
+
CFPropertyList (~> 2.3.3)
|
|
81
|
+
atomos (~> 0.1.0)
|
|
82
|
+
claide (>= 1.0.2, < 2.0)
|
|
83
|
+
colored2 (~> 3.1)
|
|
84
|
+
nanaimo (~> 0.2.3)
|
|
85
|
+
|
|
86
|
+
PLATFORMS
|
|
87
|
+
ruby
|
|
88
|
+
|
|
89
|
+
DEPENDENCIES
|
|
90
|
+
bacon
|
|
91
|
+
bundler (~> 1.3)
|
|
92
|
+
cocoapods
|
|
93
|
+
cocoapods-tdfire-binary!
|
|
94
|
+
mocha
|
|
95
|
+
mocha-on-bacon
|
|
96
|
+
prettybacon
|
|
97
|
+
rake (~> 12.0)
|
|
98
|
+
|
|
99
|
+
BUNDLED WITH
|
|
100
|
+
1.16.1
|
data/LICENSE.txt
ADDED
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
Copyright (c) 2018 tripleCC <triplec.linux@gmail.com>
|
|
2
|
+
|
|
3
|
+
MIT License
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining
|
|
6
|
+
a copy of this software and associated documentation files (the
|
|
7
|
+
"Software"), to deal in the Software without restriction, including
|
|
8
|
+
without limitation the rights to use, copy, modify, merge, publish,
|
|
9
|
+
distribute, sublicense, and/or sell copies of the Software, and to
|
|
10
|
+
permit persons to whom the Software is furnished to do so, subject to
|
|
11
|
+
the following conditions:
|
|
12
|
+
|
|
13
|
+
The above copyright notice and this permission notice shall be
|
|
14
|
+
included in all copies or substantial portions of the Software.
|
|
15
|
+
|
|
16
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
|
17
|
+
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
|
18
|
+
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
|
19
|
+
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
|
20
|
+
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
|
21
|
+
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
|
22
|
+
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
data/README.md
ADDED
data/Rakefile
ADDED
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
# coding: utf-8
|
|
2
|
+
lib = File.expand_path('../lib', __FILE__)
|
|
3
|
+
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
|
4
|
+
require 'cocoapods-tdfire-binary/gem_version.rb'
|
|
5
|
+
|
|
6
|
+
Gem::Specification.new do |spec|
|
|
7
|
+
spec.name = 'cocoapods-tdfire-binary'
|
|
8
|
+
spec.version = CocoapodsTdfireBinary::VERSION
|
|
9
|
+
spec.authors = ['tripleCC']
|
|
10
|
+
spec.email = ['triplec.linux@gmail.com']
|
|
11
|
+
spec.description = %q{cocoapods-tdfire-binary is a plugin which helps developer switching there project dependency between source and binary.}
|
|
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'
|
|
14
|
+
spec.license = 'MIT'
|
|
15
|
+
|
|
16
|
+
spec.files = `git ls-files`.split($/)
|
|
17
|
+
spec.executables = spec.files.grep(%r{^bin/}) { |f| File.basename(f) }
|
|
18
|
+
spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
|
|
19
|
+
spec.require_paths = ['lib']
|
|
20
|
+
|
|
21
|
+
spec.add_development_dependency 'bundler', '~> 1.3'
|
|
22
|
+
spec.add_development_dependency 'rake', '~> 12.0'
|
|
23
|
+
|
|
24
|
+
spec.add_dependency 'cocoapods', '~> 1.4'
|
|
25
|
+
spec.add_dependency 'colorize', '~> 0.8'
|
|
26
|
+
|
|
27
|
+
end
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
require 'cocoapods-tdfire-binary/gem_version'
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
module Tdfire
|
|
2
|
+
class BinaryStateStore
|
|
3
|
+
public
|
|
4
|
+
|
|
5
|
+
def self.printed_pods
|
|
6
|
+
@printed_pods ||= []
|
|
7
|
+
end
|
|
8
|
+
|
|
9
|
+
def self.use_source_pods
|
|
10
|
+
String(ENV[USE_SOURCE_PODS_KEY]).split('|')
|
|
11
|
+
end
|
|
12
|
+
|
|
13
|
+
def self.use_source_pods=(pods)
|
|
14
|
+
ENV[USE_SOURCE_PODS_KEY] = Array(pods).join('|')
|
|
15
|
+
end
|
|
16
|
+
|
|
17
|
+
def self.use_binary?
|
|
18
|
+
ENV[USE_BINARY_KEY] == USE_BINARY_SURE_VALUE
|
|
19
|
+
end
|
|
20
|
+
|
|
21
|
+
def self.set_use_binary
|
|
22
|
+
ENV[USE_BINARY_KEY] = USE_BINARY_SURE_VALUE
|
|
23
|
+
end
|
|
24
|
+
|
|
25
|
+
private
|
|
26
|
+
|
|
27
|
+
USE_SOURCE_PODS_KEY = 'tdfire_use_source_pods'
|
|
28
|
+
USE_BINARY_KEY = 'tdfire_use_binary'
|
|
29
|
+
USE_BINARY_SURE_VALUE = '1'
|
|
30
|
+
end
|
|
31
|
+
end
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
require 'cocoapods-tdfire-binary/binary_state_store'
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
module Pod
|
|
5
|
+
class Podfile
|
|
6
|
+
module DSL
|
|
7
|
+
# 使用源码依赖的pod
|
|
8
|
+
def tdfire_use_source_pods(pods)
|
|
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?
|
|
11
|
+
|
|
12
|
+
Tdfire::BinaryStateStore.use_source_pods = pods
|
|
13
|
+
end
|
|
14
|
+
|
|
15
|
+
# 使用二进制依赖
|
|
16
|
+
def tdfire_use_binary!
|
|
17
|
+
Tdfire::BinaryStateStore.set_use_binary
|
|
18
|
+
end
|
|
19
|
+
|
|
20
|
+
# 外源组件依赖
|
|
21
|
+
def tdfire_external_pods(pods, *rest)
|
|
22
|
+
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
# 除了依赖私有源正式版本的组件,其余组件一律进行源码依赖
|
|
26
|
+
Tdfire::BinaryStateStore.append_use_source_pods(pods)
|
|
27
|
+
end
|
|
28
|
+
end
|
|
29
|
+
end
|
|
30
|
+
end
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
require 'cocoapods-tdfire-binary/binary_state_store'
|
|
2
|
+
|
|
3
|
+
module CocoapodsTdfireBinary
|
|
4
|
+
|
|
5
|
+
tdfire_default_development_pod = nil
|
|
6
|
+
Pod::HooksManager.register('cocoapods-tdfire-binary', :pre_install) do |context, _|
|
|
7
|
+
first_target_definition = context.podfile.target_definition_list.select{ |d| d.name != 'Pods' }.first
|
|
8
|
+
development_pod = first_target_definition.name.split('_').first unless first_target_definition.nil?
|
|
9
|
+
|
|
10
|
+
Pod::UI.section("Tdfire: set share scheme for development pod: \'#{development_pod}\'") do
|
|
11
|
+
# carthage 需要 shared scheme 构建 framework
|
|
12
|
+
context.podfile.install!('cocoapods', :share_schemes_for_development_pods => [development_pod])
|
|
13
|
+
end unless development_pod.nil?
|
|
14
|
+
|
|
15
|
+
if Tdfire::BinaryStateStore.use_binary?
|
|
16
|
+
Pod::UI.section("Tdfire: set use source for development_pod: \'#{development_pod}\'") do
|
|
17
|
+
# 开发 Pod 使用源码依赖
|
|
18
|
+
Tdfire::BinaryStateStore.use_source_pods = Array(development_pod) + Tdfire::BinaryStateStore.use_source_pods
|
|
19
|
+
end unless development_pod.nil?
|
|
20
|
+
tdfire_default_development_pod = development_pod
|
|
21
|
+
end
|
|
22
|
+
end
|
|
23
|
+
|
|
24
|
+
#fix `Shell Script` Build Phase Fails When Input / Output Files List is Too Large
|
|
25
|
+
Pod::HooksManager.register('cocoapods-tdfire-binary', :post_install) do |context, _|
|
|
26
|
+
Pod::UI.section('Tdfire: clean input and output files') do
|
|
27
|
+
context.umbrella_targets.map(&:user_targets).flatten.uniq.each do |t|
|
|
28
|
+
phase = t.shell_script_build_phases.find { |p| p.name.include?(Pod::Installer::UserProjectIntegrator::TargetIntegrator::COPY_PODS_RESOURCES_PHASE_NAME) }
|
|
29
|
+
|
|
30
|
+
max_input_output_paths = 1000
|
|
31
|
+
input_output_paths = phase.input_paths.count + phase.output_paths.count
|
|
32
|
+
Pod::UI.message "Tdfire: input paths and output paths count for #{t.name} : #{input_output_paths}"
|
|
33
|
+
|
|
34
|
+
if input_output_paths > max_input_output_paths
|
|
35
|
+
phase.input_paths.clear
|
|
36
|
+
phase.output_paths.clear
|
|
37
|
+
end
|
|
38
|
+
|
|
39
|
+
end
|
|
40
|
+
|
|
41
|
+
context.umbrella_targets.map(&:user_project).each do |project|
|
|
42
|
+
project.save
|
|
43
|
+
end
|
|
44
|
+
end
|
|
45
|
+
|
|
46
|
+
if Tdfire::BinaryStateStore.use_binary?
|
|
47
|
+
all_development_pods = context.sandbox.development_pods.keys - Array(tdfire_default_development_pod) - Tdfire::BinaryStateStore.use_source_pods
|
|
48
|
+
all_development_pods_displayed_text = all_development_pods.map { |p| "'#{p}'" }.join(',')
|
|
49
|
+
Pod::UI.puts "Tdfire: You should add following code to your `Podfile`, and then run `pod install or pod update` again. \n\ntdfire_use_source_pods [#{all_development_pods_displayed_text}]\n".cyan unless all_development_pods.empty?
|
|
50
|
+
end
|
|
51
|
+
|
|
52
|
+
Pod::UI.puts "Tdfire: all source dependency pods: #{Tdfire::BinaryStateStore.use_source_pods.join(', ')}"
|
|
53
|
+
end
|
|
54
|
+
end
|
|
@@ -0,0 +1,97 @@
|
|
|
1
|
+
require 'cocoapods-tdfire-binary/binary_state_store'
|
|
2
|
+
require 'colorize'
|
|
3
|
+
|
|
4
|
+
module Pod
|
|
5
|
+
class Specification
|
|
6
|
+
module DSL
|
|
7
|
+
|
|
8
|
+
public
|
|
9
|
+
|
|
10
|
+
# 源码依赖配置
|
|
11
|
+
def tdfire_source(&block)
|
|
12
|
+
if !Tdfire::BinaryStateStore.use_binary? || Tdfire::BinaryStateStore.use_source_pods.include?(self.name)
|
|
13
|
+
if !Tdfire::BinaryStateStore.printed_pods.include?(name)
|
|
14
|
+
UI.puts "Source".magenta.bold + " dependecy for " + "#{name} #{version}".light_blue
|
|
15
|
+
Tdfire::BinaryStateStore.printed_pods << name
|
|
16
|
+
end
|
|
17
|
+
|
|
18
|
+
yield self if block_given?
|
|
19
|
+
end
|
|
20
|
+
end
|
|
21
|
+
|
|
22
|
+
# 二进制依赖配置
|
|
23
|
+
def tdfire_binary(&block)
|
|
24
|
+
if Tdfire::BinaryStateStore.use_binary? && !Tdfire::BinaryStateStore.use_source_pods.include?(self.name)
|
|
25
|
+
if !Tdfire::BinaryStateStore.printed_pods.include?(name)
|
|
26
|
+
UI.puts "Binary".cyan.bold + " dependecy for " + "#{name} #{version}".light_blue
|
|
27
|
+
Tdfire::BinaryStateStore.printed_pods << name
|
|
28
|
+
end
|
|
29
|
+
|
|
30
|
+
yield self if block_given?
|
|
31
|
+
end
|
|
32
|
+
end
|
|
33
|
+
|
|
34
|
+
# 配置二进制文件下载、cache 住解压好的 framework
|
|
35
|
+
def tdfire_set_binary_download_configurations_at_last(download_url = nil)
|
|
36
|
+
raise Pod::Informative, "You must invoke the method after setting name and version" if name.nil? || version.nil?
|
|
37
|
+
|
|
38
|
+
set_framework_preserve_paths
|
|
39
|
+
set_framework_download_script(download_url || framework_url_for_pod_version(name, version))
|
|
40
|
+
end
|
|
41
|
+
|
|
42
|
+
private
|
|
43
|
+
|
|
44
|
+
def framework_url_for_pod_version(pod, version)
|
|
45
|
+
"http://10.1.131.104:8080/getframework/PRODUCTION/#{pod}/#{version}"
|
|
46
|
+
end
|
|
47
|
+
|
|
48
|
+
def set_framework_preserve_paths
|
|
49
|
+
framework_preserve_paths = ["#{name}.framework"]
|
|
50
|
+
framework_preserve_paths += consumer(Platform.ios).preserve_paths unless consumer(Platform.ios).preserve_paths.nil?
|
|
51
|
+
|
|
52
|
+
# preserve_paths = xxx 无法不会将值设置进去,不明白其原理
|
|
53
|
+
store_attribute('preserve_paths', framework_preserve_paths)
|
|
54
|
+
end
|
|
55
|
+
|
|
56
|
+
def set_framework_download_script(download_url)
|
|
57
|
+
framework_name = "#{name}.framework"
|
|
58
|
+
framework_relative_path = "Carthage/Build/iOS/#{framework_name}"
|
|
59
|
+
|
|
60
|
+
download_script = <<-EOF
|
|
61
|
+
#!/bin/sh
|
|
62
|
+
|
|
63
|
+
if [[ -d #{framework_name} ]]; then
|
|
64
|
+
echo "Tdfire: #{framework_name} is not empty"
|
|
65
|
+
exit 0
|
|
66
|
+
fi
|
|
67
|
+
|
|
68
|
+
if [[ ! -d tdfire_download_temp ]]; then
|
|
69
|
+
mkdir tdfire_download_temp
|
|
70
|
+
fi
|
|
71
|
+
|
|
72
|
+
cd tdfire_download_temp
|
|
73
|
+
|
|
74
|
+
curl --fail -O -J -v #{download_url}
|
|
75
|
+
|
|
76
|
+
if [[ -f #{framework_name}.zip ]]; then
|
|
77
|
+
echo "Tdfire: copying #{framework_name} ..."
|
|
78
|
+
|
|
79
|
+
unzip #{framework_name}.zip
|
|
80
|
+
cp -fr #{framework_relative_path} ../
|
|
81
|
+
fi
|
|
82
|
+
|
|
83
|
+
cd ..
|
|
84
|
+
rm -fr tdfire_download_temp
|
|
85
|
+
|
|
86
|
+
echo "pod cache path for #{name}: $(pwd)"
|
|
87
|
+
EOF
|
|
88
|
+
|
|
89
|
+
eval_download_script = %Q[echo '#{download_script}' > download.sh && sh download.sh && rm download.sh]
|
|
90
|
+
eval_download_script += " && " << prepare_command unless prepare_command.nil?
|
|
91
|
+
|
|
92
|
+
# prepare_command = xxx 在内部执行的话,无法将值设置进hash,不明白其原理
|
|
93
|
+
store_attribute('prepare_command', eval_download_script)
|
|
94
|
+
end
|
|
95
|
+
end
|
|
96
|
+
end
|
|
97
|
+
end
|
data/spec/spec_helper.rb
ADDED
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
require 'pathname'
|
|
2
|
+
ROOT = Pathname.new(File.expand_path('../../', __FILE__))
|
|
3
|
+
$:.unshift((ROOT + 'lib').to_s)
|
|
4
|
+
$:.unshift((ROOT + 'spec').to_s)
|
|
5
|
+
|
|
6
|
+
require 'bundler/setup'
|
|
7
|
+
require 'bacon'
|
|
8
|
+
require 'mocha-on-bacon'
|
|
9
|
+
require 'pretty_bacon'
|
|
10
|
+
require 'pathname'
|
|
11
|
+
require 'cocoapods'
|
|
12
|
+
|
|
13
|
+
Mocha::Configuration.prevent(:stubbing_non_existent_method)
|
|
14
|
+
|
|
15
|
+
require 'cocoapods_plugin'
|
|
16
|
+
|
|
17
|
+
#-----------------------------------------------------------------------------#
|
|
18
|
+
|
|
19
|
+
module Pod
|
|
20
|
+
|
|
21
|
+
# Disable the wrapping so the output is deterministic in the tests.
|
|
22
|
+
#
|
|
23
|
+
UI.disable_wrap = true
|
|
24
|
+
|
|
25
|
+
# Redirects the messages to an internal store.
|
|
26
|
+
#
|
|
27
|
+
module UI
|
|
28
|
+
@output = ''
|
|
29
|
+
@warnings = ''
|
|
30
|
+
|
|
31
|
+
class << self
|
|
32
|
+
attr_accessor :output
|
|
33
|
+
attr_accessor :warnings
|
|
34
|
+
|
|
35
|
+
def puts(message = '')
|
|
36
|
+
@output << "#{message}\n"
|
|
37
|
+
end
|
|
38
|
+
|
|
39
|
+
def warn(message = '', actions = [])
|
|
40
|
+
@warnings << "#{message}\n"
|
|
41
|
+
end
|
|
42
|
+
|
|
43
|
+
def print(message)
|
|
44
|
+
@output << message
|
|
45
|
+
end
|
|
46
|
+
end
|
|
47
|
+
end
|
|
48
|
+
end
|
|
49
|
+
|
|
50
|
+
#-----------------------------------------------------------------------------#
|
metadata
ADDED
|
@@ -0,0 +1,120 @@
|
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
|
2
|
+
name: cocoapods-tdfire-binary
|
|
3
|
+
version: !ruby/object:Gem::Version
|
|
4
|
+
version: 0.1.0
|
|
5
|
+
platform: ruby
|
|
6
|
+
authors:
|
|
7
|
+
- tripleCC
|
|
8
|
+
autorequire:
|
|
9
|
+
bindir: bin
|
|
10
|
+
cert_chain: []
|
|
11
|
+
date: 2018-03-16 00:00:00.000000000 Z
|
|
12
|
+
dependencies:
|
|
13
|
+
- !ruby/object:Gem::Dependency
|
|
14
|
+
name: bundler
|
|
15
|
+
requirement: !ruby/object:Gem::Requirement
|
|
16
|
+
requirements:
|
|
17
|
+
- - "~>"
|
|
18
|
+
- !ruby/object:Gem::Version
|
|
19
|
+
version: '1.3'
|
|
20
|
+
type: :development
|
|
21
|
+
prerelease: false
|
|
22
|
+
version_requirements: !ruby/object:Gem::Requirement
|
|
23
|
+
requirements:
|
|
24
|
+
- - "~>"
|
|
25
|
+
- !ruby/object:Gem::Version
|
|
26
|
+
version: '1.3'
|
|
27
|
+
- !ruby/object:Gem::Dependency
|
|
28
|
+
name: rake
|
|
29
|
+
requirement: !ruby/object:Gem::Requirement
|
|
30
|
+
requirements:
|
|
31
|
+
- - "~>"
|
|
32
|
+
- !ruby/object:Gem::Version
|
|
33
|
+
version: '12.0'
|
|
34
|
+
type: :development
|
|
35
|
+
prerelease: false
|
|
36
|
+
version_requirements: !ruby/object:Gem::Requirement
|
|
37
|
+
requirements:
|
|
38
|
+
- - "~>"
|
|
39
|
+
- !ruby/object:Gem::Version
|
|
40
|
+
version: '12.0'
|
|
41
|
+
- !ruby/object:Gem::Dependency
|
|
42
|
+
name: cocoapods
|
|
43
|
+
requirement: !ruby/object:Gem::Requirement
|
|
44
|
+
requirements:
|
|
45
|
+
- - "~>"
|
|
46
|
+
- !ruby/object:Gem::Version
|
|
47
|
+
version: '1.4'
|
|
48
|
+
type: :runtime
|
|
49
|
+
prerelease: false
|
|
50
|
+
version_requirements: !ruby/object:Gem::Requirement
|
|
51
|
+
requirements:
|
|
52
|
+
- - "~>"
|
|
53
|
+
- !ruby/object:Gem::Version
|
|
54
|
+
version: '1.4'
|
|
55
|
+
- !ruby/object:Gem::Dependency
|
|
56
|
+
name: colorize
|
|
57
|
+
requirement: !ruby/object:Gem::Requirement
|
|
58
|
+
requirements:
|
|
59
|
+
- - "~>"
|
|
60
|
+
- !ruby/object:Gem::Version
|
|
61
|
+
version: '0.8'
|
|
62
|
+
type: :runtime
|
|
63
|
+
prerelease: false
|
|
64
|
+
version_requirements: !ruby/object:Gem::Requirement
|
|
65
|
+
requirements:
|
|
66
|
+
- - "~>"
|
|
67
|
+
- !ruby/object:Gem::Version
|
|
68
|
+
version: '0.8'
|
|
69
|
+
description: cocoapods-tdfire-binary is a plugin which helps developer switching there
|
|
70
|
+
project dependency between source and binary.
|
|
71
|
+
email:
|
|
72
|
+
- triplec.linux@gmail.com
|
|
73
|
+
executables: []
|
|
74
|
+
extensions: []
|
|
75
|
+
extra_rdoc_files: []
|
|
76
|
+
files:
|
|
77
|
+
- ".gitignore"
|
|
78
|
+
- Gemfile
|
|
79
|
+
- Gemfile.lock
|
|
80
|
+
- LICENSE.txt
|
|
81
|
+
- README.md
|
|
82
|
+
- Rakefile
|
|
83
|
+
- cocoapods-tdfire-binary.gemspec
|
|
84
|
+
- lib/cocoapods-tdfire-binary.rb
|
|
85
|
+
- lib/cocoapods-tdfire-binary/binary_state_store.rb
|
|
86
|
+
- lib/cocoapods-tdfire-binary/gem_version.rb
|
|
87
|
+
- lib/cocoapods-tdfire-binary/podfile_dsl.rb
|
|
88
|
+
- lib/cocoapods-tdfire-binary/podfile_hook.rb
|
|
89
|
+
- lib/cocoapods-tdfire-binary/specification_dsl.rb
|
|
90
|
+
- lib/cocoapods_plugin.rb
|
|
91
|
+
- spec/command/binary_spec.rb
|
|
92
|
+
- spec/spec_helper.rb
|
|
93
|
+
homepage: https://github.com/EXAMPLE/cocoapods-tdfire-binary
|
|
94
|
+
licenses:
|
|
95
|
+
- MIT
|
|
96
|
+
metadata: {}
|
|
97
|
+
post_install_message:
|
|
98
|
+
rdoc_options: []
|
|
99
|
+
require_paths:
|
|
100
|
+
- lib
|
|
101
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
|
102
|
+
requirements:
|
|
103
|
+
- - ">="
|
|
104
|
+
- !ruby/object:Gem::Version
|
|
105
|
+
version: '0'
|
|
106
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
|
107
|
+
requirements:
|
|
108
|
+
- - ">="
|
|
109
|
+
- !ruby/object:Gem::Version
|
|
110
|
+
version: '0'
|
|
111
|
+
requirements: []
|
|
112
|
+
rubyforge_project:
|
|
113
|
+
rubygems_version: 2.6.14
|
|
114
|
+
signing_key:
|
|
115
|
+
specification_version: 4
|
|
116
|
+
summary: cocoapods-tdfire-binary is a plugin which helps developer switching there
|
|
117
|
+
project dependency between source and binary.
|
|
118
|
+
test_files:
|
|
119
|
+
- spec/command/binary_spec.rb
|
|
120
|
+
- spec/spec_helper.rb
|