Giter VIP home page Giter VIP logo

rails-crawler's Introduction

Invoking rails-crawler

rails-crawler takes two arguments: the path to the Rails application and the site-relative start URL:

ruby crawl.rb /path/to/app /

If your start URL is a static page, you need to specify it explicitly:

ruby crawl.rb /path/to/app /index.html

How it works

rails-crawler uses the same interface as Rails integration tests to query URLs and retrieve their responses. Thus, it does not actually use the network at all.

Beginning with a GET request to the start URL, the site is walked in a depth-first fashion, following anchors and form actions, until all reachable paths have been processed. Each path is matched to its corresponding route (except static resources or non-existent pages which are handled separately); routes which are never hit are marked as "unused".

Currently, the application is loaded in the production environment, but this will probably change in the future.

Current limitations

rails-crawler currently only crawls through anonymously-accessible paths. If they require the user to log in, they will be marked as unused. Forms are submitted with no post variables, and so most will usually fail with HTTP error 422.

TODO list

  • The ability to authenticate with sites
  • A way to submit valid form data
  • Look in the config/ directory for a configuration file

License

rails-crawler is released under the GPL.

rails-crawler's People

Stargazers

 avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.