Merge pull request #1074 from ReadmeCritic/patch-1
Update README URLs based on HTTP redirects
This commit is contained in:
commit
f6490a0861
46
README.de.md
46
README.de.md
|
@ -4,7 +4,7 @@
|
|||
Umständen nicht auf dem aktuellen Stand (aktuell Sinatra 1.4.5).*
|
||||
|
||||
Sinatra ist eine
|
||||
[DSL](http://de.wikipedia.org/wiki/Domänenspezifische_Sprache), die das
|
||||
[DSL](https://de.wikipedia.org/wiki/Domänenspezifische_Sprache), die das
|
||||
schnelle Erstellen von Webanwendungen in Ruby mit minimalem Aufwand
|
||||
ermöglicht:
|
||||
|
||||
|
@ -608,7 +608,7 @@ Nimmt ebenso einen Block für Inline-Templates entgegen (siehe Beispiel).
|
|||
<table>
|
||||
<tr>
|
||||
<td>Abhängigkeit</td>
|
||||
<td><a href="http://nokogiri.org/">nokogiri</a></td>
|
||||
<td><a href="http://www.nokogiri.org/">nokogiri</a></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Dateierweiterung</td>
|
||||
|
@ -663,7 +663,7 @@ Nimmt ebenso einen Block für Inline-Templates entgegen (siehe Beispiel).
|
|||
<table>
|
||||
<tr>
|
||||
<td>Abhängigkeit</td>
|
||||
<td><a href="http://www.lesscss.org/">less</a></td>
|
||||
<td><a href="http://lesscss.org/">less</a></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Dateierweiterung</td>
|
||||
|
@ -681,7 +681,7 @@ Nimmt ebenso einen Block für Inline-Templates entgegen (siehe Beispiel).
|
|||
<table>
|
||||
<tr>
|
||||
<td>Abhängigkeit</td>
|
||||
<td><a href="http://www.liquidmarkup.org/">liquid</a></td>
|
||||
<td><a href="http://liquidmarkup.org/">liquid</a></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Dateierweiterung</td>
|
||||
|
@ -703,7 +703,7 @@ denen man Variablen weitergibt.
|
|||
<tr>
|
||||
<td>Abhängigkeit</td>
|
||||
<td>Eine der folgenden Bibliotheken:
|
||||
<a href="https://github.com/rtomayko/rdiscount" title="RDiscount">RDiscount</a>,
|
||||
<a href="https://github.com/davidfstr/rdiscount" title="RDiscount">RDiscount</a>,
|
||||
<a href="https://github.com/vmg/redcarpet" title="RedCarpet">RedCarpet</a>,
|
||||
<a href="http://deveiate.org/projects/BlueCloth" title="BlueCloth">BlueCloth</a>,
|
||||
<a href="http://kramdown.gettalong.org/" title="kramdown">kramdown</a> oder
|
||||
|
@ -863,7 +863,7 @@ man üblicherweise locals verwenden wollen, mit denen man Variablen weitergibt.
|
|||
<table>
|
||||
<tr>
|
||||
<td>Abhängigkeit</td>
|
||||
<td><a href="http://markaby.github.com/">markaby</a></td>
|
||||
<td><a href="http://markaby.github.io/">markaby</a></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Dateierweiterung</td>
|
||||
|
@ -1011,7 +1011,7 @@ Templates zu verwenden und einen anderen für das Layout, indem die
|
|||
<tr>
|
||||
<td>Abhängigkeit</td>
|
||||
<td>
|
||||
<a href="https://github.com/lucasmazza/ruby-stylus" title="Ruby Stylus">
|
||||
<a href="https://github.com/forgecrafted/ruby-stylus" title="Ruby Stylus">
|
||||
Stylus
|
||||
</a> und eine Möglichkeit
|
||||
<a href="https://github.com/sstephenson/execjs/blob/master/README.md#readme" title="ExecJS">
|
||||
|
@ -1540,8 +1540,8 @@ end
|
|||
```
|
||||
|
||||
Damit lassen sich Streaming-APIs realisieren, sog.
|
||||
[Server Sent Events](http://dev.w3.org/html5/eventsource/), die als Basis für
|
||||
[WebSockets](http://en.wikipedia.org/wiki/WebSocket) dienen. Ebenso können sie
|
||||
[Server Sent Events](https://w3c.github.io/eventsource/), die als Basis für
|
||||
[WebSockets](https://en.wikipedia.org/wiki/WebSocket) dienen. Ebenso können sie
|
||||
verwendet werden, um den Durchsatz zu erhöhen, wenn ein Teil der Daten von
|
||||
langsamen Ressourcen abhängig ist.
|
||||
|
||||
|
@ -1672,7 +1672,7 @@ Weitere Parameter werden wie Argumente der `halt`-Methode behandelt:
|
|||
|
||||
```ruby
|
||||
redirect to('/bar'), 303
|
||||
redirect 'http://google.com', 'Hier bist du falsch'
|
||||
redirect 'http://www.google.com/', 'Hier bist du falsch'
|
||||
```
|
||||
|
||||
Ebenso leicht lässt sich ein Schritt zurück mit dem Alias `redirect back`
|
||||
|
@ -1757,7 +1757,7 @@ end
|
|||
```
|
||||
|
||||
ebenso ist es möglich einen
|
||||
[schwachen ETag](http://de.wikipedia.org/wiki/HTTP_ETag) zu verwenden:
|
||||
[schwachen ETag](https://de.wikipedia.org/wiki/HTTP_ETag) zu verwenden:
|
||||
|
||||
```ruby
|
||||
etag @article.sha1, :weak
|
||||
|
@ -2073,7 +2073,7 @@ end
|
|||
#### Einstellung des Angriffsschutzes
|
||||
|
||||
Sinatra verwendet
|
||||
[Rack::Protection](https://github.com/rkh/rack-protection#readme), um die
|
||||
[Rack::Protection](https://github.com/sinatra/rack-protection#readme), um die
|
||||
Anwendung vor häufig vorkommenden Angriffen zu schützen. Diese Voreinstellung
|
||||
lässt sich selbstverständlich deaktivieren, der damit verbundene
|
||||
Geschwindigkeitszuwachs steht aber in keinem Verhätnis zu den möglichen
|
||||
|
@ -2360,7 +2360,7 @@ end
|
|||
```
|
||||
|
||||
Die Semantik von `use` entspricht der gleichnamigen Methode der
|
||||
[Rack::Builder](http://rubydoc.info/github/rack/rack/master/Rack/Builder)-DSL
|
||||
[Rack::Builder](http://www.rubydoc.info/github/rack/rack/master/Rack/Builder)-DSL
|
||||
(meist verwendet in Rackup-Dateien). Ein Beispiel dafür ist, dass die
|
||||
`use`-Methode mehrere/verschiedene Argumente und auch Blöcke entgegennimmt:
|
||||
|
||||
|
@ -2383,7 +2383,7 @@ oder im [Rack wiki](https://github.com/rack/rack/wiki/List-of-Middleware).
|
|||
## Testen
|
||||
|
||||
Sinatra-Tests können mit jedem auf Rack aufbauendem Test-Framework geschrieben
|
||||
werden. [Rack::Test](http://rdoc.info/github/brynary/rack-test/master/frames)
|
||||
werden. [Rack::Test](http://www.rubydoc.info/github/brynary/rack-test/master/frames)
|
||||
wird empfohlen:
|
||||
|
||||
```ruby
|
||||
|
@ -2464,7 +2464,7 @@ Veränderungen zu `Sinatra::Base` konvertiert werden:
|
|||
|
||||
`Sinatra::Base` ist ein unbeschriebenes Blatt. Die meisten Optionen sind per
|
||||
Standard deaktiviert. Das betrifft auch den eingebauten Server. Siehe
|
||||
[Optionen und Konfiguration](http://sinatra.github.com/configuration.html) für
|
||||
[Optionen und Konfiguration](http://www.sinatrarb.com/configuration.html) für
|
||||
Details über mögliche Optionen.
|
||||
|
||||
Damit eine App sich ähnlich wie eine klassische App verhält, kann man
|
||||
|
@ -2926,7 +2926,7 @@ gem install sinatra --pre
|
|||
### Mit Bundler
|
||||
|
||||
Wenn die Applikation mit der neuesten Version von Sinatra und
|
||||
[Bundler](http://gembundler.com/) genutzt werden soll, empfehlen wir den
|
||||
[Bundler](http://bundler.io) genutzt werden soll, empfehlen wir den
|
||||
nachfolgenden Weg.
|
||||
|
||||
Soweit Bundler noch nicht installiert ist:
|
||||
|
@ -3013,12 +3013,12 @@ SemVer und SemVerTag.
|
|||
|
||||
## Mehr
|
||||
|
||||
* [Projekt-Website](http://sinatra.github.com/) - Ergänzende Dokumentation,
|
||||
* [Projekt-Website](http://www.sinatrarb.com/) - Ergänzende Dokumentation,
|
||||
News und Links zu anderen Ressourcen.
|
||||
* [Mitmachen](http://sinatra.github.com/contributing.html) - Einen Fehler
|
||||
* [Mitmachen](http://www.sinatrarb.com/contributing.html) - Einen Fehler
|
||||
gefunden? Brauchst du Hilfe? Hast du einen Patch?
|
||||
* [Issue-Tracker](http://github.com/sinatra/sinatra/issues)
|
||||
* [Twitter](http://twitter.com/sinatra)
|
||||
* [Issue-Tracker](https://github.com/sinatra/sinatra/issues)
|
||||
* [Twitter](https://twitter.com/sinatra)
|
||||
* [Mailing-Liste](http://groups.google.com/group/sinatrarb)
|
||||
* [#sinatra](irc://chat.freenode.net/#sinatra) auf http://freenode.net Es
|
||||
gibt dort auch immer wieder deutschsprachige Entwickler, die gerne weiterhelfen.
|
||||
|
@ -3026,6 +3026,6 @@ SemVer und SemVerTag.
|
|||
* [Sinatra Recipes](http://recipes.sinatrarb.com/) Sinatra-Rezepte aus der
|
||||
Community
|
||||
* API Dokumentation für die [aktuelle
|
||||
Version](http://rubydoc.info/gems/sinatra) oder für
|
||||
[HEAD](http://rubydoc.info/github/sinatra/sinatra) auf http://rubydoc.info
|
||||
* [CI Server](http://travis-ci.org/sinatra/sinatra)
|
||||
Version](http://www.rubydoc.info//gems/sinatra) oder für
|
||||
[HEAD](http://www.rubydoc.info/github/sinatra/sinatra) auf http://rubydoc.info
|
||||
* [CI Server](https://travis-ci.org/sinatra/sinatra)
|
||||
|
|
44
README.es.md
44
README.es.md
|
@ -3,7 +3,7 @@
|
|||
*Atención: Este documento es una traducción de la versión en inglés y puede estar desactualizado.*
|
||||
|
||||
Sinatra es un
|
||||
[DSL](http://es.wikipedia.org/wiki/Lenguaje_específico_del_dominio) para
|
||||
[DSL](https://es.wikipedia.org/wiki/Lenguaje_específico_del_dominio) para
|
||||
crear aplicaciones web rápidamente en Ruby con un mínimo esfuerzo:
|
||||
|
||||
```ruby
|
||||
|
@ -503,7 +503,7 @@ Además, acepta un bloque con la definición de la plantilla (ver ejemplo).
|
|||
<table>
|
||||
<tr>
|
||||
<td>Dependencias</td>
|
||||
<td><a href="http://nokogiri.org/" title="nokogiri">nokogiri</a></td>
|
||||
<td><a href="http://www.nokogiri.org/" title="nokogiri">nokogiri</a></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Extensiones de Archivo</td>
|
||||
|
@ -556,7 +556,7 @@ Además, acepta un bloque con la definición de la plantilla (ver ejemplo).
|
|||
<table>
|
||||
<tr>
|
||||
<td>Dependencias</td>
|
||||
<td><a href="http://www.lesscss.org/" title="less">less</a></td>
|
||||
<td><a href="http://lesscss.org/" title="less">less</a></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Extensiones de Archivo</td>
|
||||
|
@ -573,7 +573,7 @@ Además, acepta un bloque con la definición de la plantilla (ver ejemplo).
|
|||
<table>
|
||||
<tr>
|
||||
<td>Dependencias</td>
|
||||
<td><a href="http://www.liquidmarkup.org/" title="liquid">liquid</a></td>
|
||||
<td><a href="http://liquidmarkup.org/" title="liquid">liquid</a></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Extensiones de Archivo</td>
|
||||
|
@ -594,7 +594,7 @@ plantilla Liquid, casi siempre va a querer pasarle locales.
|
|||
<tr>
|
||||
<td>Dependencias</td>
|
||||
<td>
|
||||
<a href="https://github.com/rtomayko/rdiscount" title="RDiscount">RDiscount</a>,
|
||||
<a href="https://github.com/davidfstr/rdiscount" title="RDiscount">RDiscount</a>,
|
||||
<a href="https://github.com/vmg/redcarpet" title="RedCarpet">RedCarpet</a>,
|
||||
<a href="http://deveiate.org/projects/BlueCloth" title="BlueCloth">BlueCloth</a>,
|
||||
<a href="http://kramdown.gettalong.org/" title="kramdown">kramdown</a> o
|
||||
|
@ -727,7 +727,7 @@ plantilla Radius, casi siempre se necesita pasar locales.
|
|||
<table>
|
||||
<tr>
|
||||
<td>Dependencias</td>
|
||||
<td><a href="http://markaby.github.com/" title="Markaby">Markaby</a></td>
|
||||
<td><a href="http://markaby.github.io/" title="Markaby">Markaby</a></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Extensiones de Archivo</td>
|
||||
|
@ -841,7 +841,7 @@ distinto al de la plantilla pasando la opción `:layout_engine`.
|
|||
<tr>
|
||||
<td>Dependencias</td>
|
||||
<td>
|
||||
<a href="https://github.com/lucasmazza/ruby-stylus" title="Ruby Stylus">
|
||||
<a href="https://github.com/forgecrafted/ruby-stylus" title="Ruby Stylus">
|
||||
Stylus
|
||||
</a> y un
|
||||
<a href="https://github.com/sstephenson/execjs/blob/master/README.md#readme" title="ExecJS">
|
||||
|
@ -1324,8 +1324,8 @@ end
|
|||
```
|
||||
|
||||
Podés implementar APIs de streaming,
|
||||
[Server-Sent Events](http://dev.w3.org/html5/eventsource/) y puede ser usado
|
||||
como base para [WebSockets](http://es.wikipedia.org/wiki/WebSockets). También
|
||||
[Server-Sent Events](https://w3c.github.io/eventsource/) y puede ser usado
|
||||
como base para [WebSockets](https://es.wikipedia.org/wiki/WebSockets). También
|
||||
puede ser usado para incrementar el throughput si solo una parte del contenido
|
||||
depende de un recurso lento.
|
||||
|
||||
|
@ -1441,7 +1441,7 @@ pasados a `halt`:
|
|||
|
||||
```ruby
|
||||
redirect to('/bar'), 303
|
||||
redirect 'http://google.com', 'te confundiste de lugar, compañero'
|
||||
redirect 'http://www.google.com/', 'te confundiste de lugar, compañero'
|
||||
```
|
||||
|
||||
También podés redireccionar fácilmente de vuelta hacia la página desde donde
|
||||
|
@ -1526,7 +1526,7 @@ end
|
|||
```
|
||||
|
||||
También es posible usar una
|
||||
[weak ETag](http://en.wikipedia.org/wiki/HTTP_ETag#Strong_and_weak_validation):
|
||||
[weak ETag](https://en.wikipedia.org/wiki/HTTP_ETag#Strong_and_weak_validation):
|
||||
|
||||
```ruby
|
||||
etag @articulo.sha1, :weak
|
||||
|
@ -1841,7 +1841,7 @@ end
|
|||
|
||||
### Configurando la Protección de Ataques
|
||||
|
||||
Sinatra usa [Rack::Protection](https://github.com/rkh/rack-protection#readme)
|
||||
Sinatra usa [Rack::Protection](https://github.com/sinatra/rack-protection#readme)
|
||||
para defender a tu aplicación de los ataques más comunes. Si por algún motivo,
|
||||
querés desactivar esta funcionalidad, podés hacerlo como se indica a
|
||||
continuación (ten en cuenta que tu aplicación va a quedar expuesta a un
|
||||
|
@ -2187,7 +2187,7 @@ end
|
|||
```
|
||||
|
||||
La semántica de `use` es idéntica a la definida para el DSL
|
||||
Rack::Builder[http://rubydoc.info/github/rack/rack/master/Rack/Builder] (más
|
||||
Rack::Builder[http://www.rubydoc.info/github/rack/rack/master/Rack/Builder] (más
|
||||
frecuentemente usado en archivos rackup). Por ejemplo, el método `use`
|
||||
acepta argumentos múltiples/variables así como bloques:
|
||||
|
||||
|
@ -2211,7 +2211,7 @@ o en la [Rack wiki](https://github.com/rack/rack/wiki/List-of-Middleware).
|
|||
|
||||
Las pruebas para las aplicaciones Sinatra pueden ser escritas utilizando
|
||||
cualquier framework o librería de pruebas basada en Rack. Se recomienda usar
|
||||
[Rack::Test](http://rdoc.info/github/brynary/rack-test/master/frames):
|
||||
[Rack::Test](http://www.rubydoc.info/github/brynary/rack-test/master/frames):
|
||||
|
||||
```ruby
|
||||
require 'mi_app_sinatra'
|
||||
|
@ -2279,7 +2279,7 @@ aplicaciones top-level se pueden convertir en componentes
|
|||
|
||||
`Sinatra::Base` es una pizarra en blanco. La mayoría de las opciones están
|
||||
desactivadas por defecto, incluyendo el servidor incorporado. Mirá
|
||||
[Opciones y Configuraciones](http://sinatra.github.com/configuration.html)
|
||||
[Opciones y Configuraciones](http://www.sinatrarb.com/configuration.html)
|
||||
para detalles sobre las opciones disponibles y su comportamiento.
|
||||
|
||||
### Estilo Modular vs. Clásico
|
||||
|
@ -2732,7 +2732,7 @@ Para obtener algunas de las últimas características.
|
|||
### Con Bundler
|
||||
|
||||
Esta es la manera recomendada para ejecutar tu aplicación sobre la última
|
||||
versión de Sinatra usando [Bundler](http://gembundler.com/).
|
||||
versión de Sinatra usando [Bundler](http://bundler.io).
|
||||
|
||||
Primero, instalá Bundler si no lo hiciste todavía:
|
||||
|
||||
|
@ -2807,15 +2807,15 @@ siguiendo las especificaciones SemVer y SemVerTag.
|
|||
adicional, noticias, y enlaces a otros recursos.
|
||||
* [Contribuyendo](http://www.sinatrarb.com/contributing) - ¿Encontraste un
|
||||
error?. ¿Necesitás ayuda?. ¿Tenés un parche?.
|
||||
* [Seguimiento de problemas](http://github.com/sinatra/sinatra/issues)
|
||||
* [Twitter](http://twitter.com/sinatra)
|
||||
* [Seguimiento de problemas](https://github.com/sinatra/sinatra/issues)
|
||||
* [Twitter](https://twitter.com/sinatra)
|
||||
* [Lista de Correo](http://groups.google.com/group/sinatrarb/topics)
|
||||
* [IRC: #sinatra](irc://chat.freenode.net/#sinatra) en http://freenode.net
|
||||
* [Sinatra Book](https://github.com/sinatra/sinatra-book/) Tutorial (en inglés).
|
||||
* [Sinatra Recipes](http://recipes.sinatrarb.com/) Recetas contribuidas
|
||||
por la comunidad (en inglés).
|
||||
* Documentación de la API para la
|
||||
[última versión liberada](http://rubydoc.info/gems/sinatra) o para la
|
||||
[rama de desarrollo actual](http://rubydoc.info/github/sinatra/sinatra)
|
||||
en http://rubydoc.info/
|
||||
* [Servidor de CI](http://travis-ci.org/sinatra/sinatra)
|
||||
[última versión liberada](http://www.rubydoc.info/gems/sinatra) o para la
|
||||
[rama de desarrollo actual](http://www.rubydoc.info/github/sinatra/sinatra)
|
||||
en http://www.rubydoc.info/
|
||||
* [Servidor de CI](https://travis-ci.org/sinatra/sinatra)
|
||||
|
|
42
README.fr.md
42
README.fr.md
|
@ -2,7 +2,7 @@
|
|||
*Attention : Ce document correspond à la traduction de la version anglaise et
|
||||
il n'est peut-être plus à jour.*
|
||||
|
||||
Sinatra est un [DSL](http://fr.wikipedia.org/wiki/Langage_dédié) pour
|
||||
Sinatra est un [DSL](https://fr.wikipedia.org/wiki/Langage_dédié) pour
|
||||
créer rapidement et facilement des applications web en Ruby :
|
||||
|
||||
```ruby
|
||||
|
@ -616,7 +616,7 @@ exemple).
|
|||
<table>
|
||||
<tr>
|
||||
<td>Dépendances</td>
|
||||
<td><a href="http://nokogiri.org/" title="nokogiri">nokogiri</a></td>
|
||||
<td><a href="http://www.nokogiri.org/" title="nokogiri">nokogiri</a></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Extensions de fichier</td>
|
||||
|
@ -672,7 +672,7 @@ exemple).
|
|||
<table>
|
||||
<tr>
|
||||
<td>Dépendances</td>
|
||||
<td><a href="http://www.lesscss.org/" title="less">less</a></td>
|
||||
<td><a href="http://lesscss.org/" title="less">less</a></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Extensions de fichier</td>
|
||||
|
@ -690,7 +690,7 @@ exemple).
|
|||
<table>
|
||||
<tr>
|
||||
<td>Dépendances</td>
|
||||
<td><a href="http://www.liquidmarkup.org/" title="liquid">liquid</a></td>
|
||||
<td><a href="http://liquidmarkup.org/" title="liquid">liquid</a></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Extensions de fichier</td>
|
||||
|
@ -713,7 +713,7 @@ locales.
|
|||
<td><p>Dépendances</p></td>
|
||||
<td>
|
||||
Au choix :
|
||||
<a href="https://github.com/rtomayko/rdiscount" title="RDiscount">RDiscount</a>,
|
||||
<a href="https://github.com/davidfstr/rdiscount" title="RDiscount">RDiscount</a>,
|
||||
<a href="https://github.com/vmg/redcarpet" title="RedCarpet">RedCarpet</a>,
|
||||
<a href="http://deveiate.org/projects/BlueCloth" title="BlueCloth">BlueCloth</a>,
|
||||
<a href="http://kramdown.gettalong.org/" title="kramdown">kramdown</a>,
|
||||
|
@ -849,7 +849,7 @@ Radius, vous aurez sûrement à lui passer des variables locales.
|
|||
<table>
|
||||
<tr>
|
||||
<td>Dépendances</td>
|
||||
<td><a href="http://markaby.github.com/" title="Markaby">Markaby</a></td>
|
||||
<td><a href="http://markaby.github.io/" title="Markaby">Markaby</a></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Extensions de fichier</td>
|
||||
|
@ -966,7 +966,7 @@ en utilisant l'option `:layout_engine`.
|
|||
<tr>
|
||||
<td>Dépendances</td>
|
||||
<td>
|
||||
<a href="https://github.com/lucasmazza/ruby-stylus" title="Ruby Stylus">
|
||||
<a href="https://github.com/forgecrafted/ruby-stylus" title="Ruby Stylus">
|
||||
Stylus
|
||||
</a>
|
||||
et un
|
||||
|
@ -1503,8 +1503,8 @@ end
|
|||
```
|
||||
|
||||
Cela permet d'implémenter des API de streaming ou de
|
||||
[Server Sent Events](http://dev.w3.org/html5/eventsource/) et peut servir de
|
||||
base pour des [WebSockets](http://en.wikipedia.org/wiki/WebSocket). Vous
|
||||
[Server Sent Events](https://w3c.github.io/eventsource/) et peut servir de
|
||||
base pour des [WebSockets](https://en.wikipedia.org/wiki/WebSocket). Vous
|
||||
pouvez aussi l'employer pour augmenter le débit quand une partie du contenu
|
||||
provient d'une ressource lente.
|
||||
|
||||
|
@ -1635,7 +1635,7 @@ Tout paramètre additionnel sera utilisé comme argument pour la méthode
|
|||
|
||||
```ruby
|
||||
redirect to('/bar'), 303
|
||||
redirect 'http://google.com', 'mauvais endroit mon pote'
|
||||
redirect 'http://www.google.com/', 'mauvais endroit mon pote'
|
||||
```
|
||||
|
||||
Vous pouvez aussi rediriger vers la page dont l'utilisateur venait au moyen de
|
||||
|
@ -1718,7 +1718,7 @@ end
|
|||
```
|
||||
|
||||
Il est également possible d'utiliser un
|
||||
[weak ETag](http://en.wikipedia.org/wiki/HTTP_ETag#Strong_and_weak_validation) :
|
||||
[weak ETag](https://en.wikipedia.org/wiki/HTTP_ETag#Strong_and_weak_validation) :
|
||||
|
||||
```ruby
|
||||
etag @article.sha1, :weak
|
||||
|
@ -2047,7 +2047,7 @@ end
|
|||
|
||||
### Se protéger des attaques
|
||||
|
||||
Sinatra utilise [Rack::Protection](https://github.com/rkh/rack-protection#readme)
|
||||
Sinatra utilise [Rack::Protection](https://github.com/sinatra/rack-protection#readme)
|
||||
pour protéger votre application contre les principales attaques opportunistes.
|
||||
Vous pouvez très simplement désactiver cette fonctionnalité (ce qui exposera
|
||||
votre application à beaucoup de vulnerabilités courantes) :
|
||||
|
@ -2356,7 +2356,7 @@ end
|
|||
```
|
||||
|
||||
La sémantique de `use` est identique à celle définie dans le DSL de
|
||||
[Rack::Builder](http://rubydoc.info/github/rack/rack/master/Rack/Builder)
|
||||
[Rack::Builder](http://www.rubydoc.info/github/rack/rack/master/Rack/Builder)
|
||||
(le plus souvent utilisé dans un fichier `rackup`). Par exemple, la méthode
|
||||
`use` accepte divers arguments ainsi que des blocs :
|
||||
|
||||
|
@ -2447,7 +2447,7 @@ pour transformer la plupart des applications de haut niveau en un composant
|
|||
|
||||
`Sinatra::Base` est une page blanche. La plupart des options sont
|
||||
désactivées par défaut, y compris le serveur intégré. Reportez-vous à
|
||||
[Options et Configuration](http://sinatra.github.com/configuration.html)
|
||||
[Options et Configuration](http://www.sinatrarb.com/configuration.html)
|
||||
pour plus d'informations sur les options et leur fonctionnement. Si vous
|
||||
souhaitez un comportement plus proche de celui obtenu lorsque vous définissez
|
||||
votre application au niveau supérieur (aussi connu sous le nom de style
|
||||
|
@ -2922,7 +2922,7 @@ Ce qui permet de bénéficier des toutes dernières fonctionnalités.
|
|||
|
||||
### Installer avec Bundler
|
||||
|
||||
Il est cependant conseillé de passer par [Bundler](http://gembundler.com/) pour
|
||||
Il est cependant conseillé de passer par [Bundler](http://bundler.io) pour
|
||||
faire tourner votre application avec la dernière version de Sinatra.
|
||||
|
||||
Pour commencer, installez bundler si nécessaire :
|
||||
|
@ -3000,14 +3000,14 @@ SemVer que SemVerTag.
|
|||
de news, et des liens vers d'autres ressources.
|
||||
* [Contribuer](http://www.sinatrarb.com/contributing) - Vous avez trouvé un
|
||||
bug ? Besoin d'aide ? Vous avez un patch ?
|
||||
* [Suivi des problèmes](http://github.com/sinatra/sinatra/issues)
|
||||
* [Twitter](http://twitter.com/sinatra)
|
||||
* [Suivi des problèmes](https://github.com/sinatra/sinatra/issues)
|
||||
* [Twitter](https://twitter.com/sinatra)
|
||||
* [Mailing List](http://groups.google.com/group/sinatrarb/topics)
|
||||
* IRC : [#sinatra](irc://chat.freenode.net/#sinatra) sur http://freenode.net
|
||||
* [Sinatra Book](https://github.com/sinatra/sinatra-book/) Tutoriels et recettes
|
||||
* [Sinatra Recipes](http://recipes.sinatrarb.com/) trucs et astuces rédigés par
|
||||
la communauté
|
||||
* Documentation API de la [dernière version](http://rubydoc.info/gems/sinatra)
|
||||
ou du [HEAD courant](http://rubydoc.info/github/sinatra/sinatra) sur
|
||||
http://rubydoc.info
|
||||
* [CI server](http://travis-ci.org/sinatra/sinatra)
|
||||
* Documentation API de la [dernière version](http://www.rubydoc.info/gems/sinatra)
|
||||
ou du [HEAD courant](http://www.rubydoc.info/github/sinatra/sinatra) sur
|
||||
http://www.rubydoc.info/
|
||||
* [CI server](https://travis-ci.org/sinatra/sinatra)
|
||||
|
|
12
README.hu.md
12
README.hu.md
|
@ -2,7 +2,7 @@
|
|||
*Fontos megjegyzés: Ez a dokumentum csak egy fordítása az angol nyelvű
|
||||
változatnak, és lehet, hogy nem naprakész.*
|
||||
|
||||
A Sinatra egy [DSL](http://en.wikipedia.org/wiki/Domain-specific_language)
|
||||
A Sinatra egy [DSL](https://en.wikipedia.org/wiki/Domain-specific_language)
|
||||
webalkalmazások Ruby nyelven történő fejlesztéséhez, minimális
|
||||
energiabefektetéssel:
|
||||
|
||||
|
@ -518,7 +518,7 @@ A Sinatra keretrendszerben gyerekjáték a Rack middleware-ek behúzása a
|
|||
```
|
||||
|
||||
A `use` metódus szemantikája megegyezik a
|
||||
[Rack::Builder](http://rubydoc.info/github/rack/rack/master/Rack/Builder) DSL-ben
|
||||
[Rack::Builder](http://www.rubydoc.info/github/rack/rack/master/Rack/Builder) DSL-ben
|
||||
használt +use+ metóduséval (az említett DSL-t leginkább rackup állományokban
|
||||
használják). Hogy egy példát említsünk, a `use` metódus elfogad
|
||||
változókat és blokkokat egyaránt, akár kombinálva is ezeket:
|
||||
|
@ -621,7 +621,7 @@ alkalmazás átalakítható Sinatra::Base alapú komponensekké két lépésben:
|
|||
A `Sinatra::Base` osztály igazából egy üres lap: a legtöbb funkció
|
||||
alapból ki van kapcsolva, beleértve a beépített szervert is. A
|
||||
beállításokkal és az egyes kapcsolók hatásával az
|
||||
[Options and Configuration](http://sinatra.github.com/configuration.html) lap
|
||||
[Options and Configuration](http://www.sinatrarb.com/configuration.html) lap
|
||||
foglalkozik.
|
||||
|
||||
Széljegyzet: A Sinatra felső szintű DSL-je egy egyszerű delegációs
|
||||
|
@ -684,11 +684,11 @@ A Sinatra frissítését később így végezheted el:
|
|||
|
||||
## További információk
|
||||
|
||||
* [A projekt weboldala](http://sinatra.github.com/) - Kiegészítő dokumentáció,
|
||||
* [A projekt weboldala](http://www.sinatrarb.com/) - Kiegészítő dokumentáció,
|
||||
hírek, hasznos linkek
|
||||
* [Közreműködés](http://sinatra.github.com/contributing.html) - Hibát találtál?
|
||||
* [Közreműködés](http://www.sinatrarb.com/contributing.html) - Hibát találtál?
|
||||
Segítségre van szükséged? Foltot küldenél be?
|
||||
* [Lighthouse](http://sinatra.lighthouseapp.com) - Hibakövetés és kiadások
|
||||
* [Twitter](http://twitter.com/sinatra)
|
||||
* [Twitter](https://twitter.com/sinatra)
|
||||
* [Levelezőlista](http://groups.google.com/group/sinatrarb)
|
||||
* [IRC: #sinatra](irc://chat.freenode.net/#sinatra) a http://freenode.net címen
|
||||
|
|
42
README.ja.md
42
README.ja.md
|
@ -3,7 +3,7 @@
|
|||
*注)
|
||||
本文書は英語から翻訳したものであり、その内容が最新でない場合もあります。最新の情報はオリジナルの英語版を参照して下さい。*
|
||||
|
||||
Sinatraは最小の労力でRubyによるWebアプリケーションを手早く作るための[DSL](http://ja.wikipedia.org/wiki/ドメイン固有言語)です。
|
||||
Sinatraは最小の労力でRubyによるWebアプリケーションを手早く作るための[DSL](https://ja.wikipedia.org/wiki/メインページドメイン固有言語)です。
|
||||
|
||||
```ruby
|
||||
# myapp.rb
|
||||
|
@ -578,7 +578,7 @@ get('/') { markdown :index }
|
|||
<table>
|
||||
<tr>
|
||||
<td>依存</td>
|
||||
<td><a href="http://nokogiri.org/" title="nokogiri">nokogiri</a></td>
|
||||
<td><a href="http://www.nokogiri.org/" title="nokogiri">nokogiri</a></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>ファイル拡張子</td>
|
||||
|
@ -633,7 +633,7 @@ get('/') { markdown :index }
|
|||
<table>
|
||||
<tr>
|
||||
<td>依存</td>
|
||||
<td><a href="http://www.lesscss.org/" title="less">less</a></td>
|
||||
<td><a href="http://lesscss.org/" title="less">less</a></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>ファイル拡張子</td>
|
||||
|
@ -650,7 +650,7 @@ get('/') { markdown :index }
|
|||
<table>
|
||||
<tr>
|
||||
<td>依存</td>
|
||||
<td><a href="http://www.liquidmarkup.org/" title="liquid">liquid</a></td>
|
||||
<td><a href="http://liquidmarkup.org/" title="liquid">liquid</a></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>ファイル拡張子</td>
|
||||
|
@ -671,7 +671,7 @@ LiquidテンプレートからRubyのメソッド(`yield`を除く)を呼び出
|
|||
<td>依存</td>
|
||||
<td>
|
||||
次の何れか:
|
||||
<a href="https://github.com/rtomayko/rdiscount" title="RDiscount">RDiscount</a>,
|
||||
<a href="https://github.com/davidfstr/rdiscount" title="RDiscount">RDiscount</a>,
|
||||
<a href="https://github.com/vmg/redcarpet" title="RedCarpet">RedCarpet</a>,
|
||||
<a href="http://deveiate.org/projects/BlueCloth" title="BlueCloth">BlueCloth</a>,
|
||||
<a href="http://kramdown.gettalong.org/" title="kramdown">kramdown</a>,
|
||||
|
@ -816,7 +816,7 @@ RadiusテンプレートからRubyのメソッドを直接呼び出すことが
|
|||
<table>
|
||||
<tr>
|
||||
<td>依存</td>
|
||||
<td><a href="http://markaby.github.com/" title="Markaby">Markaby</a></td>
|
||||
<td><a href="http://markaby.github.io/" title="Markaby">Markaby</a></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>ファイル拡張子</td>
|
||||
|
@ -952,7 +952,7 @@ erb :overview, :locals => { :text => mediawiki(:introduction) }
|
|||
<tr>
|
||||
<td>依存</td>
|
||||
<td>
|
||||
<a href="https://github.com/lucasmazza/ruby-stylus" title="Ruby Stylus">
|
||||
<a href="https://github.com/forgecrafted/ruby-stylus" title="Ruby Stylus">
|
||||
Stylus
|
||||
</a> および
|
||||
<a href="https://github.com/sstephenson/execjs/blob/master/README.md#readme" title="ExecJS">
|
||||
|
@ -1426,7 +1426,7 @@ get '/' do
|
|||
end
|
||||
```
|
||||
|
||||
これはストリーミングAPI、[Server Sent Events](http://dev.w3.org/html5/eventsource/)の実装を可能にし、[WebSockets](http://en.wikipedia.org/wiki/WebSocket)の土台に使うことができます。また、一部のコンテンツが遅いリソースに依存しているときに、スループットを上げるために使うこともできます。
|
||||
これはストリーミングAPI、[Server Sent Events](https://w3c.github.io/eventsource/)の実装を可能にし、[WebSockets](https://en.wikipedia.org/wiki/WebSocket)の土台に使うことができます。また、一部のコンテンツが遅いリソースに依存しているときに、スループットを上げるために使うこともできます。
|
||||
|
||||
ノート: ストリーミングの挙動、特に並行リクエスト(cuncurrent requests)の数は、アプリケーションを提供するのに使われるWebサーバに強く依存します。いくつかのサーバは、ストリーミングを全くサポートしません。サーバがストリーミングをサポートしない場合、ボディは`stream`に渡されたブロックの実行が終了した後、一度に全部送られることになります。ストリーミングは、Shotgunを使った場合は全く動作しません。
|
||||
|
||||
|
@ -1532,7 +1532,7 @@ end
|
|||
|
||||
```ruby
|
||||
redirect to('/bar'), 303
|
||||
redirect 'http://google.com', 'wrong place, buddy'
|
||||
redirect 'http://www.google.com/', 'wrong place, buddy'
|
||||
```
|
||||
|
||||
また、`redirect back`を使えば、簡単にユーザが来たページへ戻るリダイレクトを作れます。
|
||||
|
@ -1610,7 +1610,7 @@ get '/article/:id' do
|
|||
end
|
||||
```
|
||||
|
||||
また、[weak ETag](http://ja.wikipedia.org/wiki/HTTP_ETag#Strong_and_weak_validation)を使うこともできます。
|
||||
また、[weak ETag](https://ja.wikipedia.org/wiki/HTTP_ETag#Strong_and_weak_validation)を使うこともできます。
|
||||
|
||||
```ruby
|
||||
etag @article.sha1, :weak
|
||||
|
@ -1900,7 +1900,7 @@ end
|
|||
|
||||
### 攻撃防御に対する設定
|
||||
|
||||
Sinatraは、[Rack::Protection](https://github.com/rkh/rack-protection#readme)を使って、アプリケーションを多発する日和見的攻撃から守っています。この挙動は簡単に無効化できます(これはアプリケーションを大量の脆弱性攻撃に晒すことになります)。
|
||||
Sinatraは、[Rack::Protection](https://github.com/sinatra/rack-protection#readme)を使って、アプリケーションを多発する日和見的攻撃から守っています。この挙動は簡単に無効化できます(これはアプリケーションを大量の脆弱性攻撃に晒すことになります)。
|
||||
|
||||
```ruby
|
||||
disable :protection
|
||||
|
@ -2177,7 +2177,7 @@ get '/hello' do
|
|||
end
|
||||
```
|
||||
|
||||
`use`の文法は、[Rack::Builder](http://rubydoc.info/github/rack/rack/master/Rack/Builder)DSLで定義されているそれ(rackupファイルで最もよく使われる)と同じです。例えば `use`メソッドは複数の引数、そしてブロックも取ることができます。
|
||||
`use`の文法は、[Rack::Builder](http://www.rubydoc.info/github/rack/rack/master/Rack/Builder)DSLで定義されているそれ(rackupファイルで最もよく使われる)と同じです。例えば `use`メソッドは複数の引数、そしてブロックも取ることができます。
|
||||
|
||||
```ruby
|
||||
use Rack::Auth::Basic do |username, password|
|
||||
|
@ -2195,7 +2195,7 @@ Rackは、ロギング、デバッギング、URLルーティング、認証、
|
|||
|
||||
## テスト(Testing)
|
||||
|
||||
SinatraでのテストはRackベースのテストライブラリまたはフレームワークを使って書くことができます。[Rack::Test](http://rdoc.info/github/brynary/rack-test/master/frames)をお薦めします。
|
||||
SinatraでのテストはRackベースのテストライブラリまたはフレームワークを使って書くことができます。[Rack::Test](http://www.rubydoc.info/github/brynary/rack-test/master/frames)をお薦めします。
|
||||
|
||||
```ruby
|
||||
require 'my_sinatra_app'
|
||||
|
@ -2251,7 +2251,7 @@ end
|
|||
(そうしない場合、SinatraのDSLメソッドの全てがmainの名前空間にインポートされます)
|
||||
* ルーティング、エラーハンドラ、フィルタ、オプションを`Sinatra::Base`のサブクラスに書く
|
||||
|
||||
`Sinatra::Base`はまっさらです。ビルトインサーバを含む、ほとんどのオプションがデフォルトで無効になっています。利用可能なオプションとその挙動の詳細については[Configuring Settings](http://sinatra.github.com/configuration.html)(英語)をご覧下さい。
|
||||
`Sinatra::Base`はまっさらです。ビルトインサーバを含む、ほとんどのオプションがデフォルトで無効になっています。利用可能なオプションとその挙動の詳細については[Configuring Settings](http://www.sinatrarb.com/configuration.html)(英語)をご覧下さい。
|
||||
|
||||
もしもクラシックスタイルと同じような挙動のアプリケーションをトップレベルで定義させる必要があれば、`Sinatra::Application`をサブクラス化させてください。
|
||||
|
||||
|
@ -2676,7 +2676,7 @@ gem install sinatra --pre
|
|||
|
||||
### Bundlerを使う場合
|
||||
|
||||
最新のSinatraでアプリケーションを動作させたい場合には、[Bundler](http://gembundler.com/)を使うのがお薦めのやり方です。
|
||||
最新のSinatraでアプリケーションを動作させたい場合には、[Bundler](http://bundler.io)を使うのがお薦めのやり方です。
|
||||
|
||||
まず、Bundlerがなければそれをインストールします。
|
||||
|
||||
|
@ -2743,14 +2743,14 @@ Sinatraは、[Semantic Versioning](http://semver.org/)におけるSemVerおよ
|
|||
|
||||
## 参考文献
|
||||
|
||||
* [プロジェクトサイト](http://sinatra.github.com/) - ドキュメント、ニュース、他のリソースへのリンクがあります。
|
||||
* [プロジェクトに参加(貢献)する](http://sinatra.github.com/contributing.html) - バグレポート パッチの送信、サポートなど
|
||||
* [Issue tracker](http://github.com/sinatra/sinatra/issues)
|
||||
* [Twitter](http://twitter.com/sinatra)
|
||||
* [プロジェクトサイト](http://www.sinatrarb.com/) - ドキュメント、ニュース、他のリソースへのリンクがあります。
|
||||
* [プロジェクトに参加(貢献)する](http://www.sinatrarb.com/contributing.html) - バグレポート パッチの送信、サポートなど
|
||||
* [Issue tracker](https://github.com/sinatra/sinatra/issues)
|
||||
* [Twitter](https://twitter.com/sinatra)
|
||||
* [メーリングリスト](http://groups.google.com/group/sinatrarb/topics)
|
||||
* http://freenode.net上のIRC: [#sinatra](irc://chat.freenode.net/#sinatra)
|
||||
* [Sinatra Book](https://github.com/sinatra/sinatra-book/) クックブック、チュートリアル
|
||||
* [Sinatra Recipes](http://recipes.sinatrarb.com/) コミュニティによるレシピ集
|
||||
* http://rubydoc.info上のAPIドキュメント: [最新版(latest release)用](http://rubydoc.info/gems/sinatra)または[現在のHEAD用](http://rubydoc.info/github/sinatra/sinatra)
|
||||
* [CIサーバ](http://travis-ci.org/sinatra/sinatra)
|
||||
* http://www.rubydoc.info/上のAPIドキュメント: [最新版(latest release)用](http://www.rubydoc.info/gems/sinatra)または[現在のHEAD用](http://www.rubydoc.info/github/sinatra/sinatra)
|
||||
* [CIサーバ](https://travis-ci.org/sinatra/sinatra)
|
||||
* [Greenbear Laboratory Rack日本語マニュアル](http://route477.net/w/RackReferenceJa.html)
|
||||
|
|
42
README.ko.md
42
README.ko.md
|
@ -3,7 +3,7 @@
|
|||
*주의: 이 문서는 영문판의 번역본이며 최신판 문서와 다를 수 있습니다.*
|
||||
|
||||
Sinatra는 최소한의 노력으로 루비 기반 웹 애플리케이션을 신속하게 만들 수 있게
|
||||
해 주는 [DSL](http://en.wikipedia.org/wiki/Domain-specific_language)입니다.
|
||||
해 주는 [DSL](https://en.wikipedia.org/wiki/Domain-specific_language)입니다.
|
||||
|
||||
```ruby
|
||||
# myapp.rb
|
||||
|
@ -583,7 +583,7 @@ get('/') { markdown :index }
|
|||
<table>
|
||||
<tr>
|
||||
<td>의존성</td>
|
||||
<td><a href="http://nokogiri.org/">nokogiri</a></td>
|
||||
<td><a href="http://www.nokogiri.org/">nokogiri</a></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>파일 확장자</td>
|
||||
|
@ -636,7 +636,7 @@ get('/') { markdown :index }
|
|||
<table>
|
||||
<tr>
|
||||
<td>의존성</td>
|
||||
<td><a href="http://www.lesscss.org/">less</a></td>
|
||||
<td><a href="http://lesscss.org/">less</a></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>파일 확장자</td>
|
||||
|
@ -653,7 +653,7 @@ get('/') { markdown :index }
|
|||
<table>
|
||||
<tr>
|
||||
<td>의존성</td>
|
||||
<td><a href="http://www.liquidmarkup.org/">liquid</a></td>
|
||||
<td><a href="http://liquidmarkup.org/">liquid</a></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>파일 확장자</td>
|
||||
|
@ -674,7 +674,7 @@ Liquid 템플릿에서는 루비 메서드(`yield` 제외)를 호출할 수 없
|
|||
<tr>
|
||||
<td>의존성</td>
|
||||
<td>
|
||||
<a href="https://github.com/rtomayko/rdiscount" title="RDiscount">RDiscount</a>,
|
||||
<a href="https://github.com/davidfstr/rdiscount" title="RDiscount">RDiscount</a>,
|
||||
<a href="https://github.com/vmg/redcarpet" title="RedCarpet">RedCarpet</a>,
|
||||
<a href="http://deveiate.org/projects/BlueCloth" title="BlueCloth">BlueCloth</a>,
|
||||
<a href="http://kramdown.gettalong.org/" title="kramdown">kramdown</a>,
|
||||
|
@ -825,7 +825,7 @@ Radius 템플릿에서는 루비 메서드를 호출할 수 없기
|
|||
<table>
|
||||
<tr>
|
||||
<td>의존성</td>
|
||||
<td><a href="http://markaby.github.com/">markaby</a></td>
|
||||
<td><a href="http://markaby.github.io/">markaby</a></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>파일확장</td>
|
||||
|
@ -973,7 +973,7 @@ MediaWiki에서 루비를 호출할 수 없기 때문에, MediaWiki으로 작성
|
|||
<tr>
|
||||
<td>의존성</td>
|
||||
<td>
|
||||
<a href="https://github.com/lucasmazza/ruby-stylus" title="Ruby Stylus">
|
||||
<a href="https://github.com/forgecrafted/ruby-stylus" title="Ruby Stylus">
|
||||
Stylus
|
||||
</a> 와
|
||||
<a href="https://github.com/sstephenson/execjs/blob/master/README.md#readme" title="ExecJS">
|
||||
|
@ -1506,8 +1506,8 @@ end
|
|||
```
|
||||
|
||||
이렇게 스트리밍 API나 [서버 발송 이벤트Server Sent
|
||||
Events](http://dev.w3.org/html5/eventsource/)를 구현할 수 있고, 이 방법은
|
||||
[WebSockets](http://en.wikipedia.org/wiki/WebSocket)을 위한 기반으로 사용됩니다.
|
||||
Events](https://w3c.github.io/eventsource/)를 구현할 수 있고, 이 방법은
|
||||
[WebSockets](https://en.wikipedia.org/wiki/WebSocket)을 위한 기반으로 사용됩니다.
|
||||
이 방법은 일부 콘텐츠가 느린 자원에 의존하는 경우에 스로풋(throughtput)을
|
||||
높이기 위해 사용되기도 합니다.
|
||||
|
||||
|
@ -1631,7 +1631,7 @@ end
|
|||
|
||||
```ruby
|
||||
redirect to('/bar'), 303
|
||||
redirect 'http://google.com', 'wrong place, buddy'
|
||||
redirect 'http://www.google.com/', 'wrong place, buddy'
|
||||
```
|
||||
|
||||
`redirect back`을 사용하면 쉽게 사용자가 왔던 페이지로 다시 돌아가게
|
||||
|
@ -1713,7 +1713,7 @@ get "/article/:id" do
|
|||
end
|
||||
```
|
||||
|
||||
[약한 ETag](http://en.wikipedia.org/wiki/HTTP_ETag#Strong_and_weak_validation)를
|
||||
[약한 ETag](https://en.wikipedia.org/wiki/HTTP_ETag#Strong_and_weak_validation)를
|
||||
사용할 수 도 있습니다.
|
||||
|
||||
```ruby
|
||||
|
@ -2023,7 +2023,7 @@ end
|
|||
|
||||
### 공격 방어 설정하기(Configuring attack protection)
|
||||
|
||||
Sinatra는 [Rack::Protection](https://github.com/rkh/rack-protection#readme)을 사용하여
|
||||
Sinatra는 [Rack::Protection](https://github.com/sinatra/rack-protection#readme)을 사용하여
|
||||
일반적이고 일어날 수 있는 공격에 대비합니다. 이 모듈은 간단하게 비활성시킬 수 있습니다.
|
||||
(하지만 애플리케이션에 엄청나게 많은 취약성을 야기합니다.)
|
||||
|
||||
|
@ -2353,7 +2353,7 @@ get '/hello' do
|
|||
end
|
||||
```
|
||||
|
||||
`use`문법은 [Rack::Builder](http://rubydoc.info/github/rack/rack/master/Rack/Builder) DSL
|
||||
`use`문법은 [Rack::Builder](http://www.rubydoc.info/github/rack/rack/master/Rack/Builder) DSL
|
||||
(rackup 파일에서 가장 많이 사용)에서 정의한 것과 동일합니다. 예를 들어, `use` 메서드는
|
||||
블록이나 여러 개의/가변적인 인자도 받을 수 있습니다.
|
||||
|
||||
|
@ -2376,7 +2376,7 @@ Rack은 로깅, 디버깅, URL 라우팅, 인증, 그리고 세센 핸들링을
|
|||
## 테스팅(Testing)
|
||||
|
||||
Sinatra 테스트는 많은 Rack 기반 테스팅 라이브러리, 프레임워크를 사용하여 작성가능합니다.
|
||||
그 중 [Rack::Test](http://rdoc.info/github/brynary/rack-test/master/frames)를 권장합니다.
|
||||
그 중 [Rack::Test](http://www.rubydoc.info/github/brynary/rack-test/master/frames)를 권장합니다.
|
||||
|
||||
```ruby
|
||||
require 'my_sinatra_app'
|
||||
|
@ -2444,7 +2444,7 @@ end
|
|||
|
||||
`Sinatra::Base`는 백지상태(blank slate)입니다. 빌트인 서버를 비롯한 대부분의 옵션들이
|
||||
기본값으로 꺼져 있습니다. 가능한 옵션들과 그 작동에 대한 상세는 [옵션과
|
||||
설정](http://sinatra.github.com/configuration.html)을 참조하세요.
|
||||
설정](http://www.sinatrarb.com/configuration.html)을 참조하세요.
|
||||
|
||||
### 모듈(Modular) vs. 전통적 방식(Classic Style)
|
||||
|
||||
|
@ -2878,7 +2878,7 @@ gem install sinatra --pre
|
|||
### Bundler를 사용하여
|
||||
|
||||
여러분 애플리케이션을 최신 Sinatra로 실행하고자 한다면,
|
||||
[Bundler](http://gembundler.com/)를 사용할 것을 권장합니다.
|
||||
[Bundler](http://bundler.io)를 사용할 것을 권장합니다.
|
||||
|
||||
우선, 아직 설치하지 않았다면 bundler를 설치합니다.
|
||||
|
||||
|
@ -2954,14 +2954,14 @@ SemVerTag를 준수합니다.
|
|||
그리고 다른 리소스들에 대한 링크.
|
||||
* [기여하기](http://www.sinatrarb.com/contributing) - 버그를 찾았나요?
|
||||
도움이 필요한가요? 패치를 하셨나요?
|
||||
* [이슈 트래커](http://github.com/sinatra/sinatra/issues)
|
||||
* [트위터](http://twitter.com/sinatra)
|
||||
* [이슈 트래커](https://github.com/sinatra/sinatra/issues)
|
||||
* [트위터](https://twitter.com/sinatra)
|
||||
* [메일링 리스트](http://groups.google.com/group/sinatrarb/topics)
|
||||
* IRC: [#sinatra](irc://chat.freenode.net/#sinatra) http://freenode.net
|
||||
* 슬랙의 [Sinatra & Friends](https://sinatrarb.slack.com)입니다.
|
||||
[여기](https://sinatra-slack.herokuapp.com/)에서 가입가능합니다.
|
||||
* [Sinatra Book](https://github.com/sinatra/sinatra-book/) Cookbook 튜토리얼
|
||||
* [Sinatra Recipes](http://recipes.sinatrarb.com/) 커뮤니티가 만드는 레시피
|
||||
* http://rubydoc.info에 있는 [최종 릴리스](http://rubydoc.info/gems/sinatra)
|
||||
또는 [current HEAD](http://rubydoc.info/github/sinatra/sinatra)에 대한 API 문서
|
||||
* [CI server](http://travis-ci.org/sinatra/sinatra)
|
||||
* http://www.rubydoc.info/에 있는 [최종 릴리스](http://www.rubydoc.info/gems/sinatra)
|
||||
또는 [current HEAD](http://www.rubydoc.info/github/sinatra/sinatra)에 대한 API 문서
|
||||
* [CI server](https://travis-ci.org/sinatra/sinatra)
|
||||
|
|
|
@ -9,7 +9,7 @@ Alguns dos trechos de código a seguir utilizam caracteres UTF-8. Então, caso e
|
|||
# encoding: utf-8
|
||||
```
|
||||
|
||||
Sinatra é uma [DSL](http://pt.wikipedia.org/wiki/Linguagem_de_domínio_específico) para
|
||||
Sinatra é uma [DSL](https://pt.wikipedia.org/wiki/Linguagem_de_domínio_específico) para
|
||||
criar aplicações web em Ruby com o mínimo de esforço e rapidez:
|
||||
|
||||
```ruby
|
||||
|
@ -585,7 +585,7 @@ It also takes a block for inline templates (see exemplo).
|
|||
<table>
|
||||
<tr>
|
||||
<td>Dependencia</td>
|
||||
<td><a href="http://nokogiri.org/" title="nokogiri">nokogiri</a></td>
|
||||
<td><a href="http://www.nokogiri.org/" title="nokogiri">nokogiri</a></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Extencao do Arquivo</td>
|
||||
|
@ -638,7 +638,7 @@ It also takes a block for inline templates (see exemplo).
|
|||
<table>
|
||||
<tr>
|
||||
<td>Dependencia</td>
|
||||
<td><a href="http://www.lesscss.org/" title="less">less</a></td>
|
||||
<td><a href="http://lesscss.org/" title="less">less</a></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Extencao do Arquivo</td>
|
||||
|
@ -655,7 +655,7 @@ It also takes a block for inline templates (see exemplo).
|
|||
<table>
|
||||
<tr>
|
||||
<td>Dependencia</td>
|
||||
<td><a href="http://www.liquidmarkup.org/" title="liquid">liquid</a></td>
|
||||
<td><a href="http://liquidmarkup.org/" title="liquid">liquid</a></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Extencao do Arquivo</td>
|
||||
|
@ -677,7 +677,7 @@ você quase sempre precisará passar o `locals` para ele.
|
|||
<td>Dependencia</td>
|
||||
<td>
|
||||
Anyone of:
|
||||
<a href="https://github.com/rtomayko/rdiscount" title="RDiscount">RDiscount</a>,
|
||||
<a href="https://github.com/davidfstr/rdiscount" title="RDiscount">RDiscount</a>,
|
||||
<a href="https://github.com/vmg/redcarpet" title="RedCarpet">RedCarpet</a>,
|
||||
<a href="http://deveiate.org/projects/BlueCloth" title="BlueCloth">BlueCloth</a>,
|
||||
<a href="http://kramdown.gettalong.org/" title="kramdown">kramdown</a>,
|
||||
|
@ -825,7 +825,7 @@ você quase sempre precisará passar o `locals` para ele.
|
|||
<table>
|
||||
<tr>
|
||||
<td>Dependencia</td>
|
||||
<td><a href="http://markaby.github.com/" title="Markaby">Markaby</a></td>
|
||||
<td><a href="http://markaby.github.io/" title="Markaby">Markaby</a></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Extencao do Arquivo</td>
|
||||
|
@ -975,7 +975,7 @@ deve-se passar a `:layout_engine` como opção.
|
|||
<tr>
|
||||
<td>Dependencia</td>
|
||||
<td>
|
||||
<a href="https://github.com/lucasmazza/ruby-stylus" title="Ruby Stylus">
|
||||
<a href="https://github.com/forgecrafted/ruby-stylus" title="Ruby Stylus">
|
||||
Stylus
|
||||
</a> and a
|
||||
<a href="https://github.com/sstephenson/execjs/blob/master/README.md#readme" title="ExecJS">
|
||||
|
@ -1548,7 +1548,7 @@ end
|
|||
```
|
||||
|
||||
A semântica de `use` é idêntica aquela definida para a DSL
|
||||
[Rack::Builder](http://rubydoc.info/github/rack/rack/master/Rack/Builder)
|
||||
[Rack::Builder](http://www.rubydoc.info/github/rack/rack/master/Rack/Builder)
|
||||
(mais frequentemente utilizada para arquivos rackup). Por exemplo, o
|
||||
método `use` aceita múltiplos argumentos/variáveis bem como blocos:
|
||||
|
||||
|
@ -1647,7 +1647,7 @@ modificações:
|
|||
|
||||
`Sinatra::Base` é um quadro branco. Muitas opções são desabilitadas por
|
||||
padrão, incluindo o servidor embutido. Veja [Opções e
|
||||
Configurações](http://sinatra.github.com/configuration.html) para
|
||||
Configurações](http://www.sinatrarb.com/configuration.html) para
|
||||
detalhes de opções disponíveis e seus comportamentos.
|
||||
|
||||
SIDEBAR: A DSL de alto nível do Sinatra é implementada utilizando um simples
|
||||
|
@ -1750,11 +1750,11 @@ git pull
|
|||
adicional, novidades e links para outros recursos.
|
||||
* [Contribuir](http://www.sinatrarb.com/contributing) - Encontrar um
|
||||
bug? Precisa de ajuda? Tem um patch?
|
||||
* [Acompanhar Questões](http://github.com/sinatra/sinatra/issues)
|
||||
* [Twitter](http://twitter.com/sinatra)
|
||||
* [Acompanhar Questões](https://github.com/sinatra/sinatra/issues)
|
||||
* [Twitter](https://twitter.com/sinatra)
|
||||
* [Lista de Email](http://groups.google.com/group/sinatrarb/topics)
|
||||
* [Sinatra Book](https://github.com/sinatra/sinatra-book/) Livro de Receitas
|
||||
* Documentação da API para a [última release](http://rubydoc.info/gems/sinatra)
|
||||
* Documentação da API para a [última release](http://www.rubydoc.info/gems/sinatra)
|
||||
* [IRC: \#sinatra](irc://chat.freenode.net/#sinatra) em
|
||||
[freenode.net](http://freenode.net)
|
||||
* [Servidor de CI](http://travis-ci.org/sinatra/sinatra)
|
||||
* [Servidor de CI](https://travis-ci.org/sinatra/sinatra)
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
pode estar desatualizado.*
|
||||
|
||||
Sinatra é uma
|
||||
[DSL](http://pt.wikipedia.org/wiki/Linguagem_de_domínio_específico) para
|
||||
[DSL](https://pt.wikipedia.org/wiki/Linguagem_de_domínio_específico) para
|
||||
criar rapidamente aplicações web em Ruby com o mínimo de esforço:
|
||||
|
||||
```ruby
|
||||
|
@ -158,7 +158,7 @@ end
|
|||
Renderiza `./views/index.haml`.
|
||||
|
||||
[Opções
|
||||
Haml](http://haml.info/docs/yardoc/file.HAML_REFERENCE.html#options)
|
||||
Haml](http://haml.info/docs/yardoc/file.REFERENCE.html#options)
|
||||
podem ser definidas globalmente através das configurações do sinatra,
|
||||
veja [Opções e
|
||||
Configurações](http://www.sinatrarb.com/configuration.html), e substitua
|
||||
|
@ -233,7 +233,7 @@ end
|
|||
Renderiza `./views/stylesheet.sass`.
|
||||
|
||||
[Opções
|
||||
Sass](http://sass-lang.com/docs/yardoc/file.SASS_REFERENCE.html#options)
|
||||
Sass](http://sass-lang.com/documentation/file.SASS_REFERENCE.html#options)
|
||||
podem ser definidas globalmente através das configurações do sinatra,
|
||||
veja [Opções e
|
||||
Configurações](http://www.sinatrarb.com/configuration.html), e substitua
|
||||
|
@ -609,7 +609,7 @@ end
|
|||
```
|
||||
|
||||
A semântica de `use` é idêntica aquela definida para a DSL
|
||||
[Rack::Builder](http://rubydoc.info/github/rack/rack/master/Rack/Builder)
|
||||
[Rack::Builder](http://www.rubydoc.info/github/rack/rack/master/Rack/Builder)
|
||||
(mais frequentemente utilizada para arquivos rackup). Por exemplo, o
|
||||
método `use` aceita múltiplos argumentos/variáveis, bem como blocos:
|
||||
|
||||
|
@ -709,7 +709,7 @@ modificações:
|
|||
|
||||
`Sinatra::Base` é um quadro branco. Muitas opções são desactivadas por
|
||||
padrão, incluindo o servidor embutido. Veja [Opções e
|
||||
Configurações](http://sinatra.github.com/configuration.html) para
|
||||
Configurações](http://www.sinatrarb.com/configuration.html) para
|
||||
detalhes de opções disponíveis e seus comportamentos.
|
||||
|
||||
SIDEBAR: A DSL de alto nível do Sinatra é implementada utilizando um simples
|
||||
|
@ -781,9 +781,9 @@ git pull
|
|||
- [Contribuir](http://www.sinatrarb.com/contributing) - Encontrou um
|
||||
bug? Precisa de ajuda? Tem um patch?
|
||||
|
||||
- [Acompanhar Questões](http://github.com/sinatra/sinatra/issues)
|
||||
- [Acompanhar Questões](https://github.com/sinatra/sinatra/issues)
|
||||
|
||||
- [Twitter](http://twitter.com/sinatra)
|
||||
- [Twitter](https://twitter.com/sinatra)
|
||||
|
||||
- [Lista de Email](http://groups.google.com/group/sinatrarb/topics)
|
||||
|
||||
|
|
42
README.ru.md
42
README.ru.md
|
@ -91,7 +91,7 @@
|
|||
устаревшим*
|
||||
|
||||
Sinatra — это предметно-ориентированный каркас
|
||||
([DSL](http://ru.wikipedia.org/wiki/Предметно-ориентированный_язык_программирования))
|
||||
([DSL](https://ru.wikipedia.org/wiki/Предметно-ориентированный_язык))
|
||||
для быстрого создания функциональных веб-приложений на Ruby с минимумом усилий:
|
||||
|
||||
```ruby
|
||||
|
@ -595,7 +595,7 @@ get('/') { markdown :index }
|
|||
<table>
|
||||
<tr>
|
||||
<td>Зависимости</td>
|
||||
<td><a href="http://nokogiri.org/" title="nokogiri">nokogiri</a></td>
|
||||
<td><a href="http://www.nokogiri.org/" title="nokogiri">nokogiri</a></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Расширения файлов</td>
|
||||
|
@ -648,7 +648,7 @@ get('/') { markdown :index }
|
|||
<table>
|
||||
<tr>
|
||||
<td>Зависимости</td>
|
||||
<td><a href="http://www.lesscss.org/" title="less">less</a></td>
|
||||
<td><a href="http://lesscss.org/" title="less">less</a></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Расширения файлов</td>
|
||||
|
@ -665,7 +665,7 @@ get('/') { markdown :index }
|
|||
<table>
|
||||
<tr>
|
||||
<td>Зависимости</td>
|
||||
<td><a href="http://www.liquidmarkup.org/" title="liquid">liquid</a></td>
|
||||
<td><a href="http://liquidmarkup.org/" title="liquid">liquid</a></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Расширения файлов</td>
|
||||
|
@ -687,7 +687,7 @@ get('/') { markdown :index }
|
|||
<td>Зависимости</td>
|
||||
<td>
|
||||
Любая из библиотек:
|
||||
<a href="https://github.com/rtomayko/rdiscount" title="RDiscount">RDiscount</a>,
|
||||
<a href="https://github.com/davidfstr/rdiscount" title="RDiscount">RDiscount</a>,
|
||||
<a href="https://github.com/vmg/redcarpet" title="RedCarpet">RedCarpet</a>,
|
||||
<a href="http://deveiate.org/projects/BlueCloth" title="BlueCloth">BlueCloth</a>,
|
||||
<a href="http://kramdown.gettalong.org/" title="kramdown">kramdown</a>,
|
||||
|
@ -843,7 +843,7 @@ erb :overview, :locals => { :text => rdoc(:introduction) }
|
|||
<table>
|
||||
<tr>
|
||||
<td>Зависимости</td>
|
||||
<td><a href="http://markaby.github.com/" title="Markaby">Markaby</a></td>
|
||||
<td><a href="http://markaby.github.io/" title="Markaby">Markaby</a></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Расширения файлов</td>
|
||||
|
@ -995,7 +995,7 @@ erb :overview, :locals => { :text => mediawiki(:introduction) }
|
|||
<tr>
|
||||
<td>Зависимости</td>
|
||||
<td>
|
||||
<a href="https://github.com/lucasmazza/ruby-stylus" title="Ruby Stylus">
|
||||
<a href="https://github.com/forgecrafted/ruby-stylus" title="Ruby Stylus">
|
||||
Stylus
|
||||
</a> и
|
||||
<a href="https://github.com/sstephenson/execjs/blob/master/README.md#readme" title="ExecJS">
|
||||
|
@ -1526,8 +1526,8 @@ end
|
|||
```
|
||||
|
||||
Что позволяет вам реализовать стриминговые API,
|
||||
[Server Sent Events](http://dev.w3.org/html5/eventsource/),
|
||||
и может служить основой для [WebSockets](http://en.wikipedia.org/wiki/WebSocket).
|
||||
[Server Sent Events](https://w3c.github.io/eventsource/),
|
||||
и может служить основой для [WebSockets](https://en.wikipedia.org/wiki/WebSocket).
|
||||
Также такой подход можно использовать для увеличения производительности в случае,
|
||||
когда какая-то часть контента зависит от медленного ресурса.
|
||||
|
||||
|
@ -1654,7 +1654,7 @@ end
|
|||
|
||||
```ruby
|
||||
redirect to('/bar'), 303
|
||||
redirect 'http://google.com', 'wrong place, buddy'
|
||||
redirect 'http://www.google.com/', 'wrong place, buddy'
|
||||
```
|
||||
|
||||
Вы также можете перенаправить пользователя обратно, на страницу, с которой он
|
||||
|
@ -1738,7 +1738,7 @@ end
|
|||
```
|
||||
|
||||
Также вы можете использовать
|
||||
[weak ETag](http://en.wikipedia.org/wiki/HTTP_ETag#Strong_and_weak_validation):
|
||||
[weak ETag](https://en.wikipedia.org/wiki/HTTP_ETag#Strong_and_weak_validation):
|
||||
|
||||
```ruby
|
||||
etag @article.sha1, :weak
|
||||
|
@ -2055,7 +2055,7 @@ end
|
|||
### Настройка защиты от атак
|
||||
|
||||
Sinatra использует
|
||||
[Rack::Protection](https://github.com/rkh/rack-protection#readme) для защиты
|
||||
[Rack::Protection](https://github.com/sinatra/rack-protection#readme) для защиты
|
||||
приложения от простых атак. Вы можете легко выключить эту защиту (что сделает
|
||||
ваше приложение чрезвычайно уязвимым):
|
||||
|
||||
|
@ -2362,7 +2362,7 @@ end
|
|||
```
|
||||
|
||||
Семантика `use` идентична той, что определена для
|
||||
[Rack::Builder](http://rubydoc.info/github/rack/rack/master/Rack/Builder) DSL
|
||||
[Rack::Builder](http://www.rubydoc.info/github/rack/rack/master/Rack/Builder) DSL
|
||||
(чаще всего используется в rackup файлах). Например, метод `use` принимает как
|
||||
множественные переменные, так и блоки:
|
||||
|
||||
|
@ -2387,7 +2387,7 @@ Rack распространяется с различными стандартн
|
|||
|
||||
Тесты для Sinatra приложений могут быть написаны с помощью библиотек,
|
||||
фреймворков, поддерживающих тестирование Rack.
|
||||
[Rack::Test](http://rdoc.info/github/brynary/rack-test/master/frames)
|
||||
[Rack::Test](http://www.rubydoc.info/github/brynary/rack-test/master/frames)
|
||||
рекомендован:
|
||||
|
||||
```ruby
|
||||
|
@ -2868,7 +2868,7 @@ gem install sinatra --pre
|
|||
### С помощью Bundler
|
||||
|
||||
Если вы хотите запускать свое приложение с последней версией Sinatra, то
|
||||
рекомендуем использовать [Bundler](http://gembundler.com/).
|
||||
рекомендуем использовать [Bundler](http://bundler.io).
|
||||
|
||||
Сначала установите Bundler, если у вас его еще нет:
|
||||
|
||||
|
@ -2944,15 +2944,15 @@ SemVerTag.
|
|||
документация, новости и ссылки на другие ресурсы.
|
||||
* [Участие в проекте](http://www.sinatrarb.com/contributing) — Обнаружили
|
||||
баг? Нужна помощь? Написали патч?
|
||||
* [Отслеживание проблем/ошибок](http://github.com/sinatra/sinatra/issues)
|
||||
* [Twitter](http://twitter.com/sinatra)
|
||||
* [Отслеживание проблем/ошибок](https://github.com/sinatra/sinatra/issues)
|
||||
* [Twitter](https://twitter.com/sinatra)
|
||||
* [Группы рассылки](http://groups.google.com/group/sinatrarb/topics)
|
||||
* IRC: [#sinatra](irc://chat.freenode.net/#sinatra) на http://freenode.net
|
||||
* [Sinatra и Друзья](https://sinatrarb.slack.com) на Slack, а так же
|
||||
[ссылка](https://sinatra-slack.herokuapp.com/) для инвайта.
|
||||
* [Sinatra Book](https://github.com/sinatra/sinatra-book/) учебник и сборник рецептов
|
||||
* [Sinatra Recipes](http://recipes.sinatrarb.com/) сборник рецептов
|
||||
* API документация к [последнему релизу](http://rubydoc.info/gems/sinatra)
|
||||
или [текущему HEAD](http://rubydoc.info/github/sinatra/sinatra) на
|
||||
http://rubydoc.info
|
||||
* [Сервер непрерывной интеграции](http://travis-ci.org/sinatra/sinatra)
|
||||
* API документация к [последнему релизу](http://www.rubydoc.info/gems/sinatra)
|
||||
или [текущему HEAD](http://www.rubydoc.info/github/sinatra/sinatra) на
|
||||
http://www.rubydoc.info/
|
||||
* [Сервер непрерывной интеграции](https://travis-ci.org/sinatra/sinatra)
|
||||
|
|
26
README.zh.md
26
README.zh.md
|
@ -3,7 +3,7 @@
|
|||
*注:本文档是英文版的翻译,内容更新有可能不及时。
|
||||
如有不一致的地方,请以英文版为准。*
|
||||
|
||||
Sinatra是一个基于Ruby语言的[DSL](http://en.wikipedia.org/wiki/Domain-specific_language)(
|
||||
Sinatra是一个基于Ruby语言的[DSL](https://en.wikipedia.org/wiki/Domain-specific_language)(
|
||||
领域专属语言),可以轻松、快速的创建web应用。
|
||||
|
||||
~~~~ruby
|
||||
|
@ -281,7 +281,7 @@ end
|
|||
|
||||
填充 `./views/index.haml`。
|
||||
|
||||
[Haml的选项](http://haml.info/docs/yardoc/file.HAML_REFERENCE.html#options)
|
||||
[Haml的选项](http://haml.info/docs/yardoc/file.REFERENCE.html#options)
|
||||
可以通过Sinatra的配置全局设定, 参见
|
||||
[选项和配置](http://www.sinatrarb.com/configuration.html),
|
||||
也可以个别的被覆盖。
|
||||
|
@ -381,7 +381,7 @@ end
|
|||
这里调用的是 `./views/stylesheet.sass`。
|
||||
|
||||
[Sass
|
||||
的选项](http://sass-lang.com/docs/yardoc/file.SASS_REFERENCE.html#options)
|
||||
的选项](http://sass-lang.com/documentation/file.SASS_REFERENCE.html#options)
|
||||
可以通过Sinatra选项全局设定, 参考
|
||||
[选项和配置(英文)](http://www.sinatrarb.com/configuration.html),
|
||||
也可以在个体的基础上覆盖。
|
||||
|
@ -726,7 +726,7 @@ end
|
|||
- `therubyracer` gem/library
|
||||
|
||||
请察看
|
||||
[github.com/josh/ruby-coffee-script](http://github.com/josh/ruby-coffee-script)
|
||||
[github.com/josh/ruby-coffee-script](https://github.com/josh/ruby-coffee-script)
|
||||
获取更新的选项。
|
||||
|
||||
现在你可以调用 CoffeeScript 模版了:
|
||||
|
@ -1118,7 +1118,7 @@ end
|
|||
|
||||
~~~~ruby
|
||||
redirect to('/bar'), 303
|
||||
redirect 'http://google.com', 'wrong place, buddy'
|
||||
redirect 'http://www.google.com/', 'wrong place, buddy'
|
||||
~~~~
|
||||
|
||||
用 `redirect back`可以把用户重定向到原始页面:
|
||||
|
@ -1200,7 +1200,7 @@ end
|
|||
~~~~
|
||||
|
||||
使用 [weak
|
||||
ETag](http://en.wikipedia.org/wiki/HTTP_ETag#Strong_and_weak_validation)
|
||||
ETag](https://en.wikipedia.org/wiki/HTTP_ETag#Strong_and_weak_validation)
|
||||
也是有可能的:
|
||||
|
||||
~~~~ruby
|
||||
|
@ -1680,7 +1680,7 @@ end
|
|||
~~~~
|
||||
|
||||
`use` 的语义和在
|
||||
[Rack::Builder](http://rubydoc.info/github/rack/rack/master/Rack/Builder)
|
||||
[Rack::Builder](http://www.rubydoc.info/github/rack/rack/master/Rack/Builder)
|
||||
DSL(在rack文件中最频繁使用)中定义的完全一样。例如,`use` 方法接受
|
||||
多个/可变 参数,包括代码块:
|
||||
|
||||
|
@ -1765,7 +1765,7 @@ Sinatra::Base子类可用的方法实际上就是通过顶层 DSL 可用的方
|
|||
|
||||
`+Sinatra::Base+` 是一张白纸。大部分的选项默认是禁用的,
|
||||
包含内置的服务器。参见
|
||||
[选项和配置](http://sinatra.github.com/configuration.html)
|
||||
[选项和配置](http://www.sinatrarb.com/configuration.html)
|
||||
查看可用选项的具体细节和他们的行为。
|
||||
|
||||
### 模块化 vs. 传统的方式
|
||||
|
@ -2089,7 +2089,7 @@ Sinatra应该会运行在任何支持上述Ruby实现的操作系统。
|
|||
### 通过Bundler
|
||||
|
||||
如果你想使用最新的Sinatra运行你的应用,通过
|
||||
[Bundler](http://gembundler.com/) 是推荐的方式。
|
||||
[Bundler](http://bundler.io) 是推荐的方式。
|
||||
|
||||
首先,安装bundler,如果你还没有安装:
|
||||
|
||||
|
@ -2148,9 +2148,9 @@ gem 'activerecord', '~> 3.0' # 也许你还需要 ActiveRecord 3.x
|
|||
- [贡献](http://www.sinatrarb.com/contributing) - 找到了一个bug?
|
||||
需要帮助?有了一个 patch?
|
||||
|
||||
- [问题追踪](http://github.com/sinatra/sinatra/issues)
|
||||
- [问题追踪](https://github.com/sinatra/sinatra/issues)
|
||||
|
||||
- [Twitter](http://twitter.com/sinatra)
|
||||
- [Twitter](https://twitter.com/sinatra)
|
||||
|
||||
- [邮件列表](http://groups.google.com/group/sinatrarb/topics)
|
||||
|
||||
|
@ -2161,6 +2161,6 @@ gem 'activerecord', '~> 3.0' # 也许你还需要 ActiveRecord 3.x
|
|||
|
||||
- [Sinatra使用技巧](http://recipes.sinatrarb.com/) 网友贡献的实用技巧
|
||||
|
||||
- [最新版本](http://rubydoc.info/gems/sinatra)API文档;[http://rubydoc.info](http://rubydoc.info)的[当前HEAD](http://rubydoc.info/github/sinatra/sinatra)
|
||||
- [最新版本](http://www.rubydoc.info//gems/sinatra)API文档;[http://rubydoc.info](http://rubydoc.info)的[当前HEAD](http://www.rubydoc.info/github/sinatra/sinatra)
|
||||
|
||||
- [CI服务器](http://travis-ci.org/sinatra/sinatra)
|
||||
- [CI服务器](https://travis-ci.org/sinatra/sinatra)
|
||||
|
|
Loading…
Reference in New Issue