pod-builder 4.1.0 → 4.2.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/pod_builder/command/switch.rb +6 -21
- 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: 3f124024bc7aa2aec5af41460be8461e8e3e0dbade8d118637c77dbfb63b125d
|
4
|
+
data.tar.gz: cde1502b7bcbb9a03434ba897d2ac4ab0af5cf4c341ba16aee15f7c6f0695b9b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 030bc3bc42c5a5958a6fb63e0dcc1ea3d917e27958495e20f2e60da8e2f73301647edcfe529ebc48fb65b033e4b99802afa1a03b601d76516f365bb094985d0e
|
7
|
+
data.tar.gz: eeb5eac3de6e946bcdc9ab84eabaf5a527b73cec86935b1e2da7d87e319550fb98a055d911e61de6031ed369e6f631e0ff60457bbf99dc79a89d4fbc989d202c
|
@@ -93,7 +93,7 @@ module PodBuilder
|
|
93
93
|
|
94
94
|
pod_names_to_switch.each do |pod_name_to_switch|
|
95
95
|
development_path = ""
|
96
|
-
|
96
|
+
default_entry = nil
|
97
97
|
|
98
98
|
case OPTIONS[:switch_mode]
|
99
99
|
when "development"
|
@@ -108,22 +108,15 @@ module PodBuilder
|
|
108
108
|
podfile_path = PodBuilder::basepath("Podfile")
|
109
109
|
content = File.read(podfile_path)
|
110
110
|
|
111
|
-
|
112
|
-
content.each_line do |line|
|
113
|
-
stripped_line = line.strip
|
114
|
-
if stripped_line.start_with?("def ") || stripped_line.start_with?("target ")
|
115
|
-
current_section = line.split(" ")[1]
|
116
|
-
next
|
117
|
-
end
|
118
|
-
|
111
|
+
content.each_line do |line|
|
119
112
|
if (matches = line.match(/^\s*pod ['|"](.*?)['|"](.*)/)) && matches.size == 3
|
120
113
|
if matches[1].split("/").first == pod_name_to_switch
|
121
|
-
|
114
|
+
default_entry = line
|
122
115
|
end
|
123
116
|
end
|
124
117
|
end
|
125
118
|
|
126
|
-
raise "\n\n'#{pod_name_to_switch}' not found in PodBuilder's Podfile.\n\nYou might need to explictly add:\n\n pod '#{pod_name_to_switch}'\n\nto #{podfile_path}\n".red if
|
119
|
+
raise "\n\n'#{pod_name_to_switch}' not found in PodBuilder's Podfile.\n\nYou might need to explictly add:\n\n pod '#{pod_name_to_switch}'\n\nto #{podfile_path}\n".red if default_entry.nil?
|
127
120
|
end
|
128
121
|
|
129
122
|
if development_path.nil?
|
@@ -138,13 +131,7 @@ module PodBuilder
|
|
138
131
|
content = File.read(podfile_path)
|
139
132
|
|
140
133
|
lines = []
|
141
|
-
current_section = ""
|
142
134
|
content.each_line do |line|
|
143
|
-
stripped_line = line.strip
|
144
|
-
if stripped_line.start_with?("def ") || stripped_line.start_with?("target ")
|
145
|
-
current_section = line.split(" ")[1]
|
146
|
-
end
|
147
|
-
|
148
135
|
if (matches = line.match(/^\s*pod ['|"](.*?)['|"](.*)/)) && matches.size == 3
|
149
136
|
if matches[1].split("/").first == pod_name_to_switch
|
150
137
|
case OPTIONS[:switch_mode]
|
@@ -172,10 +159,8 @@ module PodBuilder
|
|
172
159
|
lines.append(development_line)
|
173
160
|
next
|
174
161
|
when "default"
|
175
|
-
if default_line =
|
176
|
-
|
177
|
-
default_line = default_line.chomp("\n") + ", :inhibit_warnings => true\n"
|
178
|
-
end
|
162
|
+
if default_line = default_entry
|
163
|
+
# default_line is already extracted from PodBuilder's Podfile and already includes :inhibit_warnings
|
179
164
|
if line.include?("# pb<") && marker = line.split("# pb<").last
|
180
165
|
default_line = default_line.chomp("\n") + " # pb<#{marker}"
|
181
166
|
end
|
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: 4.
|
4
|
+
version: 4.2.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Tomas Camin
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2021-10-
|
11
|
+
date: 2021-10-27 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|