lib/pod/command/keys/generate.rb in cocoapods-keys-2.0.7 vs lib/pod/command/keys/generate.rb in cocoapods-keys-2.1.0
- old
+ new
@@ -14,17 +14,22 @@
An optional operator can be done to force a project name.
DESC
self.arguments = [CLAide::Argument.new('project_name', false)]
+ def self.options
+ [['--keys=key1,key2...', 'An array of keys to add if no keyring is found']].concat(super)
+ end
+
def initialize(argv)
@project_name = argv.shift_argument
+ @keys = argv.option('keys', '').split(',')
super
end
def run
Dotenv.load
- keyring = get_current_keyring
+ keyring = get_current_keyring || CocoaPodsKeys::Keyring.new(@project_name, '/', @keys)
if keyring
# Create the h & m files in the same folder as the podspec