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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: a78cc17a913b3034855029cd54e3b27ab7f5e4482c370e7a53c527c902bec7f1
4
- data.tar.gz: '08abdad59a5fc4a09dd86fb3d0ca36dc93ef5f3c66a47505fc0919245f8cfd14'
3
+ metadata.gz: 3f124024bc7aa2aec5af41460be8461e8e3e0dbade8d118637c77dbfb63b125d
4
+ data.tar.gz: cde1502b7bcbb9a03434ba897d2ac4ab0af5cf4c341ba16aee15f7c6f0695b9b
5
5
  SHA512:
6
- metadata.gz: 98738c77905e22cfc84ac3941347ab23b9fb1a6f5bb3e9a807b85795b8378f9e4cc2d31f75d1bc338f1ab828a6264f262ef01cd0efc0e4e075a8cfea80981c15
7
- data.tar.gz: a2561e7991129a01f1fddc79a23e72a87af1474528d188bc686362a6040e0e798e4f66e2e882b5a273342cbf70a035554673e39cf125f0f12302f44e1625944e
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
- default_entries = Hash.new
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
- current_section = ""
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
- default_entries[current_section] = line
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 default_entries.keys.count == 0
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 = default_entries[current_section]
176
- if inhibit_warnings.include?(matches[1])
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
@@ -1,3 +1,3 @@
1
1
  module PodBuilder
2
- VERSION = "4.1.0"
2
+ VERSION = "4.2.0"
3
3
  end
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.1.0
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-06 00:00:00.000000000 Z
11
+ date: 2021-10-27 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler