Sha256: bc7d967f2b5d7b243113165eff9d1914c9d2f7ead011eaa0cef5676d2303f3b2

Contents?: true

Size: 1.13 KB

Versions: 1

Compression:

Stored size: 1.13 KB

Contents

#!/usr/bin/env ruby

require 'rubygems'
require 'commander'
require 'commander/import'
require 'ios_polyglot_cli'

program :name, 'polyglot'
program :version, PolyglotIos::VERSION
program :description, 'An iOS client for managing polyglot\'s translations.'

command :login do |c|
  c.syntax = 'polyglot login'
  c.description = 'Fetches and writes your token to the keychain using the email and password you provide.'
  c.action do
    PolyglotIos::ErrorHandler.rescuable do
      PolyglotIos::Command::Login.init
    end
  end
end

command :init do |c|
  c.syntax = 'polyglot init [options]'
  c.description = 'Sets up a polyglot.yml config for selected project.'
  c.option '--query STRING', String, 'Only shows projects that matches string'
  c.action do |_args, options|
    PolyglotIos::ErrorHandler.rescuable do
      PolyglotIos::Command::Setup.init(options)
    end
  end
end

command :pull do |c|
  c.syntax = 'polyglot pull'
  c.description = 'Pulls all translations from Polyglot and generates necessary files'
  c.action do |_args, options|
    PolyglotIos::ErrorHandler.rescuable do
      PolyglotIos::Command::Pull.init
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
ios_polyglot_cli-2.0.1 exe/polyglot