Sha256: 76e0e9274ac1db746ac77e63434bed929cda16675613289502118fc7a6ee1464

Contents?: true

Size: 698 Bytes

Versions: 32

Compression:

Stored size: 698 Bytes

Contents

module Inferno
  module CLI
    class Suites
      def run
        require_relative '../../../inferno'

        Inferno::Application.start(:suites)

        suites = Inferno::Repositories::TestSuites.new.all
        suite_hash = suites.each_with_object({}) { |suite, hash| hash[suite.id] = suite.title }

        id_column_length = suite_hash.keys.map(&:length).max + 1
        title_column_length = suite_hash.values.map(&:length).max

        puts "#{'ID'.ljust(id_column_length)}| Title"
        puts "#{'-' * id_column_length}+-#{'-' * title_column_length}"
        suite_hash.each do |id, title|
          puts "#{id.ljust(id_column_length)}| #{title}"
        end
      end
    end
  end
end

Version data entries

32 entries across 32 versions & 1 rubygems

Version Path
inferno_core-0.3.4 lib/inferno/apps/cli/suites.rb
inferno_core-0.3.3 lib/inferno/apps/cli/suites.rb
inferno_core-0.3.2 lib/inferno/apps/cli/suites.rb
inferno_core-0.3.1 lib/inferno/apps/cli/suites.rb
inferno_core-0.3.0 lib/inferno/apps/cli/suites.rb
inferno_core-0.3.0.rc1 lib/inferno/apps/cli/suites.rb
inferno_core-0.2.0 lib/inferno/apps/cli/suites.rb
inferno_core-0.2.0.rc4 lib/inferno/apps/cli/suites.rb
inferno_core-0.2.0.rc3 lib/inferno/apps/cli/suites.rb
inferno_core-0.2.0.rc2 lib/inferno/apps/cli/suites.rb
inferno_core-0.2.0.rc1 lib/inferno/apps/cli/suites.rb
inferno_core-0.1.4.pre lib/inferno/apps/cli/suites.rb