lib/pod/command/keys/set.rb in cocoapods-keys-0.6.2 vs lib/pod/command/keys/set.rb in cocoapods-keys-0.9.0
- old
+ new
@@ -18,11 +18,11 @@
self.arguments = [CLAide::Argument.new('key', true),
CLAide::Argument.new('value', true),
CLAide::Argument.new('project_name', false)]
def initialize(argv)
- @key_name = argv.shift_argument.gsub("-", "_")
+ @key_name = argv.shift_argument
@key_value = argv.shift_argument
@project_name = argv.shift_argument
super
end
@@ -36,11 +36,11 @@
def run
# set a key to a folder id in ~/.cocoapods/keys
# info "Saving into the keychain."
keyring = current_keyring
- keyring.keys << @key_name
+ keyring.keys << @key_name.gsub("-", "_")
CocoaPodsKeys::KeyringLiberator.save_keyring keyring
keyring.save @key_name, @key_value
puts "Saved #{@key_name} to #{keyring.name}."
@@ -49,10 +49,10 @@
def current_keyring
current_dir = Dir.getwd
keyring = CocoaPodsKeys::KeyringLiberator.get_keyring current_dir
unless keyring
- name = @name || CocoaPodsKeys::NameWhisperer.get_project_name
+ name = @project_name || CocoaPodsKeys::NameWhisperer.get_project_name
keyring = CocoaPodsKeys::Keyring.new(name, current_dir, [])
end
keyring
end