Sha256: b52f5a2eeb616001e534db5ad7493122ca7470a5d4069c46521bdc9e7c96196e

Contents?: true

Size: 612 Bytes

Versions: 11

Compression:

Stored size: 612 Bytes

Contents

# encoding: UTF-8

require "thor"
require_relative 'sitemap'

module Maltese
  class CLI < Thor
    def self.exit_on_failure?
      true
    end

    # from http://stackoverflow.com/questions/22809972/adding-a-version-option-to-a-ruby-thor-cli
    map %w[--version -v] => :__print_version

    desc "--version, -v", "print the version"
    def __print_version
      puts Toccatore::VERSION
    end

    desc "sitemap", "generate sitemap for DataCite Search"
    method_option :sitemap_bucket, type: :string
    def sitemap
      sitemap = Maltese::Sitemap.new(options)
      sitemap.queue_jobs
    end
  end
end

Version data entries

11 entries across 11 versions & 1 rubygems

Version Path
maltese-0.8.14 lib/maltese/cli.rb
maltese-0.8.13 lib/maltese/cli.rb
maltese-0.8.12 lib/maltese/cli.rb
maltese-0.8.10 lib/maltese/cli.rb
maltese-0.8.9 lib/maltese/cli.rb
maltese-0.8.8 lib/maltese/cli.rb
maltese-0.8.6 lib/maltese/cli.rb
maltese-0.8.4 lib/maltese/cli.rb
maltese-0.8.3 lib/maltese/cli.rb
maltese-0.8.2 lib/maltese/cli.rb
maltese-0.8.1 lib/maltese/cli.rb