Sha256: 648eadd58144aae2a3fa404906eb8c2db2979399cb02b5e5efe5e29e5f651795

Contents?: true

Size: 954 Bytes

Versions: 19

Compression:

Stored size: 954 Bytes

Contents

#!/usr/bin/env ruby

require 'optparse'
require 'methadone'
require 'ProMotion/version'

class App
  include Methadone::Main
  include Methadone::CLILogging
  include Methadone::SH
  
  main do |command, opt|
    case command.to_sym
    when :new then create(opt)
    when :help then show_help
    else show_help
    end

    0 # Good!
  end

  def self.show_help
    info "promotion - Command line tools for ProMotion."
    info "By Jamon Holmgren"
    info ""
    info "Commands:"
    info "  new <appname>"
    info "    Creates a new ProMotion app from a template."
  end

  def self.create(name)
    return puts "Usage: promotion new <appname>" unless name.to_s.length > 0
    info "Creating new ProMotion iOS app #{name}"
    sh "motion create --template=git://github.com/jamonholmgren/promotion-template.git #{name}"
  end

  description "Command line for ProMotion."

  arg :command
  arg :opt, :optional

  version ProMotion::VERSION

  go!
end

Version data entries

19 entries across 19 versions & 1 rubygems

Version Path
ProMotion-2.4.0 bin/promotion
ProMotion-2.3.1 bin/promotion
ProMotion-2.3.0 bin/promotion
ProMotion-2.2.2 bin/promotion
ProMotion-2.2.1 bin/promotion
ProMotion-2.2.0 bin/promotion
ProMotion-2.1.0 bin/promotion
ProMotion-2.1.0.beta1 bin/promotion
ProMotion-2.0.1 bin/promotion
ProMotion-2.0.0 bin/promotion
ProMotion-2.0.0.rc5 bin/promotion
ProMotion-2.0.0.rc4 bin/promotion
ProMotion-2.0.0.rc3 bin/promotion
ProMotion-2.0.0.rc2 bin/promotion
ProMotion-2.0.0.rc1 bin/promotion
ProMotion-1.2.1 bin/promotion
ProMotion-1.2.0 bin/promotion
ProMotion-1.1.2 bin/promotion
ProMotion-1.1.1 bin/promotion