Sha256: 03807d3f585ce0cfaedacfd039b2889be75f54aa9f9b54127e6a3baa26f5c0f5

Contents?: true

Size: 787 Bytes

Versions: 22

Compression:

Stored size: 787 Bytes

Contents

module Merb
  
  module Rack
    
    class Runner
      # ==== Parameters
      # opts<Hash>:: Options for the runner (see below).
      #
      # ==== Options (opts)
      # :runner_code<String>:: The code to run.
      #
      # ==== Notes
      # If opts[:runner_code] matches a filename, that file will be read and
      # the contents executed. Otherwise the code will be executed directly.
      def self.start(opts={})
        Merb::Server.change_privilege
        if opts[:runner_code]
          if File.exists?(opts[:runner_code])
            eval(File.read(opts[:runner_code]), TOPLEVEL_BINDING, __FILE__, __LINE__)
          else
            eval(opts[:runner_code], TOPLEVEL_BINDING, __FILE__, __LINE__)
          end
          exit
        end  
      end
    end
  end
end

Version data entries

22 entries across 22 versions & 5 rubygems

Version Path
joe-merb-core-0.9.8 lib/merb-core/rack/adapter/runner.rb
wycats-merb-core-0.9.8 lib/merb-core/rack/adapter/runner.rb
wycats-merb-core-0.9.9 lib/merb-core/rack/adapter/runner.rb
merb-core-1.1.3 spec10/public/webrat/test_app/gems/gems/merb-core-0.9.14/lib/merb-core/rack/adapter/runner.rb
merb-core-1.1.2 spec10/public/webrat/test_app/gems/gems/merb-core-0.9.14/lib/merb-core/rack/adapter/runner.rb
merb-core-1.1.1 spec10/public/webrat/test_app/gems/gems/merb-core-0.9.14/lib/merb-core/rack/adapter/runner.rb
merb-core-1.1.0 spec10/public/webrat/test_app/gems/gems/merb-core-0.9.14/lib/merb-core/rack/adapter/runner.rb
merb-core-1.1.0.rc1 spec10/public/webrat/test_app/gems/gems/merb-core-0.9.14/lib/merb-core/rack/adapter/runner.rb
merb-core-1.1.0.pre spec10/public/webrat/test_app/gems/gems/merb-core-0.9.14/lib/merb-core/rack/adapter/runner.rb
thorero-0.9.4.5 lib/merb-core/rack/adapter/runner.rb
merb-core-0.9.10 lib/merb-core/rack/adapter/runner.rb
merb-core-0.9.13 lib/merb-core/rack/adapter/runner.rb
merb-core-0.9.11 lib/merb-core/rack/adapter/runner.rb
merb-core-0.9.12 lib/merb-core/rack/adapter/runner.rb
merb-core-0.9.4 lib/merb-core/rack/adapter/runner.rb
merb-core-0.9.5 lib/merb-core/rack/adapter/runner.rb
merb-core-0.9.3 lib/merb-core/rack/adapter/runner.rb
merb-core-0.9.7 lib/merb-core/rack/adapter/runner.rb
merb-core-0.9.6 lib/merb-core/rack/adapter/runner.rb
merb-core-0.9.9 lib/merb-core/rack/adapter/runner.rb