Module: Terrestrial::Cli

Defined in:
lib/terrestrial/cli.rb,
lib/terrestrial/cli/init.rb,
lib/terrestrial/cli/pull.rb,
lib/terrestrial/cli/push.rb,
lib/terrestrial/cli/scan.rb,
lib/terrestrial/cli/editor.rb,
lib/terrestrial/cli/flight.rb,
lib/terrestrial/cli/ignite.rb,
lib/terrestrial/cli/parser.rb,
lib/terrestrial/cli/command.rb,
lib/terrestrial/cli/version.rb,
lib/terrestrial/cli/photoshoot.rb,
lib/terrestrial/cli/editor/objc.rb,
lib/terrestrial/cli/file_finder.rb,
lib/terrestrial/cli/file_picker.rb,
lib/terrestrial/cli/parser/objc.rb,
lib/terrestrial/cli/terminal_ui.rb,
lib/terrestrial/cli/bootstrapper.rb,
lib/terrestrial/cli/editor/swift.rb,
lib/terrestrial/cli/parser/swift.rb,
lib/terrestrial/cli/unity_parser.rb,
lib/terrestrial/cli/engine_mapper.rb,
lib/terrestrial/cli/language_name.rb,
lib/terrestrial/cli/mixpanel_client.rb,
lib/terrestrial/cli/string_registry.rb,
lib/terrestrial/cli/unity_formatter.rb,
lib/terrestrial/cli/version_checker.rb,
lib/terrestrial/cli/editor/storyboard.rb,
lib/terrestrial/cli/parser/storyboard.rb,
lib/terrestrial/cli/android_xml_parser.rb,
lib/terrestrial/cli/dot_strings_parser.rb,
lib/terrestrial/cli/editor/android_xml.rb,
lib/terrestrial/cli/editor/base_editor.rb,
lib/terrestrial/cli/parser/android_xml.rb,
lib/terrestrial/cli/parser/base_parser.rb,
lib/terrestrial/cli/simulator_launcher.rb,
lib/terrestrial/cli/simulator_launcher.rb,
lib/terrestrial/cli/flight/ios_workflow.rb,
lib/terrestrial/cli/variable_normalizer.rb,
lib/terrestrial/cli/detects_project_type.rb,
lib/terrestrial/cli/android_xml_formatter.rb,
lib/terrestrial/cli/dot_strings_formatter.rb,
lib/terrestrial/cli/flight/table_workflow.rb,
lib/terrestrial/cli/parser/string_analyser.rb,
lib/terrestrial/cli/entry_collection_differ.rb,
lib/terrestrial/cli/pull/processes_translations.rb

Defined Under Namespace

Modules: Editor, MixpanelClient, Parser, TerminalUI Classes: AndroidXmlFormatter, AndroidXmlParser, Bootstrapper, Command, DetectsProjectType, DotStringsFormatter, DotStringsParser, EngineMapper, EntryCollectionDiffer, FileFinder, FilePicker, Flight, Ignite, Init, LanguageName, LocaliableStringsParserError, Photoshoot, Pull, Push, Scan, SimulatorLauncher, StringRegistry, UnityFormatter, UnityParser, VariableNormalizer, VersionChecker

Constant Summary collapse

COMMANDS =
["init", "flight", "pull", "push", "scan", "ignite", "photoshoot"]
VERSION =
"0.6.7"

Class Method Summary collapse

Class Method Details

.flight(opts) ⇒ Object



70
71
72
# File 'lib/terrestrial/cli.rb', line 70

def self.flight(opts)
  Terrestrial::Cli::Flight.run(opts)
end

.ignite(opts, args) ⇒ Object



78
79
80
81
# File 'lib/terrestrial/cli.rb', line 78

def self.ignite(opts, args)
  opts[:language] = args[0]
  Terrestrial::Cli::Ignite.run(opts)
end

.init(opts) ⇒ Object



58
59
60
# File 'lib/terrestrial/cli.rb', line 58

def self.init(opts)
  Terrestrial::Cli::Init.run(opts)
end

.photoshoot(opts) ⇒ Object



83
84
85
# File 'lib/terrestrial/cli.rb', line 83

def self.photoshoot(opts)
  Terrestrial::Cli::Photoshoot.run(opts)
end

.pull(opts) ⇒ Object



66
67
68
# File 'lib/terrestrial/cli.rb', line 66

def self.pull(opts)
  Terrestrial::Cli::Pull.run(opts)
end

.push(opts) ⇒ Object



62
63
64
# File 'lib/terrestrial/cli.rb', line 62

def self.push(opts)
  Terrestrial::Cli::Push.run(opts)
end

.scan(opts) ⇒ Object



74
75
76
# File 'lib/terrestrial/cli.rb', line 74

def self.scan(opts)
  Terrestrial::Cli::Scan.run(opts)
end

.start(command, opts = {}, args = []) ⇒ Object



37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
# File 'lib/terrestrial/cli.rb', line 37

def self.start(command, opts = {}, args = [])
  case command
  when "init" 
    init(opts)
  when "flight" 
    flight(opts)
  when "push" 
    push(opts)
  when "pull" 
    pull(opts)
  when "scan" 
    scan(opts)
  when "ignite" 
    ignite(opts, args)
  when "photoshoot" 
    photoshoot(opts)
  else
    abort "Unknown command #{command}"
  end
end