mmine 0.6.0 → 0.6.1

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: 33b499c4904a55c44b7a6d70387ff4ab3a0c51c52a9b08e5ba807159e58244f4
4
- data.tar.gz: fa81305dbc1311da2ccbb5ac86624793c7772d3e7dc45df7a8f780e3bdc9c6d9
3
+ metadata.gz: c87b41833acd8fb02c77a920fd41ee568e4d21bbfb35554c7711288a614e5966
4
+ data.tar.gz: 633958a2d6f07b842ad73293c6f36bfae062ee4b1f4cc2424ca7e4137d40a64b
5
5
  SHA512:
6
- metadata.gz: 1d60185f5677cc973d0954ec5d6d1147b8dc09cc43ef2e0b8ace283c2ddc8d83b920c7ef4e654f63011a1d0fe96f8bb20e04b204c28cf8e94a33859b47729abd
7
- data.tar.gz: 5096dc3c0b0d4b7cbdeff836e36674797144764c431a1b6683edeec243cdaa5e6682f80647f90a45fd0598a1fc61af960d8dde8c6c11e8209553d61975275e85
6
+ metadata.gz: f2f83dee1c721dd34ac6793e3905bcbdc965dabb02e3ca06efb3e7a6724579de8b14531d9b14c6a4259299e0bb4ed845707767eeacfce985fb95f6641e53c8a4
7
+ data.tar.gz: 1cffffc0b4a23e8931e55271e8b62cebc4b1c671b591f41ea5ac6d89a79e5ffa2e2bff86c172d649c11c8aeb158d9e2edc478e59078e4e8849931b836c570b5c
@@ -114,20 +114,21 @@ class NotificationExtensionIntegrator
114
114
  FileUtils.cp(@extension_source_name_filepath, @extension_code_destination_filepath)
115
115
  filereference = getNotificationExtensionGroupReference().new_reference(@extension_code_destination_filepath)
116
116
  @ne_target.add_file_references([filereference])
117
-
118
- putApplicationCodeInSourceCode()
119
117
  else
120
118
  @logger.info("Notification extension source code already exists on path: #{@extension_code_destination_filepath}")
121
119
  end
120
+ putApplicationCodeInSourceCode()
122
121
  end
123
122
 
124
123
  def putApplicationCodeInSourceCode
125
- @application_code
126
124
  source_code = File.read(@extension_code_destination_filepath)
127
125
  modified_source_code = source_code.gsub(/<# put your Application Code here #>/, "\"#{@application_code}\"")
128
-
129
- @logger.info("\tWriting application code to source code...")
130
- File.open(@extension_code_destination_filepath, "w") {|file| file.puts modified_source_code }
126
+ unless source_code == modified_source_code
127
+ File.open(@extension_code_destination_filepath, "w") do |file|
128
+ @logger.info("\tWriting application code to source code at #{@extension_code_destination_filepath}")
129
+ file.puts modified_source_code
130
+ end
131
+ end
131
132
  end
132
133
 
133
134
  def setupDevelopmentTeam
@@ -404,10 +405,10 @@ class NotificationExtensionIntegrator
404
405
  end
405
406
  end
406
407
 
407
- file = File.open(plist_path,'w')
408
- @logger.info("\tWriting changes to plist: #{plist_path}")
409
- file.puts Nokogiri::XML(doc.to_xml) { |x| x.noblanks }
410
- file.close
408
+ File.open(plist_path,'w') do |file|
409
+ @logger.info("\tWriting changes to plist: #{plist_path}")
410
+ file.puts Nokogiri::XML(doc.to_xml) { |x| x.noblanks }
411
+ end
411
412
  end
412
413
 
413
414
  def putKeyArrayElement(key, value, filepath) # check if it appends to existing array
@@ -443,10 +444,10 @@ class NotificationExtensionIntegrator
443
444
  end
444
445
  end
445
446
 
446
- file = File.open(filepath,'w')
447
- @logger.info("\tWriting changes to entitlements: #{filepath}")
448
- file.puts Nokogiri::XML(doc.to_xml) { |x| x.noblanks }
449
- file.close
447
+ File.open(filepath,'w') do |file|
448
+ @logger.info("\tWriting changes to entitlements: #{filepath}")
449
+ file.puts Nokogiri::XML(doc.to_xml) { |x| x.noblanks }
450
+ end
450
451
  end
451
452
 
452
453
  def putAppGroupEntitlement(filepath)
@@ -1,3 +1,3 @@
1
1
  module Mmine
2
- VERSION = "0.6.0"
2
+ VERSION = "0.6.1"
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.6.0
4
+ version: 0.6.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Andrey Kadochnikov