lib/kpm/tasks.rb in kpm-0.8.2 vs lib/kpm/tasks.rb in kpm-0.9.0
- old
+ new
@@ -481,11 +481,11 @@
default: nil,
desc: 'Database port'
desc 'account', 'export/import accounts'
def account
config_file = nil
- raise Interrupt, '--killbill_url, required format -> http(s)://something' if options[:killbill_url] && %r{https?://[\S]+}.match(options[:killbill_url]).nil?
+ raise Interrupt, '--killbill_url, required format -> http(s)://something' if options[:killbill_url] && %r{https?://\S+}.match(options[:killbill_url]).nil?
raise Interrupt, '--killbill_api_credentials, required format -> <api_key> <api_secrets>' if options[:killbill_api_credentials] && options[:killbill_api_credentials].size != 2
raise Interrupt, '--killbill_credentials, required format -> <user> <password>' if options[:killbill_credentials] && options[:killbill_credentials].size != 2
@@ -533,11 +533,11 @@
type: :string,
default: nil,
desc: 'Killbill URL ex. http://127.0.0.1:8080'
desc 'tenant_config', 'export all tenant-level configs.'
def tenant_config
- raise Interrupt, '--killbill_url, required format -> http(s)://something' if options[:killbill_url] && %r{https?://[\S]+}.match(options[:killbill_url]).nil?
+ raise Interrupt, '--killbill_url, required format -> http(s)://something' if options[:killbill_url] && %r{https?://\S+}.match(options[:killbill_url]).nil?
raise Interrupt, '--killbill_api_credentials, required format -> <api_key> <api_secrets>' if options[:killbill_api_credentials] && options[:killbill_api_credentials].size != 2
raise Interrupt, '--killbill_credentials, required format -> <user> <password>' if options[:killbill_credentials] && options[:killbill_credentials].size != 2
@@ -606,10 +606,10 @@
desc: 'A different folder other than the default bundles directory.'
desc 'diagnostic', 'exports and \'zips\' the account data, system, logs and tenant configurations'
def diagnostic
raise Interrupt, '--account_export, please provide a valid account id' if options[:account_export] && options[:account_export] == 'account_export'
- raise Interrupt, '--killbill_url, required format -> http(s)://something' if options[:killbill_url] && %r{https?://[\S]+}.match(options[:killbill_url]).nil?
+ raise Interrupt, '--killbill_url, required format -> http(s)://something' if options[:killbill_url] && %r{https?://\S+}.match(options[:killbill_url]).nil?
raise Interrupt, '--killbill_api_credentials, required format -> <api_key> <api_secrets>' if options[:killbill_api_credentials] && options[:killbill_api_credentials].size != 2
raise Interrupt, '--killbill_credentials, required format -> <user> <password>' if options[:killbill_credentials] && options[:killbill_credentials].size != 2