Sha256: 0773cd94a37bf01f0eff1ab784ce8fdcf308e1224c8672b039cafc93327c0a05

Contents?: true

Size: 1.36 KB

Versions: 3

Compression:

Stored size: 1.36 KB

Contents

#
# Ronin Web - A Ruby library for Ronin that provides support for web
# scraping and spidering functionality.
#
# Copyright (c) 2006-2011 Hal Brodigan (postmodern.mod3 at gmail.com)
#
# This file is part of Ronin Web.
#
# Ronin is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# Ronin is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with Ronin.  If not, see <http://www.gnu.org/licenses/>.
#

require 'ronin/web/proxy/app'

module Ronin
  module Web
    #
    # Returns the Ronin Web Proxy. When called for the first time
    # the proxy will be started in the background.
    #
    # @see Server::Base.run!
    #
    # @api public
    #
    def Web.proxy_server(options={},&block)
      unless class_variable_defined?('@@ronin_web_proxy')
        @@ronin_web_proxy = Proxy::App
        @@ronin_web_proxy.run!(options.merge(:background => true))
      end

      @@ronin_web_proxy.class_eval(&block)

      return @@ronin_web_proxy
    end
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
ronin-web-0.3.0.rc1 lib/ronin/web/proxy/web.rb
ronin-web-0.3.0.pre2 lib/ronin/web/proxy/web.rb
ronin-web-0.3.0.pre1 lib/ronin/web/proxy/web.rb