Sha256: 6b00a917c48eaf08248247569a83e161cac4aee3491ecba457c60e1e9248af63

Contents?: true

Size: 767 Bytes

Versions: 1

Compression:

Stored size: 767 Bytes

Contents

#!/usr/bin/env ruby

require "thor"
require "irb"
require_relative "../lib/localer"

module Localer
  class CLI < Thor
    desc "version", "Print Localer version"
    def version
      say Localer::VERSION
    end

    desc "check", "Check I18n complete"
    def check
      if Localer.complete?
        say "\xE2\x9C\x94 No missing translations found.", :green
      else
        missing_translations = Localer.missing_translations
        say "\xE2\x9C\x96 Missing translations found (#{missing_translations.count}):", :red
        missing_translations.each do |tr|
          say "* #{tr}"
        end

        exit 1
      end
    end

    desc "console", "Run console"
    def console
      ARGV.clear
      IRB.start
    end
  end
end


Localer::CLI.start(ARGV)

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
localer-0.0.2 bin/localer