pod-builder 0.2.6 → 0.2.8
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 +4 -4
- data/README.md +0 -2
- data/exe/pod_builder +6 -6
- data/lib/pod_builder/command/build.rb +2 -2
- data/lib/pod_builder/command/clean.rb +2 -2
- data/lib/pod_builder/command/install_sources.rb +2 -2
- data/lib/pod_builder/command/switch.rb +5 -3
- data/lib/pod_builder/command/sync_podfile.rb +2 -2
- data/lib/pod_builder/podfile.rb +4 -4
- data/lib/pod_builder/podfile_item.rb +1 -1
- data/lib/pod_builder/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 70632176b753ecce7d6ffa8e968546ba88cce99df5d5810f6ed5d9802e2c99f4
|
4
|
+
data.tar.gz: 639533ae3bd2fe6ac792f3330e1c4e73c3dbb4918da5b8609bc762dfe27c4e88
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 01f54c0a1b3eeecce57dabfea2e1dec294e3cc120f61e60c6294010ac964572bf52baa7211a2213c5aaca8c9d75fadcb16d5f5e1da758bffebad3150a6b0f8d3
|
7
|
+
data.tar.gz: e5dd822174febbeb36d59014532ae443bb7323241e96ed36ada123a453dfca1e0e39ebdf126c53b488ff02d44888aa006ec8bab020422b2e5e6d8efbd2bc664c
|
data/README.md
CHANGED
@@ -1,5 +1,3 @@
|
|
1
|
-
## Beta tool: distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
2
|
-
|
3
1
|
# What is PodBuilder
|
4
2
|
|
5
3
|
PodBuilder is a complementary tool to [CocoaPods](https://github.com/CocoaPods/CocoaPods) that allows to prebuild pods into frameworks which can then be included into a project’s repo. Instead of committing pod’s source code you add its compiled counterpart. While there is a size penalty in doing so, which can be overcome by using [Git-LFS](#git-lfs), compilation times will decrease significantly because pod's source files no longer need to be recompiled _very often_. Additionally frameworks contain all architecture so they’re ready to be used both on any device and simulator.
|
data/exe/pod_builder
CHANGED
@@ -57,8 +57,8 @@ Usage:
|
|
57
57
|
|
58
58
|
Options:
|
59
59
|
"
|
60
|
-
opts.on("-u", "--update", "
|
61
|
-
OPTIONS[:update_repos] =
|
60
|
+
opts.on("-u", "--skip-repo-update", "Skip CocoaPods repo update") do |o|
|
61
|
+
OPTIONS[:update_repos] = false
|
62
62
|
end
|
63
63
|
opts.on("-w", "--allow-warnings", "Allow warnings") do |o|
|
64
64
|
OPTIONS[:allow_warnings] = o
|
@@ -83,8 +83,8 @@ Usage:
|
|
83
83
|
|
84
84
|
Options:
|
85
85
|
"
|
86
|
-
opts.on("-u", "--update", "
|
87
|
-
OPTIONS[:update_repos] =
|
86
|
+
opts.on("-u", "--skip-repo-update", "Skip CocoaPods repo update") do |o|
|
87
|
+
OPTIONS[:update_repos] = false
|
88
88
|
end
|
89
89
|
opts.on("-w", "--allow-warnings", "Allow warnings") do |o|
|
90
90
|
OPTIONS[:allow_warnings] = o
|
@@ -109,8 +109,8 @@ Usage:
|
|
109
109
|
|
110
110
|
Options:
|
111
111
|
"
|
112
|
-
opts.on("-u", "--update", "
|
113
|
-
OPTIONS[:update_repos] =
|
112
|
+
opts.on("-u", "--skip-repo-update", "Skip CocoaPods repo update") do |o|
|
113
|
+
OPTIONS[:update_repos] = false
|
114
114
|
end
|
115
115
|
opts.on("-d", "--debug", "Don't clean build folder") do |o|
|
116
116
|
OPTIONS[:debug] = o
|
@@ -16,8 +16,8 @@ module PodBuilder
|
|
16
16
|
|
17
17
|
check_not_building_subspecs(argument_pods)
|
18
18
|
|
19
|
-
|
20
|
-
installer, analyzer = Analyze.installer_at(PodBuilder::basepath,
|
19
|
+
install_update_repo = options[:update_repos] || true
|
20
|
+
installer, analyzer = Analyze.installer_at(PodBuilder::basepath, install_update_repo)
|
21
21
|
|
22
22
|
all_buildable_items = Analyze.podfile_items(installer, analyzer)
|
23
23
|
prebuilt_items = all_buildable_items.select { |x| x.is_prebuilt }
|
@@ -8,8 +8,8 @@ module PodBuilder
|
|
8
8
|
Configuration.check_inited
|
9
9
|
PodBuilder::prepare_basepath
|
10
10
|
|
11
|
-
|
12
|
-
installer, analyzer = Analyze.installer_at(PodBuilder::basepath)
|
11
|
+
install_update_repo = options[:update_repos] || true
|
12
|
+
installer, analyzer = Analyze.installer_at(PodBuilder::basepath, install_update_repo)
|
13
13
|
all_buildable_items = Analyze.podfile_items(installer, analyzer)
|
14
14
|
|
15
15
|
podspec_names = all_buildable_items.map(&:podspec_name)
|
@@ -7,8 +7,8 @@ module PodBuilder
|
|
7
7
|
Configuration.check_inited
|
8
8
|
PodBuilder::prepare_basepath
|
9
9
|
|
10
|
-
|
11
|
-
installer, analyzer = Analyze.installer_at(PodBuilder::basepath)
|
10
|
+
install_update_repo = options[:update_repos] || true
|
11
|
+
installer, analyzer = Analyze.installer_at(PodBuilder::basepath, install_update_repo)
|
12
12
|
framework_items = Analyze.podfile_items(installer, analyzer).select { |x| !x.is_prebuilt }
|
13
13
|
podspec_names = framework_items.map(&:podspec_name)
|
14
14
|
|
@@ -84,6 +84,7 @@ module PodBuilder
|
|
84
84
|
line = indentation + podfile_item.prebuilt_entry + "\n"
|
85
85
|
when "development"
|
86
86
|
podfile_item.path = find_podspec(podfile_item)
|
87
|
+
podfile_item.is_external = true
|
87
88
|
|
88
89
|
line = indentation + podfile_item.entry + "\n"
|
89
90
|
when "default"
|
@@ -113,6 +114,7 @@ module PodBuilder
|
|
113
114
|
Configuration.development_pods_paths.each do |path|
|
114
115
|
podspec = Dir.glob(File.expand_path("#{path}/**/#{podfile_item.root_name}*.podspec*"))
|
115
116
|
podspec.select! { |x| !x.include?("/Local Podspecs/") }
|
117
|
+
podspec.select! { |x| Dir.glob(File.join(File.dirname(x), "*")).count > 1 } # exclude podspec folder (which has one file per folder)
|
116
118
|
if podspec.count > 0
|
117
119
|
podspec_path = Pathname.new(podspec.first).dirname.to_s
|
118
120
|
break
|
@@ -127,12 +129,12 @@ module PodBuilder
|
|
127
129
|
end
|
128
130
|
|
129
131
|
def self.request_switch_mode(pod_name, podfile_item)
|
130
|
-
matches = podfile_item.entry.match(/(pod '.*?',)(.*)/)
|
131
|
-
unless matches&.size ==
|
132
|
+
matches = podfile_item.entry.match(/(pod '.*?',)(.*)('.*')/)
|
133
|
+
unless matches&.size == 4
|
132
134
|
raise "\n\nFailed matching pod name\n".red
|
133
135
|
end
|
134
136
|
|
135
|
-
default_entry = matches[
|
137
|
+
default_entry = matches[3].strip
|
136
138
|
|
137
139
|
modes = ["prebuilt", "development", "default"]
|
138
140
|
mode_indx = ask("\n\nSwitch #{pod_name} to:\n1) Prebuilt\n2) Development pod\n3) Default (#{default_entry})\n\n") { |x| x.limit = 1, x.validate = /[1-3]/ }
|
@@ -7,8 +7,8 @@ module PodBuilder
|
|
7
7
|
Configuration.check_inited
|
8
8
|
PodBuilder::prepare_basepath
|
9
9
|
|
10
|
-
|
11
|
-
installer, analyzer = Analyze.installer_at(PodBuilder::basepath,
|
10
|
+
install_update_repo = options[:update_repos] || true
|
11
|
+
installer, analyzer = Analyze.installer_at(PodBuilder::basepath, install_update_repo)
|
12
12
|
|
13
13
|
all_buildable_items = Analyze.podfile_items(installer, analyzer)
|
14
14
|
|
data/lib/pod_builder/podfile.rb
CHANGED
@@ -89,13 +89,13 @@ module PodBuilder
|
|
89
89
|
podfile_path = PodBuilder::basepath("Podfile")
|
90
90
|
|
91
91
|
if File.exist?(podfile_restore_path)
|
92
|
-
restore_podfile_items = podfile_items_at(podfile_restore_path)
|
92
|
+
restore_podfile_items = podfile_items_at(podfile_restore_path, include_prebuilt = true)
|
93
93
|
|
94
94
|
podfile_items.map! { |podfile_item|
|
95
95
|
if updated_pod = updated_pods.detect { |x| x.name == podfile_item.name } then
|
96
96
|
updated_pod
|
97
97
|
elsif updated_pods.any? { |x| podfile_item.root_name == x.root_name } == false && # podfile_item shouldn't be among those being updated (including root specification)
|
98
|
-
|
98
|
+
restored_pod = restore_podfile_items.detect { |x| x.name == podfile_item.name }
|
99
99
|
restored_pod
|
100
100
|
else
|
101
101
|
podfile_item
|
@@ -289,7 +289,7 @@ module PodBuilder
|
|
289
289
|
return swift_versions.first
|
290
290
|
end
|
291
291
|
|
292
|
-
def self.podfile_items_at(podfile_path)
|
292
|
+
def self.podfile_items_at(podfile_path, include_prebuilt = false)
|
293
293
|
raise "Expecting basepath folder!" if !File.exist?(PodBuilder::basepath("Podfile"))
|
294
294
|
|
295
295
|
if File.basename(podfile_path) != "Podfile"
|
@@ -305,7 +305,7 @@ module PodBuilder
|
|
305
305
|
installer, analyzer = Analyze.installer_at(PodBuilder::basepath)
|
306
306
|
|
307
307
|
podfile_items = Analyze.podfile_items(installer, analyzer)
|
308
|
-
buildable_items = podfile_items.select { |item| !item.is_prebuilt }
|
308
|
+
buildable_items = podfile_items.select { |item| include_prebuilt || !item.is_prebuilt }
|
309
309
|
rescue Exception => e
|
310
310
|
raise e
|
311
311
|
ensure
|
data/lib/pod_builder/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: pod-builder
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.
|
4
|
+
version: 0.2.8
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Tomas Camin
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2018-
|
11
|
+
date: 2018-10-04 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|