Sha256: c1d8b2137801d01c7d06e1f1e73b41286315327a5ef19bff748cc6653111fca8

Contents?: true

Size: 1.07 KB

Versions: 3

Compression:

Stored size: 1.07 KB

Contents

desc 'Zendesk and Crowdin info'
command :'project:info' do |c|
  c.action do |global_options, options, args|
    puts "ruby #{RUBY_VERSION}"
    puts "zci #{ZCI::VERSION}"
    puts "zendesk_help_center_api #{ZendeskAPI::HelpCenter::VERSION}"
    puts
    # Crowdin
    begin
      crowdin_info = @crowdin.project_info
      puts "Crowdin: authentication successful."
      puts "Crowdin: available locales:"
      crowdin_info["languages"].each do |lang|
        puts "  - #{lang['code']}"
      end
    rescue => e
      puts "Crowdin: API key is incorect"
    end
    puts

    # Zendesk
    if @zendesk.current_user.id
      puts "Zendesk: authentication successful."
      categories = @zendesk.hc_categories

      puts "Zendesk: available categories:"
      categories.each do |category|
        puts "  - #{category.id}: #{category.name}"
      end

      locales = @zendesk.locales

      puts "Zendesk: available locales:"
      locales.each do |locale|
        puts "  - #{locale.locale}"
      end
    else
      puts "Zendesk: login and/or password is incorect"
    end
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
zci-0.6.1 lib/zci/commands/06_info.rb
zci-0.6.0 lib/zci/commands/06_info.rb
zci-0.5.0 lib/zci/commands/05_info.rb