Sha256: fe1222e4feb2bbc58237fa8c71e1e4b72d3355e34f7d6c7e2925e1b3bd29d6ad

Contents?: true

Size: 808 Bytes

Versions: 4

Compression:

Stored size: 808 Bytes

Contents

require "optparse"
require "thor/group"
require "gem_suit/application/actions"
require "gem_suit/application/test"

module GemSuit
  class Application < ::Thor::Group

    include Application::Actions
    include Application::Test

    STASHED_EXT = "stashed"

    def initialize(options = {:validate_root_path => true})
      super [], {}, {}

      begin
        OptionParser.new do |opts|
          opts.on "-v", "--[no-]verbose" do |v|
            options[:verbose] ||= v
          end
        end.parse! ARGV
      rescue OptionParser::InvalidOption
      end

      options.each do |key, value|
        send :"#{key}=", value
      end
    end

    class << self
      def source_root
        @source_root
      end

      def source_root=(path)
        @source_root = path
      end
    end

  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
gem_suit-0.1.3 lib/gem_suit/application.rb
gem_suit-0.1.2 lib/gem_suit/application.rb
gem_suit-0.1.1 lib/gem_suit/application.rb
gem_suit-0.1.0 lib/gem_suit/application.rb