Sha256: cc6bda3ac907bdc1d81201110649475d9c0ba4368147faa7fae95bc3ea98f9c0

Contents?: true

Size: 877 Bytes

Versions: 5

Compression:

Stored size: 877 Bytes

Contents

# required for async_queue_add
require "pry"

require "guard/interactor"
require "guard"

module Guard
  module Commands
    class All
      def self.import
        Pry::Commands.create_command "all" do
          group "Guard"
          description "Run all plugins."

          banner <<-BANNER
          Usage: all <scope>

          Run the Guard plugin `run_all` action.

          You may want to specify an optional scope to the action,
          either the name of a Guard plugin or a plugin group.
          BANNER

          def process(*entries)
            scopes, unknown = Interactor.convert_scope(entries)

            unless unknown.empty?
              output.puts "Unknown scopes: #{ unknown.join(", ") }"
              return
            end

            ::Guard.async_queue_add([:guard_run_all, scopes])
          end
        end
      end
    end
  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
guard-2.10.2 lib/guard/commands/all.rb
guard-2.10.1 lib/guard/commands/all.rb
guard-2.10.0 lib/guard/commands/all.rb
guard-2.9.2 lib/guard/commands/all.rb
guard-2.9.1 lib/guard/commands/all.rb