Sha256: 46cec5b9b055d4f068952dd6e151f9686b32cde6c761458f663b1a68d5142dbf

Contents?: true

Size: 777 Bytes

Versions: 13

Compression:

Stored size: 777 Bytes

Contents

module I18n::Tasks
  module Command
    module Commands
      module XLSX
        include Command::Collection

        cmd :xlsx_report,
            pos:  '[locale...]',
            desc: t('i18n_tasks.cmd.desc.xlsx_report'),
            args: [:locales,
                   ['-p', '--path PATH', 'Destination path', default: 'tmp/i18n-report.xlsx']]

        def xlsx_report(opt = {})
          begin
            require 'axlsx'
          rescue LoadError
            message = %Q(For spreadsheet report please add axlsx gem to Gemfile:\ngem 'axlsx', '~> 2.0')
            log_stderr Term::ANSIColor.red Term::ANSIColor.bold message
            exit 1
          end
          spreadsheet_report.save_report opt[:path], opt.except(:path)
        end
      end
    end
  end
end

Version data entries

13 entries across 13 versions & 1 rubygems

Version Path
i18n-tasks-0.9.2 lib/i18n/tasks/command/commands/xlsx.rb
i18n-tasks-0.9.1 lib/i18n/tasks/command/commands/xlsx.rb
i18n-tasks-0.9.0 lib/i18n/tasks/command/commands/xlsx.rb
i18n-tasks-0.9.0.rc2 lib/i18n/tasks/command/commands/xlsx.rb
i18n-tasks-0.8.7 lib/i18n/tasks/command/commands/xlsx.rb
i18n-tasks-0.9.0.rc1 lib/i18n/tasks/command/commands/xlsx.rb
i18n-tasks-0.8.6 lib/i18n/tasks/command/commands/xlsx.rb
i18n-tasks-0.8.5 lib/i18n/tasks/command/commands/xlsx.rb
i18n-tasks-0.8.4 lib/i18n/tasks/command/commands/xlsx.rb
i18n-tasks-0.8.3 lib/i18n/tasks/command/commands/xlsx.rb
i18n-tasks-0.8.2 lib/i18n/tasks/command/commands/xlsx.rb
i18n-tasks-0.8.1 lib/i18n/tasks/command/commands/xlsx.rb
i18n-tasks-0.8.0 lib/i18n/tasks/command/commands/xlsx.rb