Sha256: b3c614350cf0fca0607c1a0754f1e06fe4fe86c232dac0fccc4b7c8005690809

Contents?: true

Size: 1.14 KB

Versions: 24

Compression:

Stored size: 1.14 KB

Contents

require "thor/runner"
require 'high_five/thor/task'
require 'high_five/thor/tasks'


module HighFive
  module Thor
    class Runner < ::Thor::Runner
      #this works but I hate it
      register(HighFive::Thor::Tasks::Dist, "dist", "dist [PLATFORM]", "Shortcut to distribution:dist")
      register(HighFive::Thor::Tasks::Deploy, "deploy", "deploy [PLATFORM]", "Shortcut to deploy:deploy")
      register(HighFive::Thor::Tasks::Init, "init", "init", "Shortcut to Initialization:init")

      # Note: because of the way task.run works, there has to be a local
      # definition. Also, we want tasks to work WITH our base namespace
      # if it is included, so that we can use our binary with the same
      # signature we would use thor
      def method_missing(meth, *args)
        meth = meth.to_s
        meth.sub!(/^high_five:/, '')
        # if (!meth.match(/:/))
        #   meth = "high_five:#{meth}"
        # end
        super meth, *args
      end

      def version
        say "High Five v#{HighFive::VERSION}"
      end

      private
      def thorfiles(*args)
        Dir[File.join(File.dirname(__FILE__), 'tasks/*.rb')]
      end

    end
  end
end

Version data entries

24 entries across 24 versions & 1 rubygems

Version Path
high_five-0.3.23 lib/high_five/thor/runner.rb
high_five-0.3.22 lib/high_five/thor/runner.rb
high_five-0.3.21 lib/high_five/thor/runner.rb
high_five-0.3.20 lib/high_five/thor/runner.rb
high_five-0.3.19 lib/high_five/thor/runner.rb
high_five-0.3.18 lib/high_five/thor/runner.rb
high_five-0.3.17 lib/high_five/thor/runner.rb
high_five-0.3.16 lib/high_five/thor/runner.rb
high_five-0.3.15 lib/high_five/thor/runner.rb
high_five-0.3.14 lib/high_five/thor/runner.rb
high_five-0.3.13 lib/high_five/thor/runner.rb
high_five-0.3.12 lib/high_five/thor/runner.rb
high_five-0.3.11 lib/high_five/thor/runner.rb
high_five-0.3.10 lib/high_five/thor/runner.rb
high_five-0.3.9 lib/high_five/thor/runner.rb
high_five-0.3.8 lib/high_five/thor/runner.rb
high_five-0.3.7 lib/high_five/thor/runner.rb
high_five-0.3.6 lib/high_five/thor/runner.rb
high_five-0.3.5 lib/high_five/thor/runner.rb
high_five-0.3.4 lib/high_five/thor/runner.rb