Sha256: ad9c50842434d7cb781695abdf8354255d6bfb45d313fab0e4b0e460f701ecd4

Contents?: true

Size: 851 Bytes

Versions: 8

Compression:

Stored size: 851 Bytes

Contents

module Guard
  class Interactor

    CHANGE = Pry::CommandSet.new do
      create_command 'change' do

        group 'Guard'
        description 'Trigger a file change.'

        banner <<-BANNER
          Usage: change <scope>

          Runs the Guard plugin `run_on_changes` 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, rest = ::Guard::Interactor.convert_scope(entries)

          if rest.length != 0
            ::Guard.within_preserved_state do
              ::Guard.runner.run_on_changes(rest, [], [])
            end
          else
            output.puts 'Please specify a file.'
          end
        end

      end
    end

  end
end

Pry.commands.import ::Guard::Interactor::CHANGE

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
guard-1.6.2 lib/guard/commands/change.rb
guard-1.6.1 lib/guard/commands/change.rb
guard-1.6.0 lib/guard/commands/change.rb
guard-1.5.4 lib/guard/commands/change.rb
guard-1.5.3 lib/guard/commands/change.rb
guard-1.5.2 lib/guard/commands/change.rb
guard-1.5.1 lib/guard/commands/change.rb
guard-1.5.0 lib/guard/commands/change.rb