Sha256: 302340c85add84e26472dd9f64dfdb3f83b95483b3b9ec800d9df86088bcc1e8

Contents?: true

Size: 562 Bytes

Versions: 2

Compression:

Stored size: 562 Bytes

Contents

require 'rebuild'
require 'unindent'

module Rebuild
  class CLI
    class << self
      def start
        return show_usage if ARGV.length != 1

        repo_path       = Repository.new(ARGV.first).fetch
        primary_scripts = STDIN.gets unless STDIN.isatty

        runner = Runner.new(repo_path, primary_scripts)
        runner.run
      end

      private

      def show_usage
        puts <<-EOS.unindent
          Commands:
            rebuild USER/PROJECT # execute all scripts in GitHub repo's root directory

        EOS
      end
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
rebuild-0.0.3 lib/rebuild/cli.rb
rebuild-0.0.2 lib/rebuild/cli.rb