lib/preinstaller.rb in cocoapods-keys-1.0.1 vs lib/preinstaller.rb in cocoapods-keys-1.0.2

- old
+ new

@@ -1,24 +1,22 @@ module CocoaPodsKeys class PreInstaller def initialize(user_options) - @options = user_options + @user_options = user_options end def setup require 'key_master' require 'keyring_liberator' require 'pod/command/keys/set' options = @user_options || {} current_dir = Dir.getwd - project = options.fetch('project', nil) + project = options.fetch('project', CocoaPodsKeys::NameWhisperer.get_project_name) keyring = KeyringLiberator.get_keyring_named(project) || KeyringLiberator.get_keyring(current_dir) - unless keyring - name = project || CocoaPodsKeys::NameWhisperer.get_project_name - keyring = CocoaPodsKeys::Keyring.new(name, current_dir, []) - end - + + keyring = CocoaPodsKeys::Keyring.new(project, current_dir, []) unless keyring + data = keyring.keychain_data has_shown_intro = false keys = options.fetch("keys", []) keys.each do |key| unless data.keys.include? key