Sha256: d85dfb60a7f1068331170ba4845e2a5bacbd7f2a36fc666b354ad98c6ee79e9d

Contents?: true

Size: 1.02 KB

Versions: 7

Compression:

Stored size: 1.02 KB

Contents

=begin
    Copyright 2010-2014 Tasos Laskos <tasos.laskos@arachni-scanner.com>

    This file is part of the Arachni Framework project and is subject to
    redistribution and commercial restrictions. Please see the Arachni Framework
    web site for more information on licensing and terms of use.
=end

class Arachni::Plugins::Suspendable < Arachni::Plugin::Base

    attr_reader :counter

    def prepare
        @counter = 0
    end

    def restore( counter )
        @counter = counter
    end

    def run
        options[:my_option] = 'updated'
        @counter += 1

        wait_while_framework_running
    end

    def suspend
        @counter
    end

    def self.info
        {
            name:        'Suspendable',
            description: %q{},
            author:      'Tasos "Zapotek" Laskos <tasos.laskos@arachni-scanner.com>',
            version:     '0.1',
            options:     [
                Options::String.new( 'my_option', required: true, description: 'Required option' )
            ]
        }
    end

end

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
arachni-1.0.6 spec/support/fixtures/plugins/suspendable.rb
arachni-1.0.5 spec/support/fixtures/plugins/suspendable.rb
arachni-1.0.4 spec/support/fixtures/plugins/suspendable.rb
arachni-1.0.3 spec/support/fixtures/plugins/suspendable.rb
arachni-1.0.2 spec/support/fixtures/plugins/suspendable.rb
arachni-1.0.1 spec/support/fixtures/plugins/suspendable.rb
arachni-1.0 spec/support/fixtures/plugins/suspendable.rb