<commit_before>= Rack::GridFS

Rack:GridFS is a Rack middleware for creating HTTP endpoints for files
stored in MongoDB's GridFS.  You can configure a prefix string which
will be used to match the path of a request and create an id for looking
up the file in the GridFS store.

For example,

  GET '/gridfs/someobjectid'
  
If the prefix is "gridfs", then the key will be be "someobjectid".

== Installation

  gem install jnunemaker--rack-gridfs

== Usage

  require 'rack/gridfs'
  use Rack::GridFS, :hostname => 'localhost', :port => 27017, :database => 'test', :prefix => 'gridfs'

You must specify MongoDB database details:
- hostname: the hostname/IP where the MongoDB server is running.  Default 'localhost'.
- port: the port of the MongoDB server.  Default 27017.
- database: the MongoDB database to connect to.
- prefix: a string used to match against incoming paths and route to through the middleware.  Default 'gridfs'.

== Sinatra Example

  require 'rubygems'
  require 'sinatra'

  require 'rack/gridfs'
  use Rack::GridFS, :hostname => 'localhost', :port => 27017, :database => 'test', :prefix => 'gridfs'

  get /.*/ do
    "Whatchya talking about?"
  end

== Copyright

Copyright (c) 2009 <NAME>. See LICENSE for details.<commit_msg>Updated readme.<commit_after>= Rack::GridFS

Rack:GridFS is a Rack middleware for creating HTTP endpoints for files
stored in MongoDB's GridFS.  You can configure a prefix string which
will be used to match the path of a request and create an id for looking
up the file in the GridFS store.

For example,

  GET '/gridfs/someobjectid'
  
If the prefix is "gridfs", then the key will be be "someobjectid".

== Installation

  gem install jnunemaker--rack-gridfs

== Usage

  require 'rack/gridfs'
  use Rack::GridFS, :hostname => 'localhost', :port => 27017, :database => 'test', :prefix => 'gridfs'

You must specify MongoDB database details:
- hostname: the hostname/IP where the MongoDB server is running.  Default 'localhost'.
- port: the port of the MongoDB server.  Default 27017.
- database: the MongoDB database to connect to.
- prefix: a string used to match against incoming paths and route to through the middleware.  Default 'gridfs'.

== Sinatra Example

  require 'rubygems'
  require 'sinatra'

  require 'rack/gridfs'
  use Rack::GridFS, :hostname => 'localhost', :port => 27017, :database => 'test', :prefix => 'gridfs'

  # put a file in gridfs and try visiting /gridfs/objectid

  get /.*/ do
    "Whatchya talking about?"
  end

== Copyright

Copyright (c) 2009 <NAME>. See LICENSE for details.
{'fraction_non_alphanumeric': 0.09828393135725429, 'fraction_numerical': 0.014820592823712949, 'mean_word_length': 3.9326923076923075, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 21, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2788340', 'n_tokens_mistral': 829, 'n_tokens_neox': 763, 'n_words': 335}