#!/usr/bin/env ruby

require 'rubygems'
require 'commander/import'
require 'PodfileTool'

program :name, 'podtool'
program :version, '0.0.3'
program :description, 'pod tools set'

command :parse do |c|
  c.syntax = 'podtool parse [options]'
  c.summary = ''
  c.description = ''
  c.example 'description', 'command example'
  c.option '--some-switch', 'Some switch that does something'
  c.action do |args, options|
    puts PodfileTool.outputJson(args[0])
  end
end

command :share do |c|
  c.syntax = 'podtool share [options]'
  c.summary = ''
  c.description = ''
  c.example 'description', 'command example'
  c.option '--project-path', 'Some switch that does something'
  c.option '--pod-name', 'Some switch that does something'
  c.action do |args, options|
    puts PodfileTool.sharePodScheme(args[0], args[1])
  end
end

command :shareall do |c|
  c.syntax = 'podtool shareall [options]'
  c.summary = ''
  c.description = ''
  c.example 'description', 'command example'
  c.option '--some-switch', 'Some switch that does something'
  c.action do |args, options|
    PodfileTool.shareAllPodScheme(ARGV[1])
  end
end

command :removetarget do |c|
  c.syntax = 'podtool removetarget [options]'
  c.summary = ''
  c.description = ''
  c.example 'description', 'command example'
  c.option '--some-switch', 'Some switch that does something'
  c.action do |args, options|
    PodfileTool.removeTarget(args[0], args[1])
  end
end

command :removeTargetFrameSearchPath do |c|
  c.syntax = 'podtool removeTargetFrameSearchPath [options]'
  c.summary = ''
  c.description = ''
  c.example 'description', 'command example'
  c.option '--some-switch', 'Some switch that does something'
  c.action do |args, options| 
    PodfileTool.removeTarget(args[0], args[1])
  end
end

command :removePhase do |c|
  c.syntax = 'podtool removetarget [options]'
  c.summary = ''
  c.description = ''
  c.example 'description', 'command example'
  c.option '--some-switch', 'Some switch that does something'
  c.action do |args, options|
    PodfileTool.removePhase(args[0], args[1], args[2])
  end
end







