Sha256: d5d8bbc3173471cb65eb71daede21680397eaf48357e50f2798e26c23a0f2b96

Contents?: true

Size: 1.31 KB

Versions: 16

Compression:

Stored size: 1.31 KB

Contents

require "commander"
require "fastlane_core"

HighLine.track_eof = false

module Xcov
  class CommandsGenerator

    include Commander::Methods

    FastlaneCore::CommanderGenerator.new.generate(Xcov::Options.available_options)

    def self.start
      FastlaneCore::UpdateChecker.start_looking_for_update("xcov")
      new.run
     ensure
       FastlaneCore::UpdateChecker.show_update_status("xcov", Xcov::VERSION)
    end

    def convert_options(options)
      converted_options = options.__hash__.dup
      converted_options.delete(:verbose)
      converted_options
    end

    def run
      program :version, Xcov::VERSION
      program :description, Xcov::DESCRIPTION
      program :help, "Author", "Carlos Vidal <nakioparkour@gmail.com>"
      program :help, "Website", "http://www.nakiostudio.com"
      program :help, "GitHub", "https://github.com/nakiostudio/xcov"
      program :help_formatter, :compact

      global_option("--verbose") { $verbose = true }

      command :report do |c|
        c.syntax = "Xcov"
        c.description = Xcov::DESCRIPTION
        c.action do |_args, options|
          config = FastlaneCore::Configuration.create(Xcov::Options.available_options, convert_options(options))
          Xcov::Manager.new.work(config)
        end
      end

      default_command :report
      run!
    end

  end
end

Version data entries

16 entries across 16 versions & 1 rubygems

Version Path
xcov-1.0.1 lib/xcov/commands_generator.rb
xcov-1.0.0 lib/xcov/commands_generator.rb
xcov-0.12.5 lib/xcov/commands_generator.rb
xcov-0.12.4 lib/xcov/commands_generator.rb
xcov-0.12.3 lib/xcov/commands_generator.rb
xcov-0.12.2 lib/xcov/commands_generator.rb
xcov-0.12.1 lib/xcov/commands_generator.rb
xcov-0.12 lib/xcov/commands_generator.rb
xcov-0.11.3 lib/xcov/commands_generator.rb
xcov-0.11.2 lib/xcov/commands_generator.rb
xcov-0.11.1 lib/xcov/commands_generator.rb
xcov-0.11 lib/xcov/commands_generator.rb
xcov-0.10 lib/xcov/commands_generator.rb
xcov-0.9 lib/xcov/commands_generator.rb
xcov-0.8 lib/xcov/commands_generator.rb
xcov-0.7 lib/xcov/commands_generator.rb