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.4.7 lib/inferno/apps/cli/suites.rb
inferno_core-0.4.7.pre lib/inferno/apps/cli/suites.rb
inferno_core-0.4.6 lib/inferno/apps/cli/suites.rb
inferno_core-0.4.5 lib/inferno/apps/cli/suites.rb
inferno_core-0.4.4 lib/inferno/apps/cli/suites.rb
inferno_core-0.4.3 lib/inferno/apps/cli/suites.rb
inferno_core-0.4.2 lib/inferno/apps/cli/suites.rb
inferno_core-0.4.2.pre lib/inferno/apps/cli/suites.rb
inferno_core-0.4.1 lib/inferno/apps/cli/suites.rb
inferno_core-0.4.1.pre2 lib/inferno/apps/cli/suites.rb
inferno_core-0.4.1.pre lib/inferno/apps/cli/suites.rb
inferno_core-0.4.0 lib/inferno/apps/cli/suites.rb
inferno_core-0.3.12 lib/inferno/apps/cli/suites.rb
inferno_core-0.3.11 lib/inferno/apps/cli/suites.rb
inferno_core-0.3.10 lib/inferno/apps/cli/suites.rb
inferno_core-0.3.9 lib/inferno/apps/cli/suites.rb
inferno_core-0.3.8 lib/inferno/apps/cli/suites.rb
inferno_core-0.3.7 lib/inferno/apps/cli/suites.rb
inferno_core-0.3.6 lib/inferno/apps/cli/suites.rb
inferno_core-0.3.5 lib/inferno/apps/cli/suites.rb