cocoapods-binary-cache 0.1.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (66) hide show
  1. checksums.yaml +7 -0
  2. data/lib/cocoapods-binary-cache.rb +4 -0
  3. data/lib/cocoapods-binary-cache/cache/all.rb +9 -0
  4. data/lib/cocoapods-binary-cache/cache/validation_result.rb +69 -0
  5. data/lib/cocoapods-binary-cache/cache/validator.rb +21 -0
  6. data/lib/cocoapods-binary-cache/cache/validator_accumulated.rb +4 -0
  7. data/lib/cocoapods-binary-cache/cache/validator_base.rb +92 -0
  8. data/lib/cocoapods-binary-cache/cache/validator_dependencies_graph.rb +20 -0
  9. data/lib/cocoapods-binary-cache/cache/validator_dev_pods.rb +22 -0
  10. data/lib/cocoapods-binary-cache/cache/validator_exclusion.rb +14 -0
  11. data/lib/cocoapods-binary-cache/cache/validator_non_dev_pods.rb +13 -0
  12. data/lib/cocoapods-binary-cache/cache/validator_with_podfile.rb +9 -0
  13. data/lib/cocoapods-binary-cache/dependencies_graph/dependencies_graph.rb +95 -0
  14. data/lib/cocoapods-binary-cache/dependencies_graph/graph_visualizer.rb +74 -0
  15. data/lib/cocoapods-binary-cache/gem_version.rb +6 -0
  16. data/lib/cocoapods-binary-cache/helper/benchmark_show.rb +11 -0
  17. data/lib/cocoapods-binary-cache/helper/checksum.rb +12 -0
  18. data/lib/cocoapods-binary-cache/helper/json.rb +37 -0
  19. data/lib/cocoapods-binary-cache/helper/lockfile.rb +67 -0
  20. data/lib/cocoapods-binary-cache/helper/path_utils.rb +8 -0
  21. data/lib/cocoapods-binary-cache/helper/podspec.rb +17 -0
  22. data/lib/cocoapods-binary-cache/hooks/post_install.rb +16 -0
  23. data/lib/cocoapods-binary-cache/hooks/pre_install.rb +141 -0
  24. data/lib/cocoapods-binary-cache/main.rb +21 -0
  25. data/lib/cocoapods-binary-cache/pod-binary/LICENSE.txt +22 -0
  26. data/lib/cocoapods-binary-cache/pod-binary/helper/detected_prebuilt_pods/installer.rb +25 -0
  27. data/lib/cocoapods-binary-cache/pod-binary/helper/detected_prebuilt_pods/target_definition.rb +36 -0
  28. data/lib/cocoapods-binary-cache/pod-binary/helper/feature_switches.rb +90 -0
  29. data/lib/cocoapods-binary-cache/pod-binary/helper/names.rb +36 -0
  30. data/lib/cocoapods-binary-cache/pod-binary/helper/passer.rb +25 -0
  31. data/lib/cocoapods-binary-cache/pod-binary/helper/podfile_options.rb +2 -0
  32. data/lib/cocoapods-binary-cache/pod-binary/helper/prebuild_sandbox.rb +71 -0
  33. data/lib/cocoapods-binary-cache/pod-binary/helper/target_checker.rb +45 -0
  34. data/lib/cocoapods-binary-cache/pod-binary/integration.rb +12 -0
  35. data/lib/cocoapods-binary-cache/pod-binary/integration/alter_specs.rb +93 -0
  36. data/lib/cocoapods-binary-cache/pod-binary/integration/patch/embed_framework_script.rb +36 -0
  37. data/lib/cocoapods-binary-cache/pod-binary/integration/patch/resolve_dependencies.rb +23 -0
  38. data/lib/cocoapods-binary-cache/pod-binary/integration/patch/source_installation.rb +28 -0
  39. data/lib/cocoapods-binary-cache/pod-binary/integration/remove_target_files.rb +29 -0
  40. data/lib/cocoapods-binary-cache/pod-binary/integration/source_installer.rb +111 -0
  41. data/lib/cocoapods-binary-cache/pod-binary/integration/validation.rb +20 -0
  42. data/lib/cocoapods-binary-cache/pod-binary/prebuild.rb +224 -0
  43. data/lib/cocoapods-binary-cache/pod-binary/prebuild_dsl.rb +69 -0
  44. data/lib/cocoapods-binary-cache/pod-binary/prebuild_hook.rb +11 -0
  45. data/lib/cocoapods-binary-cache/pod-binary/tool/tool.rb +12 -0
  46. data/lib/cocoapods-binary-cache/pod-rome/LICENSE.txt +22 -0
  47. data/lib/cocoapods-binary-cache/pod-rome/build_framework.rb +247 -0
  48. data/lib/cocoapods-binary-cache/prebuild_cache.rb +49 -0
  49. data/lib/cocoapods-binary-cache/prebuild_output/metadata.rb +47 -0
  50. data/lib/cocoapods-binary-cache/prebuild_output/output.rb +71 -0
  51. data/lib/cocoapods-binary-cache/scheme_editor.rb +35 -0
  52. data/lib/cocoapods-binary-cache/state_store.rb +11 -0
  53. data/lib/cocoapods-binary-cache/ui.rb +9 -0
  54. data/lib/cocoapods_plugin.rb +5 -0
  55. data/lib/command/binary.rb +18 -0
  56. data/lib/command/config.rb +31 -0
  57. data/lib/command/executor/base.rb +20 -0
  58. data/lib/command/executor/fetcher.rb +44 -0
  59. data/lib/command/executor/prebuilder.rb +58 -0
  60. data/lib/command/executor/pusher.rb +19 -0
  61. data/lib/command/executor/visualizer.rb +20 -0
  62. data/lib/command/fetch.rb +23 -0
  63. data/lib/command/helper/zip.rb +20 -0
  64. data/lib/command/prebuild.rb +29 -0
  65. data/lib/command/visualize.rb +30 -0
  66. metadata +193 -0
@@ -0,0 +1,23 @@
1
+ require_relative "executor/fetcher"
2
+
3
+ module Pod
4
+ class Command
5
+ class Binary < Command
6
+ class Fetch < Binary
7
+ self.arguments = [CLAide::Argument.new("CACHE-BRANCH", false)]
8
+
9
+ def initialize(argv)
10
+ super
11
+ @fetcher = PodPrebuild::CacheFetcher.new(
12
+ config: prebuild_config,
13
+ cache_branch: argv.shift_argument || "master"
14
+ )
15
+ end
16
+
17
+ def run
18
+ @fetcher.run
19
+ end
20
+ end
21
+ end
22
+ end
23
+ end
@@ -0,0 +1,20 @@
1
+ module PodPrebuild
2
+ module ZipUtils
3
+ def self.zip(path, to_dir: nil)
4
+ basename = File.basename(path)
5
+ out_path = to_dir.nil? ? "#{basename}.zip" : "#{to_dir}/#{basename}.zip"
6
+ cmd = []
7
+ cmd << "cd" << File.dirname(path)
8
+ cmd << "&& zip --symlinks" << out_path << basename
9
+ cmd << "&& cd -"
10
+ `#{cmd.join(" ")}`
11
+ end
12
+
13
+ def self.unzip(path, to_dir: nil)
14
+ cmd = []
15
+ cmd << "unzip -q" << path
16
+ cmd << "-d" << to_dir unless to_dir.nil?
17
+ `#{cmd.join(" ")}`
18
+ end
19
+ end
20
+ end
@@ -0,0 +1,29 @@
1
+ require_relative "executor/prebuilder"
2
+
3
+ module Pod
4
+ class Command
5
+ class Binary < Command
6
+ class Prebuild < Binary
7
+ self.arguments = [CLAide::Argument.new("CACHE-BRANCH", false)]
8
+ def self.options
9
+ [
10
+ ["--push", "Push cache to repo upon completion"]
11
+ ]
12
+ end
13
+
14
+ def initialize(argv)
15
+ super
16
+ @prebuilder = PodPrebuild::CachePrebuilder.new(
17
+ config: prebuild_config,
18
+ cache_branch: argv.shift_argument || "master",
19
+ push_cache: argv.flag?("push")
20
+ )
21
+ end
22
+
23
+ def run
24
+ @prebuilder.run
25
+ end
26
+ end
27
+ end
28
+ end
29
+ end
@@ -0,0 +1,30 @@
1
+ require_relative "executor/visualizer"
2
+
3
+ module Pod
4
+ class Command
5
+ class Binary < Command
6
+ class Viz < Binary
7
+ self.arguments = [CLAide::Argument.new("OUTPUT-DIR", false)]
8
+ def self.options
9
+ [
10
+ ["--open", "Open the graph upon completion"]
11
+ ]
12
+ end
13
+
14
+ def initialize(argv)
15
+ super
16
+ @visualizer = PodPrebuild::Visualizer.new(
17
+ config: prebuild_config,
18
+ lockfile: config.lockfile,
19
+ output_dir: argv.shift_argument || ".",
20
+ open: argv.flag?("open")
21
+ )
22
+ end
23
+
24
+ def run
25
+ @visualizer.run
26
+ end
27
+ end
28
+ end
29
+ end
30
+ end
metadata ADDED
@@ -0,0 +1,193 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: cocoapods-binary-cache
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.1.1
5
+ platform: ruby
6
+ authors:
7
+ - Bang Nguyen
8
+ autorequire:
9
+ bindir: bin
10
+ cert_chain: []
11
+ date: 2020-06-29 00:00:00.000000000 Z
12
+ dependencies:
13
+ - !ruby/object:Gem::Dependency
14
+ name: cocoapods
15
+ requirement: !ruby/object:Gem::Requirement
16
+ requirements:
17
+ - - ">="
18
+ - !ruby/object:Gem::Version
19
+ version: 1.5.0
20
+ type: :runtime
21
+ prerelease: false
22
+ version_requirements: !ruby/object:Gem::Requirement
23
+ requirements:
24
+ - - ">="
25
+ - !ruby/object:Gem::Version
26
+ version: 1.5.0
27
+ - !ruby/object:Gem::Dependency
28
+ name: fourflusher
29
+ requirement: !ruby/object:Gem::Requirement
30
+ requirements:
31
+ - - "~>"
32
+ - !ruby/object:Gem::Version
33
+ version: '2.0'
34
+ type: :runtime
35
+ prerelease: false
36
+ version_requirements: !ruby/object:Gem::Requirement
37
+ requirements:
38
+ - - "~>"
39
+ - !ruby/object:Gem::Version
40
+ version: '2.0'
41
+ - !ruby/object:Gem::Dependency
42
+ name: xcpretty
43
+ requirement: !ruby/object:Gem::Requirement
44
+ requirements:
45
+ - - "~>"
46
+ - !ruby/object:Gem::Version
47
+ version: 0.3.0
48
+ type: :runtime
49
+ prerelease: false
50
+ version_requirements: !ruby/object:Gem::Requirement
51
+ requirements:
52
+ - - "~>"
53
+ - !ruby/object:Gem::Version
54
+ version: 0.3.0
55
+ - !ruby/object:Gem::Dependency
56
+ name: rgl
57
+ requirement: !ruby/object:Gem::Requirement
58
+ requirements:
59
+ - - "~>"
60
+ - !ruby/object:Gem::Version
61
+ version: 0.5.6
62
+ type: :runtime
63
+ prerelease: false
64
+ version_requirements: !ruby/object:Gem::Requirement
65
+ requirements:
66
+ - - "~>"
67
+ - !ruby/object:Gem::Version
68
+ version: 0.5.6
69
+ - !ruby/object:Gem::Dependency
70
+ name: bundler
71
+ requirement: !ruby/object:Gem::Requirement
72
+ requirements:
73
+ - - "~>"
74
+ - !ruby/object:Gem::Version
75
+ version: '1.3'
76
+ type: :development
77
+ prerelease: false
78
+ version_requirements: !ruby/object:Gem::Requirement
79
+ requirements:
80
+ - - "~>"
81
+ - !ruby/object:Gem::Version
82
+ version: '1.3'
83
+ - !ruby/object:Gem::Dependency
84
+ name: rake
85
+ requirement: !ruby/object:Gem::Requirement
86
+ requirements:
87
+ - - "~>"
88
+ - !ruby/object:Gem::Version
89
+ version: '10.0'
90
+ type: :development
91
+ prerelease: false
92
+ version_requirements: !ruby/object:Gem::Requirement
93
+ requirements:
94
+ - - "~>"
95
+ - !ruby/object:Gem::Version
96
+ version: '10.0'
97
+ description: Reduce build time by building pod frameworks and cache to remote storage,
98
+ reuse on multiple machines
99
+ email:
100
+ - bang.nguyen@grabtaxi.com
101
+ executables: []
102
+ extensions: []
103
+ extra_rdoc_files: []
104
+ files:
105
+ - lib/cocoapods-binary-cache.rb
106
+ - lib/cocoapods-binary-cache/cache/all.rb
107
+ - lib/cocoapods-binary-cache/cache/validation_result.rb
108
+ - lib/cocoapods-binary-cache/cache/validator.rb
109
+ - lib/cocoapods-binary-cache/cache/validator_accumulated.rb
110
+ - lib/cocoapods-binary-cache/cache/validator_base.rb
111
+ - lib/cocoapods-binary-cache/cache/validator_dependencies_graph.rb
112
+ - lib/cocoapods-binary-cache/cache/validator_dev_pods.rb
113
+ - lib/cocoapods-binary-cache/cache/validator_exclusion.rb
114
+ - lib/cocoapods-binary-cache/cache/validator_non_dev_pods.rb
115
+ - lib/cocoapods-binary-cache/cache/validator_with_podfile.rb
116
+ - lib/cocoapods-binary-cache/dependencies_graph/dependencies_graph.rb
117
+ - lib/cocoapods-binary-cache/dependencies_graph/graph_visualizer.rb
118
+ - lib/cocoapods-binary-cache/gem_version.rb
119
+ - lib/cocoapods-binary-cache/helper/benchmark_show.rb
120
+ - lib/cocoapods-binary-cache/helper/checksum.rb
121
+ - lib/cocoapods-binary-cache/helper/json.rb
122
+ - lib/cocoapods-binary-cache/helper/lockfile.rb
123
+ - lib/cocoapods-binary-cache/helper/path_utils.rb
124
+ - lib/cocoapods-binary-cache/helper/podspec.rb
125
+ - lib/cocoapods-binary-cache/hooks/post_install.rb
126
+ - lib/cocoapods-binary-cache/hooks/pre_install.rb
127
+ - lib/cocoapods-binary-cache/main.rb
128
+ - lib/cocoapods-binary-cache/pod-binary/LICENSE.txt
129
+ - lib/cocoapods-binary-cache/pod-binary/helper/detected_prebuilt_pods/installer.rb
130
+ - lib/cocoapods-binary-cache/pod-binary/helper/detected_prebuilt_pods/target_definition.rb
131
+ - lib/cocoapods-binary-cache/pod-binary/helper/feature_switches.rb
132
+ - lib/cocoapods-binary-cache/pod-binary/helper/names.rb
133
+ - lib/cocoapods-binary-cache/pod-binary/helper/passer.rb
134
+ - lib/cocoapods-binary-cache/pod-binary/helper/podfile_options.rb
135
+ - lib/cocoapods-binary-cache/pod-binary/helper/prebuild_sandbox.rb
136
+ - lib/cocoapods-binary-cache/pod-binary/helper/target_checker.rb
137
+ - lib/cocoapods-binary-cache/pod-binary/integration.rb
138
+ - lib/cocoapods-binary-cache/pod-binary/integration/alter_specs.rb
139
+ - lib/cocoapods-binary-cache/pod-binary/integration/patch/embed_framework_script.rb
140
+ - lib/cocoapods-binary-cache/pod-binary/integration/patch/resolve_dependencies.rb
141
+ - lib/cocoapods-binary-cache/pod-binary/integration/patch/source_installation.rb
142
+ - lib/cocoapods-binary-cache/pod-binary/integration/remove_target_files.rb
143
+ - lib/cocoapods-binary-cache/pod-binary/integration/source_installer.rb
144
+ - lib/cocoapods-binary-cache/pod-binary/integration/validation.rb
145
+ - lib/cocoapods-binary-cache/pod-binary/prebuild.rb
146
+ - lib/cocoapods-binary-cache/pod-binary/prebuild_dsl.rb
147
+ - lib/cocoapods-binary-cache/pod-binary/prebuild_hook.rb
148
+ - lib/cocoapods-binary-cache/pod-binary/tool/tool.rb
149
+ - lib/cocoapods-binary-cache/pod-rome/LICENSE.txt
150
+ - lib/cocoapods-binary-cache/pod-rome/build_framework.rb
151
+ - lib/cocoapods-binary-cache/prebuild_cache.rb
152
+ - lib/cocoapods-binary-cache/prebuild_output/metadata.rb
153
+ - lib/cocoapods-binary-cache/prebuild_output/output.rb
154
+ - lib/cocoapods-binary-cache/scheme_editor.rb
155
+ - lib/cocoapods-binary-cache/state_store.rb
156
+ - lib/cocoapods-binary-cache/ui.rb
157
+ - lib/cocoapods_plugin.rb
158
+ - lib/command/binary.rb
159
+ - lib/command/config.rb
160
+ - lib/command/executor/base.rb
161
+ - lib/command/executor/fetcher.rb
162
+ - lib/command/executor/prebuilder.rb
163
+ - lib/command/executor/pusher.rb
164
+ - lib/command/executor/visualizer.rb
165
+ - lib/command/fetch.rb
166
+ - lib/command/helper/zip.rb
167
+ - lib/command/prebuild.rb
168
+ - lib/command/visualize.rb
169
+ homepage: https://github.com/grab/cocoapods-binary-cache
170
+ licenses:
171
+ - MIT
172
+ metadata: {}
173
+ post_install_message:
174
+ rdoc_options: []
175
+ require_paths:
176
+ - lib
177
+ required_ruby_version: !ruby/object:Gem::Requirement
178
+ requirements:
179
+ - - ">="
180
+ - !ruby/object:Gem::Version
181
+ version: '0'
182
+ required_rubygems_version: !ruby/object:Gem::Requirement
183
+ requirements:
184
+ - - ">="
185
+ - !ruby/object:Gem::Version
186
+ version: '0'
187
+ requirements: []
188
+ rubygems_version: 3.0.8
189
+ signing_key:
190
+ specification_version: 4
191
+ summary: Reduce build time by building pod frameworks and cache to remote storage,
192
+ reuse on multiple machines
193
+ test_files: []