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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: aab2edb1bbd7e199f72160e2751fd324763890823b8060b6733971f4dccd912a
4
- data.tar.gz: c9b4c1adc763130f9a7a3ef772c287c2305d167ddb7bf062cab6d9844cb0fe04
3
+ metadata.gz: 70632176b753ecce7d6ffa8e968546ba88cce99df5d5810f6ed5d9802e2c99f4
4
+ data.tar.gz: 639533ae3bd2fe6ac792f3330e1c4e73c3dbb4918da5b8609bc762dfe27c4e88
5
5
  SHA512:
6
- metadata.gz: afcf5f69a0341469e51d5eb069f661d2b7d2712085210f51d5b10b42ad2be3fc0e5cad1e3a612e13ade1c4fcb18d31fb630ee568a4b7fdc692e202d504739675
7
- data.tar.gz: 7ce11733c073a9706f32be8434017da369e0ad9a1d502cba176de0e8527439aa1c7108937ee185d8b4a433777c76d704156dbcbd3b07b9fb543226f50b87173c
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.
@@ -57,8 +57,8 @@ Usage:
57
57
 
58
58
  Options:
59
59
  "
60
- opts.on("-u", "--update", "Update CocoaPods repos") do |o|
61
- OPTIONS[:update_repos] = o
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", "Update CocoaPods repos") do |o|
87
- OPTIONS[:update_repos] = o
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", "Update CocoaPods repos") do |o|
113
- OPTIONS[:update_repos] = o
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
- update_repo = options[:update_repos] || false
20
- installer, analyzer = Analyze.installer_at(PodBuilder::basepath, update_repo)
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
- update_repo = options[:update_repos] || false
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
- update_repo = options[:update_repos] || false
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 == 3
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[2].strip
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
- update_repo = options[:update_repos] || false
11
- installer, analyzer = Analyze.installer_at(PodBuilder::basepath, update_repo)
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
 
@@ -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
- restored_pod = restore_podfile_items.detect { |x| x.name == podfile_item.name }
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
@@ -60,7 +60,7 @@ module PodBuilder
60
60
 
61
61
  # @return [Bool] Is external pod
62
62
  #
63
- attr_reader :is_external
63
+ attr_accessor :is_external
64
64
 
65
65
  # @return [String] The pod's build configuration
66
66
  #
@@ -1,4 +1,4 @@
1
1
  module PodBuilder
2
- VERSION = "0.2.6"
2
+ VERSION = "0.2.8"
3
3
  end
4
4
 
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.6
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-09-25 00:00:00.000000000 Z
11
+ date: 2018-10-04 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler