From 99f14af867691841901ed8cb7df4dff7b338c644 Mon Sep 17 00:00:00 2001 From: Ben Lewis Date: Wed, 27 Nov 2013 14:35:39 -0700 Subject: [PATCH] Capitalization, grammar, and pluralization fixes. [CI skip] Just a few fixes to improve consistency and readability. I also want to point out that 'lock' under 'Available Settings' (line 2048) is difficult to understand and should probably be reworded. I was unable to understand the author's intention, or I would have done it myself. --- README.md | 42 +++++++++++++++++++++--------------------- 1 file changed, 21 insertions(+), 21 deletions(-) diff --git a/README.md b/README.md index 77b95c8f..46fdee0e 100644 --- a/README.md +++ b/README.md @@ -465,13 +465,13 @@ Available Options:
layout
- Whether to use a layout (true or false), if it's a Symbol, specifies + Whether to use a layout (true or false). If it's a Symbol, specifies what template to use. Example: erb :index, :layout => !request.xhr?
content_type
- Content-Type the template produces, default depends on template language. + Content-Type the template produces. Default depends on template language.
scope
@@ -1075,7 +1075,7 @@ erb :admin_layout, :layout => :main_layout do end ``` -Currently the following rendering method accept a block: `erb`, `haml`, +Currently, the following rendering methods accept a block: `erb`, `haml`, `liquid`, `slim `, `wlang`. Also the general `render` method accepts a block. @@ -1447,7 +1447,7 @@ end ``` This allows you to implement streaming APIs, -[Server Sent Events](http://dev.w3.org/html5/eventsource/) and can be used as +[Server Sent Events](http://dev.w3.org/html5/eventsource/), and can be used as the basis for [WebSockets](http://en.wikipedia.org/wiki/WebSocket). It can also be used to increase throughput if some but not all content depends on a slow resource. @@ -1507,7 +1507,7 @@ end This logger will automatically take your Rack handler's logging settings into account. If logging is disabled, this method will return a dummy object, so -you do not have to worry in your routes and filters about it. +you do not have to worry about it in your routes and filters. Note that logging is only enabled for `Sinatra::Application` by default, so if you inherit from `Sinatra::Base`, you probably want to @@ -1682,11 +1682,11 @@ end Use the `:static_cache_control` setting (see below) to add `Cache-Control` header info to static files. -According to RFC 2616 your application should behave differently if the If-Match -or If-None-Match header is set to `*` depending on whether the resource +According to RFC 2616, your application should behave differently if the If-Match +or If-None-Match header is set to `*`, depending on whether the resource requested is already in existence. Sinatra assumes resources for safe (like get) and idempotent (like put) requests are already in existence, whereas other -resources (for instance for post requests), are treated as new resources. You +resources (for instance post requests) are treated as new resources. You can change this behavior by passing in a `:new_resource` option: ``` ruby @@ -2016,7 +2016,7 @@ set :protection, :session => true
add_charsets
- mime types the content_type helper will automatically add the charset info to. + Mime types the content_type helper will automatically add the charset info to. You should add to it rather than overriding this option: settings.add_charsets << "application/foobar"
@@ -2031,19 +2031,19 @@ set :protection, :session => true
IP address to bind to (default: 0.0.0.0 or localhost if your `environment` is set to development.). Only used for built-in server.
default_encoding
-
encoding to assume if unknown (defaults to "utf-8").
+
Encoding to assume if unknown (defaults to "utf-8").
dump_errors
-
display errors in the log.
+
Display errors in the log.
environment
- current environment, defaults to ENV['RACK_ENV'], or "development" if + Current environment. Defaults to ENV['RACK_ENV'], or "development" if not available.
logging
-
use the logger.
+
Use the logger.
lock
@@ -2054,7 +2054,7 @@ set :protection, :session => true
method_override
- use _method magic to allow put/delete forms in browsers that + Use _method magic to allow put/delete forms in browsers that don't support it.
@@ -2093,18 +2093,18 @@ set :protection, :session => true
raise_errors
- raise exceptions (will stop application). Enabled by default when + Raise exceptions (will stop application). Enabled by default when environment is set to "test", disabled otherwise.
run
- if enabled, Sinatra will handle starting the web server, do not + If enabled, Sinatra will handle starting the web server. Do not enable if using rackup or other means.
running
-
is the built-in server running now? Do not change this setting!
+
Is the built-in server running now? Do not change this setting!
server
@@ -2562,7 +2562,7 @@ end ### Dynamic Application Creation Sometimes you want to create new applications at runtime without having to -assign them to a constant, you can do this with `Sinatra.new`: +assign them to a constant. You can do this with `Sinatra.new`: ``` ruby require 'sinatra/base' @@ -2649,7 +2649,7 @@ You can reach the scope object (the class) like this: ### Request/Instance Scope For every incoming request, a new instance of your application class is -created and all handler blocks run in that scope. From within this scope you +created, and all handler blocks run in that scope. From within this scope you can access the `request` and `session` objects or call rendering methods like `erb` or `haml`. You can access the application scope from within the request scope via the `settings` helper: @@ -2796,7 +2796,7 @@ We also push out prerelease gems from time to time, so you can do a gem install sinatra --pre ``` -To get some of the latest features. +to get some of the latest features. ### With Bundler @@ -2859,7 +2859,7 @@ rake sinatra.gemspec rake install ``` -If you install gems as root, the last step should be +If you install gems as root, the last step should be: ``` shell sudo rake install