Sha256: b47b1199dee6a0ab5133655b0b8c440d0d54bbc02006b3f2d4c6b1a6eed9795b
Contents?: true
Size: 948 Bytes
Versions: 14
Compression:
Stored size: 948 Bytes
Contents
# "Helpers" for the binary/programs module MagentoRemote module CLI module Options # Register customer, password and base-uri options. def self.add_shop_options opts, options opts.separator "Magento shop options" opts.on('-u', '--customer USER', 'customer/username of shop.') do |u| options[:user] = u end opts.on('-p', '--password PASSWORD', 'password of customer account.') do |p| options[:pass] = p end opts.on('-b', '--base-uri URI', 'base URI of shop.') do |b| options[:base_uri] = b end end # Exit if obligatory options not given. def self.exit_obligatory! options if !options[:user] || !options[:pass] || !options[:base_uri] STDERR.puts "Error: You have to define user, pass and base_uri. (see --help)" exit 1 end end end end end
Version data entries
14 entries across 14 versions & 1 rubygems