mmine 0.9.4 → 0.9.5

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: d609adc78a177fa25a48883c02d26b81b7f5e0703725250008d2199761b840b4
4
- data.tar.gz: b15df15a4eb2a097d4c582288408dc10d065de4a0355212001208c6224e8b045
3
+ metadata.gz: 405a52d98e4702d1036467797ff10e3744660aa817059c7d5c51b0d186af94de
4
+ data.tar.gz: 0b4bd052c74edfe002c0dac01493df6ca442256f12380f007bba5d7527f918a7
5
5
  SHA512:
6
- metadata.gz: 698105deceffeb1ea265690f870b89d71ed1ffeb7bbd7db888b81bceaeb1d4ce09cb9057a507574ef37da3fa7b4b50ec31c944cb8814eb40e3973633f372bad6
7
- data.tar.gz: c621720f32496e9b96215b86a2f61fba6205da7f51ea96ae9f2204c49406316df4d983c182a12c25a3c9af4d45b22d043032aa4ef86e9361475dd9970ca1b229
6
+ metadata.gz: db7f77d620c59e9ea1aa2592b0133622a6583bdeb446c6daf5d5758c5485f7ed8dfd4c86fa201e71c372324a9b0dd0e06681af82626a666bf045e3ac7069e2bf
7
+ data.tar.gz: 571c5a83fad2c049a6d677fdeca72ce4853fc2e17c54868ce8c08e07dab62c45582203d40fec55f2bb62c8f1790ae7f923e37fdca7532468122383589fe1ad27
@@ -192,7 +192,7 @@ class NotificationExtensionIntegrator
192
192
  suffix = 'notification-extension'
193
193
  key = 'PRODUCT_BUNDLE_IDENTIFIER'
194
194
  (@main_build_configurations_release + @main_build_configurations_debug).each do |config|
195
- bundleId = config.resolve_build_setting(key)
195
+ bundleId = resolve_recursive_build_setting(config, key)
196
196
  if bundleId == nil
197
197
  plist_path = resolve_absolute_paths([config.resolve_build_setting("INFOPLIST_FILE")]).first
198
198
  bundleId = get_xml_string_value(key, plist_path)
@@ -206,6 +206,49 @@ class NotificationExtensionIntegrator
206
206
  end
207
207
  end
208
208
 
209
+ # https://github.com/CocoaPods/Xcodeproj/issues/505#issuecomment-584699008
210
+ # Augments config.resolve_build_setting from xcproject
211
+ # to continue expanding build settings and evaluate modifiers
212
+ def resolve_recursive_build_setting(config, setting)
213
+ resolution = config.resolve_build_setting(setting)
214
+
215
+ # finds values with one of
216
+ # $VALUE
217
+ # $(VALLUE)
218
+ # $(VALUE:modifier)
219
+ # ${VALUE}
220
+ # ${VALUE:modifier}
221
+ resolution.gsub(/\$[\(\{]?.+[\)\}]?/) do |raw_value|
222
+ # strip $() characters
223
+ unresolved = raw_value.gsub(/[\$\(\)\{\}]/, '')
224
+
225
+ # Get the modifiers after the ':' characters
226
+ name, *modifiers = unresolved.split(':')
227
+
228
+ # Expand variable name
229
+ subresolution = resolve_recursive_build_setting(config, name)
230
+
231
+ # Apply modifiers
232
+ # NOTE: not all cases accounted for
233
+ #
234
+ # See http://codeworkshop.net/posts/xcode-build-setting-transformations
235
+ # for various modifier options
236
+ modifiers.each do |modifier|
237
+ case modifier
238
+ when 'lower'
239
+ subresolution.downcase!
240
+ when 'upper'
241
+ subresolution.upcase!
242
+ else
243
+ # Fastlane message
244
+ @logger.info("Unknown modifier: `#{modifier}` in `#{raw_value}")
245
+ end
246
+ end
247
+
248
+ subresolution
249
+ end
250
+ end
251
+
209
252
  def create_entitlements_file(_entitlements_name)
210
253
  entitlements_destination_filepath = File.join(@project_dir, _entitlements_name)
211
254
  entitlements_source_filepath = File.join(Mmine.root, 'resources', "MobileMessagingNotificationExtension.entitlements")
@@ -424,7 +467,7 @@ class NotificationExtensionIntegrator
424
467
  return group_reference
425
468
  end
426
469
 
427
- def resolve_absolute_paths(paths)
470
+ def resolve_absolute_paths(paths)
428
471
  paths.map do |path|
429
472
  ret = path
430
473
  ["$(PROJECT_DIR)", "$PROJECT_DIR"].each do |proj_dir|
data/lib/mmine/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module Mmine
2
- VERSION = "0.9.4"
2
+ VERSION = "0.9.5"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: mmine
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.9.4
4
+ version: 0.9.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Andrey Kadochnikov
@@ -16,14 +16,14 @@ dependencies:
16
16
  requirements:
17
17
  - - '='
18
18
  - !ruby/object:Gem::Version
19
- version: 1.10.0
19
+ version: 1.20.0
20
20
  type: :runtime
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
24
  - - '='
25
25
  - !ruby/object:Gem::Version
26
- version: 1.10.0
26
+ version: 1.20.0
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: nokogiri
29
29
  requirement: !ruby/object:Gem::Requirement
@@ -73,7 +73,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
73
73
  - !ruby/object:Gem::Version
74
74
  version: '0'
75
75
  requirements: []
76
- rubygems_version: 3.0.9
76
+ rubygems_version: 3.1.2
77
77
  signing_key:
78
78
  specification_version: 4
79
79
  summary: Mobile Messaging iOS Notification Extension Integration Tool made at Infobip