lib/aigu/cli.rb in aigu-0.7 vs lib/aigu/cli.rb in aigu-1.0

- old
+ new

@@ -10,15 +10,11 @@ 'ios-import' => 'IOSImporter', 'ios-export' => 'IOSExporter', 'ember-import' => 'EmberImporter', 'ember-export' => 'EmberExporter', 'ember-pod-import' => 'EmberPodImporter', - 'ember-pod-export' => 'EmberPodExporter', - 'merge' => 'Merger', - 'unmerge' => 'Unmerger', - 'pull' => 'Puller', - 'push' => 'Pusher' + 'ember-pod-export' => 'EmberPodExporter' }.freeze def initialize(env, argv) @env = env @command = argv.first =~ /^[^-]/ ? argv.shift : nil @@ -67,39 +63,36 @@ #{COMMANDS.keys.map { |command| " #{command}" }.join("\n")} Options: DOC - opts.on('--input-directory=', 'The directory in which the Rails YAML localization files are stored.') do |directory| + opts.on('--input-directory=', 'The directory in which the Rails YAML localization files are stored') do |directory| options[:'input-directory'] = directory end - opts.on('--output-directory=', 'The directory in which the Rails YAML localization files will be generated.') do |directory| + opts.on('--output-directory=', 'The directory in which the Rails YAML localization files will be generated') do |directory| options[:'output-directory'] = directory end - opts.on('--input-file=', 'The JSON file generated by Accent.') do |file| + opts.on('--input-file=', 'The JSON file generated by Accent') do |file| options[:'input-file'] = file end - opts.on('--output-file=', 'The JSON file that will be generated for Accent.') do |file| + opts.on('--output-file=', 'The JSON file that will be generated for Accent') do |file| options[:'output-file'] = file end - opts.on('--locale=', 'The locale to use. Files will be processed/generated using the "<file>.<locale>.yml" pattern.') do |locale| + opts.on('--locale=', 'The locale to use. Importers and exporters may need it to process files') do |locale| options[:locale] = locale end opts.on('--ignore=', 'Patterns to ignore, separated by commas') do |ignore| options[:ignore] = ignore.split(',') end - opts.on('--accent-api-key=', 'Accent API key') do |key| - options[:'accent-api-key'] = key - end - - opts.on('--accent-url=', 'Accent URL (ex: http://accent.mirego.com)') do |url| - options[:'accent-url'] = url + opts.on_tail('-v', '--version', 'Output Aigu’s version') do + puts "aigu-v#{Aigu::VERSION}" + exit end opts.on_tail('-h', '--help', 'Show this message') do puts opts exit