lib/preinstaller.rb in cocoapods-keys-1.6.1 vs lib/preinstaller.rb in cocoapods-keys-1.7.0

- old
+ new

@@ -29,9 +29,18 @@ existing_keyring = !keyring.nil? keyring = CocoaPodsKeys::Keyring.new(project, current_dir, []) unless keyring has_shown_intro = false keys = options.fetch('keys', []) + + # Remove keys from the keyring that no longer exist + original_keyring_keys = keyring.keys.clone + original_keyring_keys.each do |key| + keyring.keychain_has_key?(key) + end + + # Add keys to the keyring that have been added, + # and prompt for their value if needed. keys.each do |key| unless keyring.keychain_has_key?(key) unless has_shown_intro ui.puts "\n CocoaPods-Keys has detected a keys mismatch for your setup." has_shown_intro = true