Sha256: a6ace63220250e951838b29b641c660254ae8793b4037c6ed6588536b4015c85

Contents?: true

Size: 711 Bytes

Versions: 2

Compression:

Stored size: 711 Bytes

Contents

# frozen_string_literal: true

require 'thor'
require 'whatsup_github/runner'
require 'whatsup_github/version'
module WhatsupGithub
  # CLI options
  class CLI < Thor
    desc 'since DATE', 'Filters pull requests since the specified date till now. Default: last 7 days.'
    option :config,
           desc: 'Relative path to the configuration file.',
           default: '.whatsup.yml'
    def since(date = Date.today - 7)
      WhatsupGithub::Config.filename = options[:config]
      runner = WhatsupGithub::Runner.new(Date.parse(date.to_s))
      runner.run
    end

    desc 'version', 'Current version of the gem'
    def version
      puts "Current version is #{WhatsupGithub::VERSION}"
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
whatsup_github-1.0.1 lib/whatsup_github/cli.rb
whatsup_github-1.0.0 lib/whatsup_github/cli.rb