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).*
|
Umständen nicht auf dem aktuellen Stand (aktuell Sinatra 1.4.5).*
|
||||||
|
|
||||||
Sinatra ist eine
|
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
|
schnelle Erstellen von Webanwendungen in Ruby mit minimalem Aufwand
|
||||||
ermöglicht:
|
ermöglicht:
|
||||||
|
|
||||||
|
@ -608,7 +608,7 @@ Nimmt ebenso einen Block für Inline-Templates entgegen (siehe Beispiel).
|
||||||
<table>
|
<table>
|
||||||
<tr>
|
<tr>
|
||||||
<td>Abhängigkeit</td>
|
<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>
|
||||||
<tr>
|
<tr>
|
||||||
<td>Dateierweiterung</td>
|
<td>Dateierweiterung</td>
|
||||||
|
@ -663,7 +663,7 @@ Nimmt ebenso einen Block für Inline-Templates entgegen (siehe Beispiel).
|
||||||
<table>
|
<table>
|
||||||
<tr>
|
<tr>
|
||||||
<td>Abhängigkeit</td>
|
<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>
|
||||||
<tr>
|
<tr>
|
||||||
<td>Dateierweiterung</td>
|
<td>Dateierweiterung</td>
|
||||||
|
@ -681,7 +681,7 @@ Nimmt ebenso einen Block für Inline-Templates entgegen (siehe Beispiel).
|
||||||
<table>
|
<table>
|
||||||
<tr>
|
<tr>
|
||||||
<td>Abhängigkeit</td>
|
<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>
|
||||||
<tr>
|
<tr>
|
||||||
<td>Dateierweiterung</td>
|
<td>Dateierweiterung</td>
|
||||||
|
@ -703,7 +703,7 @@ denen man Variablen weitergibt.
|
||||||
<tr>
|
<tr>
|
||||||
<td>Abhängigkeit</td>
|
<td>Abhängigkeit</td>
|
||||||
<td>Eine der folgenden Bibliotheken:
|
<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="https://github.com/vmg/redcarpet" title="RedCarpet">RedCarpet</a>,
|
||||||
<a href="http://deveiate.org/projects/BlueCloth" title="BlueCloth">BlueCloth</a>,
|
<a href="http://deveiate.org/projects/BlueCloth" title="BlueCloth">BlueCloth</a>,
|
||||||
<a href="http://kramdown.gettalong.org/" title="kramdown">kramdown</a> oder
|
<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>
|
<table>
|
||||||
<tr>
|
<tr>
|
||||||
<td>Abhängigkeit</td>
|
<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>
|
||||||
<tr>
|
<tr>
|
||||||
<td>Dateierweiterung</td>
|
<td>Dateierweiterung</td>
|
||||||
|
@ -1011,7 +1011,7 @@ Templates zu verwenden und einen anderen für das Layout, indem die
|
||||||
<tr>
|
<tr>
|
||||||
<td>Abhängigkeit</td>
|
<td>Abhängigkeit</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
|
Stylus
|
||||||
</a> und eine Möglichkeit
|
</a> und eine Möglichkeit
|
||||||
<a href="https://github.com/sstephenson/execjs/blob/master/README.md#readme" title="ExecJS">
|
<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.
|
Damit lassen sich Streaming-APIs realisieren, sog.
|
||||||
[Server Sent Events](http://dev.w3.org/html5/eventsource/), die als Basis für
|
[Server Sent Events](https://w3c.github.io/eventsource/), die als Basis für
|
||||||
[WebSockets](http://en.wikipedia.org/wiki/WebSocket) dienen. Ebenso können sie
|
[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
|
verwendet werden, um den Durchsatz zu erhöhen, wenn ein Teil der Daten von
|
||||||
langsamen Ressourcen abhängig ist.
|
langsamen Ressourcen abhängig ist.
|
||||||
|
|
||||||
|
@ -1672,7 +1672,7 @@ Weitere Parameter werden wie Argumente der `halt`-Methode behandelt:
|
||||||
|
|
||||||
```ruby
|
```ruby
|
||||||
redirect to('/bar'), 303
|
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`
|
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
|
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
|
```ruby
|
||||||
etag @article.sha1, :weak
|
etag @article.sha1, :weak
|
||||||
|
@ -2073,7 +2073,7 @@ end
|
||||||
#### Einstellung des Angriffsschutzes
|
#### Einstellung des Angriffsschutzes
|
||||||
|
|
||||||
Sinatra verwendet
|
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
|
Anwendung vor häufig vorkommenden Angriffen zu schützen. Diese Voreinstellung
|
||||||
lässt sich selbstverständlich deaktivieren, der damit verbundene
|
lässt sich selbstverständlich deaktivieren, der damit verbundene
|
||||||
Geschwindigkeitszuwachs steht aber in keinem Verhätnis zu den möglichen
|
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
|
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
|
(meist verwendet in Rackup-Dateien). Ein Beispiel dafür ist, dass die
|
||||||
`use`-Methode mehrere/verschiedene Argumente und auch Blöcke entgegennimmt:
|
`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
|
## Testen
|
||||||
|
|
||||||
Sinatra-Tests können mit jedem auf Rack aufbauendem Test-Framework geschrieben
|
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:
|
wird empfohlen:
|
||||||
|
|
||||||
```ruby
|
```ruby
|
||||||
|
@ -2464,7 +2464,7 @@ Veränderungen zu `Sinatra::Base` konvertiert werden:
|
||||||
|
|
||||||
`Sinatra::Base` ist ein unbeschriebenes Blatt. Die meisten Optionen sind per
|
`Sinatra::Base` ist ein unbeschriebenes Blatt. Die meisten Optionen sind per
|
||||||
Standard deaktiviert. Das betrifft auch den eingebauten Server. Siehe
|
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.
|
Details über mögliche Optionen.
|
||||||
|
|
||||||
Damit eine App sich ähnlich wie eine klassische App verhält, kann man
|
Damit eine App sich ähnlich wie eine klassische App verhält, kann man
|
||||||
|
@ -2926,7 +2926,7 @@ gem install sinatra --pre
|
||||||
### Mit Bundler
|
### Mit Bundler
|
||||||
|
|
||||||
Wenn die Applikation mit der neuesten Version von Sinatra und
|
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.
|
nachfolgenden Weg.
|
||||||
|
|
||||||
Soweit Bundler noch nicht installiert ist:
|
Soweit Bundler noch nicht installiert ist:
|
||||||
|
@ -3013,12 +3013,12 @@ SemVer und SemVerTag.
|
||||||
|
|
||||||
## Mehr
|
## 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.
|
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?
|
gefunden? Brauchst du Hilfe? Hast du einen Patch?
|
||||||
* [Issue-Tracker](http://github.com/sinatra/sinatra/issues)
|
* [Issue-Tracker](https://github.com/sinatra/sinatra/issues)
|
||||||
* [Twitter](http://twitter.com/sinatra)
|
* [Twitter](https://twitter.com/sinatra)
|
||||||
* [Mailing-Liste](http://groups.google.com/group/sinatrarb)
|
* [Mailing-Liste](http://groups.google.com/group/sinatrarb)
|
||||||
* [#sinatra](irc://chat.freenode.net/#sinatra) auf http://freenode.net Es
|
* [#sinatra](irc://chat.freenode.net/#sinatra) auf http://freenode.net Es
|
||||||
gibt dort auch immer wieder deutschsprachige Entwickler, die gerne weiterhelfen.
|
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
|
* [Sinatra Recipes](http://recipes.sinatrarb.com/) Sinatra-Rezepte aus der
|
||||||
Community
|
Community
|
||||||
* API Dokumentation für die [aktuelle
|
* API Dokumentation für die [aktuelle
|
||||||
Version](http://rubydoc.info/gems/sinatra) oder für
|
Version](http://www.rubydoc.info//gems/sinatra) oder für
|
||||||
[HEAD](http://rubydoc.info/github/sinatra/sinatra) auf http://rubydoc.info
|
[HEAD](http://www.rubydoc.info/github/sinatra/sinatra) auf http://rubydoc.info
|
||||||
* [CI Server](http://travis-ci.org/sinatra/sinatra)
|
* [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.*
|
*Atención: Este documento es una traducción de la versión en inglés y puede estar desactualizado.*
|
||||||
|
|
||||||
Sinatra es un
|
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:
|
crear aplicaciones web rápidamente en Ruby con un mínimo esfuerzo:
|
||||||
|
|
||||||
```ruby
|
```ruby
|
||||||
|
@ -503,7 +503,7 @@ Además, acepta un bloque con la definición de la plantilla (ver ejemplo).
|
||||||
<table>
|
<table>
|
||||||
<tr>
|
<tr>
|
||||||
<td>Dependencias</td>
|
<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>
|
||||||
<tr>
|
<tr>
|
||||||
<td>Extensiones de Archivo</td>
|
<td>Extensiones de Archivo</td>
|
||||||
|
@ -556,7 +556,7 @@ Además, acepta un bloque con la definición de la plantilla (ver ejemplo).
|
||||||
<table>
|
<table>
|
||||||
<tr>
|
<tr>
|
||||||
<td>Dependencias</td>
|
<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>
|
||||||
<tr>
|
<tr>
|
||||||
<td>Extensiones de Archivo</td>
|
<td>Extensiones de Archivo</td>
|
||||||
|
@ -573,7 +573,7 @@ Además, acepta un bloque con la definición de la plantilla (ver ejemplo).
|
||||||
<table>
|
<table>
|
||||||
<tr>
|
<tr>
|
||||||
<td>Dependencias</td>
|
<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>
|
||||||
<tr>
|
<tr>
|
||||||
<td>Extensiones de Archivo</td>
|
<td>Extensiones de Archivo</td>
|
||||||
|
@ -594,7 +594,7 @@ plantilla Liquid, casi siempre va a querer pasarle locales.
|
||||||
<tr>
|
<tr>
|
||||||
<td>Dependencias</td>
|
<td>Dependencias</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="https://github.com/vmg/redcarpet" title="RedCarpet">RedCarpet</a>,
|
||||||
<a href="http://deveiate.org/projects/BlueCloth" title="BlueCloth">BlueCloth</a>,
|
<a href="http://deveiate.org/projects/BlueCloth" title="BlueCloth">BlueCloth</a>,
|
||||||
<a href="http://kramdown.gettalong.org/" title="kramdown">kramdown</a> o
|
<a href="http://kramdown.gettalong.org/" title="kramdown">kramdown</a> o
|
||||||
|
@ -727,7 +727,7 @@ plantilla Radius, casi siempre se necesita pasar locales.
|
||||||
<table>
|
<table>
|
||||||
<tr>
|
<tr>
|
||||||
<td>Dependencias</td>
|
<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>
|
||||||
<tr>
|
<tr>
|
||||||
<td>Extensiones de Archivo</td>
|
<td>Extensiones de Archivo</td>
|
||||||
|
@ -841,7 +841,7 @@ distinto al de la plantilla pasando la opción `:layout_engine`.
|
||||||
<tr>
|
<tr>
|
||||||
<td>Dependencias</td>
|
<td>Dependencias</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
|
Stylus
|
||||||
</a> y un
|
</a> y un
|
||||||
<a href="https://github.com/sstephenson/execjs/blob/master/README.md#readme" title="ExecJS">
|
<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,
|
Podés implementar APIs de streaming,
|
||||||
[Server-Sent Events](http://dev.w3.org/html5/eventsource/) y puede ser usado
|
[Server-Sent Events](https://w3c.github.io/eventsource/) y puede ser usado
|
||||||
como base para [WebSockets](http://es.wikipedia.org/wiki/WebSockets). También
|
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
|
puede ser usado para incrementar el throughput si solo una parte del contenido
|
||||||
depende de un recurso lento.
|
depende de un recurso lento.
|
||||||
|
|
||||||
|
@ -1441,7 +1441,7 @@ pasados a `halt`:
|
||||||
|
|
||||||
```ruby
|
```ruby
|
||||||
redirect to('/bar'), 303
|
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
|
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
|
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
|
```ruby
|
||||||
etag @articulo.sha1, :weak
|
etag @articulo.sha1, :weak
|
||||||
|
@ -1841,7 +1841,7 @@ end
|
||||||
|
|
||||||
### Configurando la Protección de Ataques
|
### 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,
|
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
|
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
|
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
|
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`
|
frecuentemente usado en archivos rackup). Por ejemplo, el método `use`
|
||||||
acepta argumentos múltiples/variables así como bloques:
|
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
|
Las pruebas para las aplicaciones Sinatra pueden ser escritas utilizando
|
||||||
cualquier framework o librería de pruebas basada en Rack. Se recomienda usar
|
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
|
```ruby
|
||||||
require 'mi_app_sinatra'
|
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
|
`Sinatra::Base` es una pizarra en blanco. La mayoría de las opciones están
|
||||||
desactivadas por defecto, incluyendo el servidor incorporado. Mirá
|
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.
|
para detalles sobre las opciones disponibles y su comportamiento.
|
||||||
|
|
||||||
### Estilo Modular vs. Clásico
|
### Estilo Modular vs. Clásico
|
||||||
|
@ -2732,7 +2732,7 @@ Para obtener algunas de las últimas características.
|
||||||
### Con Bundler
|
### Con Bundler
|
||||||
|
|
||||||
Esta es la manera recomendada para ejecutar tu aplicación sobre la última
|
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:
|
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.
|
adicional, noticias, y enlaces a otros recursos.
|
||||||
* [Contribuyendo](http://www.sinatrarb.com/contributing) - ¿Encontraste un
|
* [Contribuyendo](http://www.sinatrarb.com/contributing) - ¿Encontraste un
|
||||||
error?. ¿Necesitás ayuda?. ¿Tenés un parche?.
|
error?. ¿Necesitás ayuda?. ¿Tenés un parche?.
|
||||||
* [Seguimiento de problemas](http://github.com/sinatra/sinatra/issues)
|
* [Seguimiento de problemas](https://github.com/sinatra/sinatra/issues)
|
||||||
* [Twitter](http://twitter.com/sinatra)
|
* [Twitter](https://twitter.com/sinatra)
|
||||||
* [Lista de Correo](http://groups.google.com/group/sinatrarb/topics)
|
* [Lista de Correo](http://groups.google.com/group/sinatrarb/topics)
|
||||||
* [IRC: #sinatra](irc://chat.freenode.net/#sinatra) en http://freenode.net
|
* [IRC: #sinatra](irc://chat.freenode.net/#sinatra) en http://freenode.net
|
||||||
* [Sinatra Book](https://github.com/sinatra/sinatra-book/) Tutorial (en inglés).
|
* [Sinatra Book](https://github.com/sinatra/sinatra-book/) Tutorial (en inglés).
|
||||||
* [Sinatra Recipes](http://recipes.sinatrarb.com/) Recetas contribuidas
|
* [Sinatra Recipes](http://recipes.sinatrarb.com/) Recetas contribuidas
|
||||||
por la comunidad (en inglés).
|
por la comunidad (en inglés).
|
||||||
* Documentación de la API para la
|
* Documentación de la API para la
|
||||||
[última versión liberada](http://rubydoc.info/gems/sinatra) o para la
|
[última versión liberada](http://www.rubydoc.info/gems/sinatra) o para la
|
||||||
[rama de desarrollo actual](http://rubydoc.info/github/sinatra/sinatra)
|
[rama de desarrollo actual](http://www.rubydoc.info/github/sinatra/sinatra)
|
||||||
en http://rubydoc.info/
|
en http://www.rubydoc.info/
|
||||||
* [Servidor de CI](http://travis-ci.org/sinatra/sinatra)
|
* [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
|
*Attention : Ce document correspond à la traduction de la version anglaise et
|
||||||
il n'est peut-être plus à jour.*
|
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 :
|
créer rapidement et facilement des applications web en Ruby :
|
||||||
|
|
||||||
```ruby
|
```ruby
|
||||||
|
@ -616,7 +616,7 @@ exemple).
|
||||||
<table>
|
<table>
|
||||||
<tr>
|
<tr>
|
||||||
<td>Dépendances</td>
|
<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>
|
||||||
<tr>
|
<tr>
|
||||||
<td>Extensions de fichier</td>
|
<td>Extensions de fichier</td>
|
||||||
|
@ -672,7 +672,7 @@ exemple).
|
||||||
<table>
|
<table>
|
||||||
<tr>
|
<tr>
|
||||||
<td>Dépendances</td>
|
<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>
|
||||||
<tr>
|
<tr>
|
||||||
<td>Extensions de fichier</td>
|
<td>Extensions de fichier</td>
|
||||||
|
@ -690,7 +690,7 @@ exemple).
|
||||||
<table>
|
<table>
|
||||||
<tr>
|
<tr>
|
||||||
<td>Dépendances</td>
|
<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>
|
||||||
<tr>
|
<tr>
|
||||||
<td>Extensions de fichier</td>
|
<td>Extensions de fichier</td>
|
||||||
|
@ -713,7 +713,7 @@ locales.
|
||||||
<td><p>Dépendances</p></td>
|
<td><p>Dépendances</p></td>
|
||||||
<td>
|
<td>
|
||||||
Au choix :
|
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="https://github.com/vmg/redcarpet" title="RedCarpet">RedCarpet</a>,
|
||||||
<a href="http://deveiate.org/projects/BlueCloth" title="BlueCloth">BlueCloth</a>,
|
<a href="http://deveiate.org/projects/BlueCloth" title="BlueCloth">BlueCloth</a>,
|
||||||
<a href="http://kramdown.gettalong.org/" title="kramdown">kramdown</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>
|
<table>
|
||||||
<tr>
|
<tr>
|
||||||
<td>Dépendances</td>
|
<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>
|
||||||
<tr>
|
<tr>
|
||||||
<td>Extensions de fichier</td>
|
<td>Extensions de fichier</td>
|
||||||
|
@ -966,7 +966,7 @@ en utilisant l'option `:layout_engine`.
|
||||||
<tr>
|
<tr>
|
||||||
<td>Dépendances</td>
|
<td>Dépendances</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
|
Stylus
|
||||||
</a>
|
</a>
|
||||||
et un
|
et un
|
||||||
|
@ -1503,8 +1503,8 @@ end
|
||||||
```
|
```
|
||||||
|
|
||||||
Cela permet d'implémenter des API de streaming ou de
|
Cela permet d'implémenter des API de streaming ou de
|
||||||
[Server Sent Events](http://dev.w3.org/html5/eventsource/) et peut servir de
|
[Server Sent Events](https://w3c.github.io/eventsource/) et peut servir de
|
||||||
base pour des [WebSockets](http://en.wikipedia.org/wiki/WebSocket). Vous
|
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
|
pouvez aussi l'employer pour augmenter le débit quand une partie du contenu
|
||||||
provient d'une ressource lente.
|
provient d'une ressource lente.
|
||||||
|
|
||||||
|
@ -1635,7 +1635,7 @@ Tout paramètre additionnel sera utilisé comme argument pour la méthode
|
||||||
|
|
||||||
```ruby
|
```ruby
|
||||||
redirect to('/bar'), 303
|
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
|
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
|
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
|
```ruby
|
||||||
etag @article.sha1, :weak
|
etag @article.sha1, :weak
|
||||||
|
@ -2047,7 +2047,7 @@ end
|
||||||
|
|
||||||
### Se protéger des attaques
|
### 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.
|
pour protéger votre application contre les principales attaques opportunistes.
|
||||||
Vous pouvez très simplement désactiver cette fonctionnalité (ce qui exposera
|
Vous pouvez très simplement désactiver cette fonctionnalité (ce qui exposera
|
||||||
votre application à beaucoup de vulnerabilités courantes) :
|
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
|
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
|
(le plus souvent utilisé dans un fichier `rackup`). Par exemple, la méthode
|
||||||
`use` accepte divers arguments ainsi que des blocs :
|
`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
|
`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 à
|
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
|
pour plus d'informations sur les options et leur fonctionnement. Si vous
|
||||||
souhaitez un comportement plus proche de celui obtenu lorsque vous définissez
|
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
|
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
|
### 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.
|
faire tourner votre application avec la dernière version de Sinatra.
|
||||||
|
|
||||||
Pour commencer, installez bundler si nécessaire :
|
Pour commencer, installez bundler si nécessaire :
|
||||||
|
@ -3000,14 +3000,14 @@ SemVer que SemVerTag.
|
||||||
de news, et des liens vers d'autres ressources.
|
de news, et des liens vers d'autres ressources.
|
||||||
* [Contribuer](http://www.sinatrarb.com/contributing) - Vous avez trouvé un
|
* [Contribuer](http://www.sinatrarb.com/contributing) - Vous avez trouvé un
|
||||||
bug ? Besoin d'aide ? Vous avez un patch ?
|
bug ? Besoin d'aide ? Vous avez un patch ?
|
||||||
* [Suivi des problèmes](http://github.com/sinatra/sinatra/issues)
|
* [Suivi des problèmes](https://github.com/sinatra/sinatra/issues)
|
||||||
* [Twitter](http://twitter.com/sinatra)
|
* [Twitter](https://twitter.com/sinatra)
|
||||||
* [Mailing List](http://groups.google.com/group/sinatrarb/topics)
|
* [Mailing List](http://groups.google.com/group/sinatrarb/topics)
|
||||||
* IRC : [#sinatra](irc://chat.freenode.net/#sinatra) sur http://freenode.net
|
* IRC : [#sinatra](irc://chat.freenode.net/#sinatra) sur http://freenode.net
|
||||||
* [Sinatra Book](https://github.com/sinatra/sinatra-book/) Tutoriels et recettes
|
* [Sinatra Book](https://github.com/sinatra/sinatra-book/) Tutoriels et recettes
|
||||||
* [Sinatra Recipes](http://recipes.sinatrarb.com/) trucs et astuces rédigés par
|
* [Sinatra Recipes](http://recipes.sinatrarb.com/) trucs et astuces rédigés par
|
||||||
la communauté
|
la communauté
|
||||||
* Documentation API de la [dernière version](http://rubydoc.info/gems/sinatra)
|
* Documentation API de la [dernière version](http://www.rubydoc.info/gems/sinatra)
|
||||||
ou du [HEAD courant](http://rubydoc.info/github/sinatra/sinatra) sur
|
ou du [HEAD courant](http://www.rubydoc.info/github/sinatra/sinatra) sur
|
||||||
http://rubydoc.info
|
http://www.rubydoc.info/
|
||||||
* [CI server](http://travis-ci.org/sinatra/sinatra)
|
* [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ű
|
*Fontos megjegyzés: Ez a dokumentum csak egy fordítása az angol nyelvű
|
||||||
változatnak, és lehet, hogy nem naprakész.*
|
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
|
webalkalmazások Ruby nyelven történő fejlesztéséhez, minimális
|
||||||
energiabefektetéssel:
|
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
|
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á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
|
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:
|
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ó
|
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
|
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
|
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.
|
foglalkozik.
|
||||||
|
|
||||||
Széljegyzet: A Sinatra felső szintű DSL-je egy egyszerű delegációs
|
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
|
## 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
|
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?
|
Segítségre van szükséged? Foltot küldenél be?
|
||||||
* [Lighthouse](http://sinatra.lighthouseapp.com) - Hibakövetés és kiadások
|
* [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)
|
* [Levelezőlista](http://groups.google.com/group/sinatrarb)
|
||||||
* [IRC: #sinatra](irc://chat.freenode.net/#sinatra) a http://freenode.net címen
|
* [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
|
```ruby
|
||||||
# myapp.rb
|
# myapp.rb
|
||||||
|
@ -578,7 +578,7 @@ get('/') { markdown :index }
|
||||||
<table>
|
<table>
|
||||||
<tr>
|
<tr>
|
||||||
<td>依存</td>
|
<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>
|
||||||
<tr>
|
<tr>
|
||||||
<td>ファイル拡張子</td>
|
<td>ファイル拡張子</td>
|
||||||
|
@ -633,7 +633,7 @@ get('/') { markdown :index }
|
||||||
<table>
|
<table>
|
||||||
<tr>
|
<tr>
|
||||||
<td>依存</td>
|
<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>
|
||||||
<tr>
|
<tr>
|
||||||
<td>ファイル拡張子</td>
|
<td>ファイル拡張子</td>
|
||||||
|
@ -650,7 +650,7 @@ get('/') { markdown :index }
|
||||||
<table>
|
<table>
|
||||||
<tr>
|
<tr>
|
||||||
<td>依存</td>
|
<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>
|
||||||
<tr>
|
<tr>
|
||||||
<td>ファイル拡張子</td>
|
<td>ファイル拡張子</td>
|
||||||
|
@ -671,7 +671,7 @@ LiquidテンプレートからRubyのメソッド(`yield`を除く)を呼び出
|
||||||
<td>依存</td>
|
<td>依存</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="https://github.com/vmg/redcarpet" title="RedCarpet">RedCarpet</a>,
|
||||||
<a href="http://deveiate.org/projects/BlueCloth" title="BlueCloth">BlueCloth</a>,
|
<a href="http://deveiate.org/projects/BlueCloth" title="BlueCloth">BlueCloth</a>,
|
||||||
<a href="http://kramdown.gettalong.org/" title="kramdown">kramdown</a>,
|
<a href="http://kramdown.gettalong.org/" title="kramdown">kramdown</a>,
|
||||||
|
@ -816,7 +816,7 @@ RadiusテンプレートからRubyのメソッドを直接呼び出すことが
|
||||||
<table>
|
<table>
|
||||||
<tr>
|
<tr>
|
||||||
<td>依存</td>
|
<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>
|
||||||
<tr>
|
<tr>
|
||||||
<td>ファイル拡張子</td>
|
<td>ファイル拡張子</td>
|
||||||
|
@ -952,7 +952,7 @@ erb :overview, :locals => { :text => mediawiki(:introduction) }
|
||||||
<tr>
|
<tr>
|
||||||
<td>依存</td>
|
<td>依存</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
|
Stylus
|
||||||
</a> および
|
</a> および
|
||||||
<a href="https://github.com/sstephenson/execjs/blob/master/README.md#readme" title="ExecJS">
|
<a href="https://github.com/sstephenson/execjs/blob/master/README.md#readme" title="ExecJS">
|
||||||
|
@ -1426,7 +1426,7 @@ get '/' do
|
||||||
end
|
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を使った場合は全く動作しません。
|
ノート: ストリーミングの挙動、特に並行リクエスト(cuncurrent requests)の数は、アプリケーションを提供するのに使われるWebサーバに強く依存します。いくつかのサーバは、ストリーミングを全くサポートしません。サーバがストリーミングをサポートしない場合、ボディは`stream`に渡されたブロックの実行が終了した後、一度に全部送られることになります。ストリーミングは、Shotgunを使った場合は全く動作しません。
|
||||||
|
|
||||||
|
@ -1532,7 +1532,7 @@ end
|
||||||
|
|
||||||
```ruby
|
```ruby
|
||||||
redirect to('/bar'), 303
|
redirect to('/bar'), 303
|
||||||
redirect 'http://google.com', 'wrong place, buddy'
|
redirect 'http://www.google.com/', 'wrong place, buddy'
|
||||||
```
|
```
|
||||||
|
|
||||||
また、`redirect back`を使えば、簡単にユーザが来たページへ戻るリダイレクトを作れます。
|
また、`redirect back`を使えば、簡単にユーザが来たページへ戻るリダイレクトを作れます。
|
||||||
|
@ -1610,7 +1610,7 @@ get '/article/:id' do
|
||||||
end
|
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
|
```ruby
|
||||||
etag @article.sha1, :weak
|
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
|
```ruby
|
||||||
disable :protection
|
disable :protection
|
||||||
|
@ -2177,7 +2177,7 @@ get '/hello' do
|
||||||
end
|
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
|
```ruby
|
||||||
use Rack::Auth::Basic do |username, password|
|
use Rack::Auth::Basic do |username, password|
|
||||||
|
@ -2195,7 +2195,7 @@ Rackは、ロギング、デバッギング、URLルーティング、認証、
|
||||||
|
|
||||||
## テスト(Testing)
|
## テスト(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
|
```ruby
|
||||||
require 'my_sinatra_app'
|
require 'my_sinatra_app'
|
||||||
|
@ -2251,7 +2251,7 @@ end
|
||||||
(そうしない場合、SinatraのDSLメソッドの全てがmainの名前空間にインポートされます)
|
(そうしない場合、SinatraのDSLメソッドの全てがmainの名前空間にインポートされます)
|
||||||
* ルーティング、エラーハンドラ、フィルタ、オプションを`Sinatra::Base`のサブクラスに書く
|
* ルーティング、エラーハンドラ、フィルタ、オプションを`Sinatra::Base`のサブクラスに書く
|
||||||
|
|
||||||
`Sinatra::Base`はまっさらです。ビルトインサーバを含む、ほとんどのオプションがデフォルトで無効になっています。利用可能なオプションとその挙動の詳細については[Configuring Settings](http://sinatra.github.com/configuration.html)(英語)をご覧下さい。
|
`Sinatra::Base`はまっさらです。ビルトインサーバを含む、ほとんどのオプションがデフォルトで無効になっています。利用可能なオプションとその挙動の詳細については[Configuring Settings](http://www.sinatrarb.com/configuration.html)(英語)をご覧下さい。
|
||||||
|
|
||||||
もしもクラシックスタイルと同じような挙動のアプリケーションをトップレベルで定義させる必要があれば、`Sinatra::Application`をサブクラス化させてください。
|
もしもクラシックスタイルと同じような挙動のアプリケーションをトップレベルで定義させる必要があれば、`Sinatra::Application`をサブクラス化させてください。
|
||||||
|
|
||||||
|
@ -2676,7 +2676,7 @@ gem install sinatra --pre
|
||||||
|
|
||||||
### Bundlerを使う場合
|
### Bundlerを使う場合
|
||||||
|
|
||||||
最新のSinatraでアプリケーションを動作させたい場合には、[Bundler](http://gembundler.com/)を使うのがお薦めのやり方です。
|
最新のSinatraでアプリケーションを動作させたい場合には、[Bundler](http://bundler.io)を使うのがお薦めのやり方です。
|
||||||
|
|
||||||
まず、Bundlerがなければそれをインストールします。
|
まず、Bundlerがなければそれをインストールします。
|
||||||
|
|
||||||
|
@ -2743,14 +2743,14 @@ Sinatraは、[Semantic Versioning](http://semver.org/)におけるSemVerおよ
|
||||||
|
|
||||||
## 参考文献
|
## 参考文献
|
||||||
|
|
||||||
* [プロジェクトサイト](http://sinatra.github.com/) - ドキュメント、ニュース、他のリソースへのリンクがあります。
|
* [プロジェクトサイト](http://www.sinatrarb.com/) - ドキュメント、ニュース、他のリソースへのリンクがあります。
|
||||||
* [プロジェクトに参加(貢献)する](http://sinatra.github.com/contributing.html) - バグレポート パッチの送信、サポートなど
|
* [プロジェクトに参加(貢献)する](http://www.sinatrarb.com/contributing.html) - バグレポート パッチの送信、サポートなど
|
||||||
* [Issue tracker](http://github.com/sinatra/sinatra/issues)
|
* [Issue tracker](https://github.com/sinatra/sinatra/issues)
|
||||||
* [Twitter](http://twitter.com/sinatra)
|
* [Twitter](https://twitter.com/sinatra)
|
||||||
* [メーリングリスト](http://groups.google.com/group/sinatrarb/topics)
|
* [メーリングリスト](http://groups.google.com/group/sinatrarb/topics)
|
||||||
* http://freenode.net上のIRC: [#sinatra](irc://chat.freenode.net/#sinatra)
|
* http://freenode.net上のIRC: [#sinatra](irc://chat.freenode.net/#sinatra)
|
||||||
* [Sinatra Book](https://github.com/sinatra/sinatra-book/) クックブック、チュートリアル
|
* [Sinatra Book](https://github.com/sinatra/sinatra-book/) クックブック、チュートリアル
|
||||||
* [Sinatra Recipes](http://recipes.sinatrarb.com/) コミュニティによるレシピ集
|
* [Sinatra Recipes](http://recipes.sinatrarb.com/) コミュニティによるレシピ集
|
||||||
* http://rubydoc.info上のAPIドキュメント: [最新版(latest release)用](http://rubydoc.info/gems/sinatra)または[現在のHEAD用](http://rubydoc.info/github/sinatra/sinatra)
|
* http://www.rubydoc.info/上のAPIドキュメント: [最新版(latest release)用](http://www.rubydoc.info/gems/sinatra)または[現在のHEAD用](http://www.rubydoc.info/github/sinatra/sinatra)
|
||||||
* [CIサーバ](http://travis-ci.org/sinatra/sinatra)
|
* [CIサーバ](https://travis-ci.org/sinatra/sinatra)
|
||||||
* [Greenbear Laboratory Rack日本語マニュアル](http://route477.net/w/RackReferenceJa.html)
|
* [Greenbear Laboratory Rack日本語マニュアル](http://route477.net/w/RackReferenceJa.html)
|
||||||
|
|
42
README.ko.md
42
README.ko.md
|
@ -3,7 +3,7 @@
|
||||||
*주의: 이 문서는 영문판의 번역본이며 최신판 문서와 다를 수 있습니다.*
|
*주의: 이 문서는 영문판의 번역본이며 최신판 문서와 다를 수 있습니다.*
|
||||||
|
|
||||||
Sinatra는 최소한의 노력으로 루비 기반 웹 애플리케이션을 신속하게 만들 수 있게
|
Sinatra는 최소한의 노력으로 루비 기반 웹 애플리케이션을 신속하게 만들 수 있게
|
||||||
해 주는 [DSL](http://en.wikipedia.org/wiki/Domain-specific_language)입니다.
|
해 주는 [DSL](https://en.wikipedia.org/wiki/Domain-specific_language)입니다.
|
||||||
|
|
||||||
```ruby
|
```ruby
|
||||||
# myapp.rb
|
# myapp.rb
|
||||||
|
@ -583,7 +583,7 @@ get('/') { markdown :index }
|
||||||
<table>
|
<table>
|
||||||
<tr>
|
<tr>
|
||||||
<td>의존성</td>
|
<td>의존성</td>
|
||||||
<td><a href="http://nokogiri.org/">nokogiri</a></td>
|
<td><a href="http://www.nokogiri.org/">nokogiri</a></td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td>파일 확장자</td>
|
<td>파일 확장자</td>
|
||||||
|
@ -636,7 +636,7 @@ get('/') { markdown :index }
|
||||||
<table>
|
<table>
|
||||||
<tr>
|
<tr>
|
||||||
<td>의존성</td>
|
<td>의존성</td>
|
||||||
<td><a href="http://www.lesscss.org/">less</a></td>
|
<td><a href="http://lesscss.org/">less</a></td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td>파일 확장자</td>
|
<td>파일 확장자</td>
|
||||||
|
@ -653,7 +653,7 @@ get('/') { markdown :index }
|
||||||
<table>
|
<table>
|
||||||
<tr>
|
<tr>
|
||||||
<td>의존성</td>
|
<td>의존성</td>
|
||||||
<td><a href="http://www.liquidmarkup.org/">liquid</a></td>
|
<td><a href="http://liquidmarkup.org/">liquid</a></td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td>파일 확장자</td>
|
<td>파일 확장자</td>
|
||||||
|
@ -674,7 +674,7 @@ Liquid 템플릿에서는 루비 메서드(`yield` 제외)를 호출할 수 없
|
||||||
<tr>
|
<tr>
|
||||||
<td>의존성</td>
|
<td>의존성</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="https://github.com/vmg/redcarpet" title="RedCarpet">RedCarpet</a>,
|
||||||
<a href="http://deveiate.org/projects/BlueCloth" title="BlueCloth">BlueCloth</a>,
|
<a href="http://deveiate.org/projects/BlueCloth" title="BlueCloth">BlueCloth</a>,
|
||||||
<a href="http://kramdown.gettalong.org/" title="kramdown">kramdown</a>,
|
<a href="http://kramdown.gettalong.org/" title="kramdown">kramdown</a>,
|
||||||
|
@ -825,7 +825,7 @@ Radius 템플릿에서는 루비 메서드를 호출할 수 없기
|
||||||
<table>
|
<table>
|
||||||
<tr>
|
<tr>
|
||||||
<td>의존성</td>
|
<td>의존성</td>
|
||||||
<td><a href="http://markaby.github.com/">markaby</a></td>
|
<td><a href="http://markaby.github.io/">markaby</a></td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td>파일확장</td>
|
<td>파일확장</td>
|
||||||
|
@ -973,7 +973,7 @@ MediaWiki에서 루비를 호출할 수 없기 때문에, MediaWiki으로 작성
|
||||||
<tr>
|
<tr>
|
||||||
<td>의존성</td>
|
<td>의존성</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
|
Stylus
|
||||||
</a> 와
|
</a> 와
|
||||||
<a href="https://github.com/sstephenson/execjs/blob/master/README.md#readme" title="ExecJS">
|
<a href="https://github.com/sstephenson/execjs/blob/master/README.md#readme" title="ExecJS">
|
||||||
|
@ -1506,8 +1506,8 @@ end
|
||||||
```
|
```
|
||||||
|
|
||||||
이렇게 스트리밍 API나 [서버 발송 이벤트Server Sent
|
이렇게 스트리밍 API나 [서버 발송 이벤트Server Sent
|
||||||
Events](http://dev.w3.org/html5/eventsource/)를 구현할 수 있고, 이 방법은
|
Events](https://w3c.github.io/eventsource/)를 구현할 수 있고, 이 방법은
|
||||||
[WebSockets](http://en.wikipedia.org/wiki/WebSocket)을 위한 기반으로 사용됩니다.
|
[WebSockets](https://en.wikipedia.org/wiki/WebSocket)을 위한 기반으로 사용됩니다.
|
||||||
이 방법은 일부 콘텐츠가 느린 자원에 의존하는 경우에 스로풋(throughtput)을
|
이 방법은 일부 콘텐츠가 느린 자원에 의존하는 경우에 스로풋(throughtput)을
|
||||||
높이기 위해 사용되기도 합니다.
|
높이기 위해 사용되기도 합니다.
|
||||||
|
|
||||||
|
@ -1631,7 +1631,7 @@ end
|
||||||
|
|
||||||
```ruby
|
```ruby
|
||||||
redirect to('/bar'), 303
|
redirect to('/bar'), 303
|
||||||
redirect 'http://google.com', 'wrong place, buddy'
|
redirect 'http://www.google.com/', 'wrong place, buddy'
|
||||||
```
|
```
|
||||||
|
|
||||||
`redirect back`을 사용하면 쉽게 사용자가 왔던 페이지로 다시 돌아가게
|
`redirect back`을 사용하면 쉽게 사용자가 왔던 페이지로 다시 돌아가게
|
||||||
|
@ -1713,7 +1713,7 @@ get "/article/:id" do
|
||||||
end
|
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
|
```ruby
|
||||||
|
@ -2023,7 +2023,7 @@ end
|
||||||
|
|
||||||
### 공격 방어 설정하기(Configuring attack protection)
|
### 공격 방어 설정하기(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
|
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` 메서드는
|
(rackup 파일에서 가장 많이 사용)에서 정의한 것과 동일합니다. 예를 들어, `use` 메서드는
|
||||||
블록이나 여러 개의/가변적인 인자도 받을 수 있습니다.
|
블록이나 여러 개의/가변적인 인자도 받을 수 있습니다.
|
||||||
|
|
||||||
|
@ -2376,7 +2376,7 @@ Rack은 로깅, 디버깅, URL 라우팅, 인증, 그리고 세센 핸들링을
|
||||||
## 테스팅(Testing)
|
## 테스팅(Testing)
|
||||||
|
|
||||||
Sinatra 테스트는 많은 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
|
```ruby
|
||||||
require 'my_sinatra_app'
|
require 'my_sinatra_app'
|
||||||
|
@ -2444,7 +2444,7 @@ end
|
||||||
|
|
||||||
`Sinatra::Base`는 백지상태(blank slate)입니다. 빌트인 서버를 비롯한 대부분의 옵션들이
|
`Sinatra::Base`는 백지상태(blank slate)입니다. 빌트인 서버를 비롯한 대부분의 옵션들이
|
||||||
기본값으로 꺼져 있습니다. 가능한 옵션들과 그 작동에 대한 상세는 [옵션과
|
기본값으로 꺼져 있습니다. 가능한 옵션들과 그 작동에 대한 상세는 [옵션과
|
||||||
설정](http://sinatra.github.com/configuration.html)을 참조하세요.
|
설정](http://www.sinatrarb.com/configuration.html)을 참조하세요.
|
||||||
|
|
||||||
### 모듈(Modular) vs. 전통적 방식(Classic Style)
|
### 모듈(Modular) vs. 전통적 방식(Classic Style)
|
||||||
|
|
||||||
|
@ -2878,7 +2878,7 @@ gem install sinatra --pre
|
||||||
### Bundler를 사용하여
|
### Bundler를 사용하여
|
||||||
|
|
||||||
여러분 애플리케이션을 최신 Sinatra로 실행하고자 한다면,
|
여러분 애플리케이션을 최신 Sinatra로 실행하고자 한다면,
|
||||||
[Bundler](http://gembundler.com/)를 사용할 것을 권장합니다.
|
[Bundler](http://bundler.io)를 사용할 것을 권장합니다.
|
||||||
|
|
||||||
우선, 아직 설치하지 않았다면 bundler를 설치합니다.
|
우선, 아직 설치하지 않았다면 bundler를 설치합니다.
|
||||||
|
|
||||||
|
@ -2954,14 +2954,14 @@ SemVerTag를 준수합니다.
|
||||||
그리고 다른 리소스들에 대한 링크.
|
그리고 다른 리소스들에 대한 링크.
|
||||||
* [기여하기](http://www.sinatrarb.com/contributing) - 버그를 찾았나요?
|
* [기여하기](http://www.sinatrarb.com/contributing) - 버그를 찾았나요?
|
||||||
도움이 필요한가요? 패치를 하셨나요?
|
도움이 필요한가요? 패치를 하셨나요?
|
||||||
* [이슈 트래커](http://github.com/sinatra/sinatra/issues)
|
* [이슈 트래커](https://github.com/sinatra/sinatra/issues)
|
||||||
* [트위터](http://twitter.com/sinatra)
|
* [트위터](https://twitter.com/sinatra)
|
||||||
* [메일링 리스트](http://groups.google.com/group/sinatrarb/topics)
|
* [메일링 리스트](http://groups.google.com/group/sinatrarb/topics)
|
||||||
* IRC: [#sinatra](irc://chat.freenode.net/#sinatra) http://freenode.net
|
* IRC: [#sinatra](irc://chat.freenode.net/#sinatra) http://freenode.net
|
||||||
* 슬랙의 [Sinatra & Friends](https://sinatrarb.slack.com)입니다.
|
* 슬랙의 [Sinatra & Friends](https://sinatrarb.slack.com)입니다.
|
||||||
[여기](https://sinatra-slack.herokuapp.com/)에서 가입가능합니다.
|
[여기](https://sinatra-slack.herokuapp.com/)에서 가입가능합니다.
|
||||||
* [Sinatra Book](https://github.com/sinatra/sinatra-book/) Cookbook 튜토리얼
|
* [Sinatra Book](https://github.com/sinatra/sinatra-book/) Cookbook 튜토리얼
|
||||||
* [Sinatra Recipes](http://recipes.sinatrarb.com/) 커뮤니티가 만드는 레시피
|
* [Sinatra Recipes](http://recipes.sinatrarb.com/) 커뮤니티가 만드는 레시피
|
||||||
* http://rubydoc.info에 있는 [최종 릴리스](http://rubydoc.info/gems/sinatra)
|
* http://www.rubydoc.info/에 있는 [최종 릴리스](http://www.rubydoc.info/gems/sinatra)
|
||||||
또는 [current HEAD](http://rubydoc.info/github/sinatra/sinatra)에 대한 API 문서
|
또는 [current HEAD](http://www.rubydoc.info/github/sinatra/sinatra)에 대한 API 문서
|
||||||
* [CI server](http://travis-ci.org/sinatra/sinatra)
|
* [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
|
# 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:
|
criar aplicações web em Ruby com o mínimo de esforço e rapidez:
|
||||||
|
|
||||||
```ruby
|
```ruby
|
||||||
|
@ -585,7 +585,7 @@ It also takes a block for inline templates (see exemplo).
|
||||||
<table>
|
<table>
|
||||||
<tr>
|
<tr>
|
||||||
<td>Dependencia</td>
|
<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>
|
||||||
<tr>
|
<tr>
|
||||||
<td>Extencao do Arquivo</td>
|
<td>Extencao do Arquivo</td>
|
||||||
|
@ -638,7 +638,7 @@ It also takes a block for inline templates (see exemplo).
|
||||||
<table>
|
<table>
|
||||||
<tr>
|
<tr>
|
||||||
<td>Dependencia</td>
|
<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>
|
||||||
<tr>
|
<tr>
|
||||||
<td>Extencao do Arquivo</td>
|
<td>Extencao do Arquivo</td>
|
||||||
|
@ -655,7 +655,7 @@ It also takes a block for inline templates (see exemplo).
|
||||||
<table>
|
<table>
|
||||||
<tr>
|
<tr>
|
||||||
<td>Dependencia</td>
|
<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>
|
||||||
<tr>
|
<tr>
|
||||||
<td>Extencao do Arquivo</td>
|
<td>Extencao do Arquivo</td>
|
||||||
|
@ -677,7 +677,7 @@ você quase sempre precisará passar o `locals` para ele.
|
||||||
<td>Dependencia</td>
|
<td>Dependencia</td>
|
||||||
<td>
|
<td>
|
||||||
Anyone of:
|
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="https://github.com/vmg/redcarpet" title="RedCarpet">RedCarpet</a>,
|
||||||
<a href="http://deveiate.org/projects/BlueCloth" title="BlueCloth">BlueCloth</a>,
|
<a href="http://deveiate.org/projects/BlueCloth" title="BlueCloth">BlueCloth</a>,
|
||||||
<a href="http://kramdown.gettalong.org/" title="kramdown">kramdown</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>
|
<table>
|
||||||
<tr>
|
<tr>
|
||||||
<td>Dependencia</td>
|
<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>
|
||||||
<tr>
|
<tr>
|
||||||
<td>Extencao do Arquivo</td>
|
<td>Extencao do Arquivo</td>
|
||||||
|
@ -975,7 +975,7 @@ deve-se passar a `:layout_engine` como opção.
|
||||||
<tr>
|
<tr>
|
||||||
<td>Dependencia</td>
|
<td>Dependencia</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
|
Stylus
|
||||||
</a> and a
|
</a> and a
|
||||||
<a href="https://github.com/sstephenson/execjs/blob/master/README.md#readme" title="ExecJS">
|
<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
|
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
|
(mais frequentemente utilizada para arquivos rackup). Por exemplo, o
|
||||||
método `use` aceita múltiplos argumentos/variáveis bem como blocos:
|
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
|
`Sinatra::Base` é um quadro branco. Muitas opções são desabilitadas por
|
||||||
padrão, incluindo o servidor embutido. Veja [Opções e
|
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.
|
detalhes de opções disponíveis e seus comportamentos.
|
||||||
|
|
||||||
SIDEBAR: A DSL de alto nível do Sinatra é implementada utilizando um simples
|
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.
|
adicional, novidades e links para outros recursos.
|
||||||
* [Contribuir](http://www.sinatrarb.com/contributing) - Encontrar um
|
* [Contribuir](http://www.sinatrarb.com/contributing) - Encontrar um
|
||||||
bug? Precisa de ajuda? Tem um patch?
|
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)
|
* [Lista de Email](http://groups.google.com/group/sinatrarb/topics)
|
||||||
* [Sinatra Book](https://github.com/sinatra/sinatra-book/) Livro de Receitas
|
* [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
|
* [IRC: \#sinatra](irc://chat.freenode.net/#sinatra) em
|
||||||
[freenode.net](http://freenode.net)
|
[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.*
|
pode estar desatualizado.*
|
||||||
|
|
||||||
Sinatra é uma
|
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:
|
criar rapidamente aplicações web em Ruby com o mínimo de esforço:
|
||||||
|
|
||||||
```ruby
|
```ruby
|
||||||
|
@ -158,7 +158,7 @@ end
|
||||||
Renderiza `./views/index.haml`.
|
Renderiza `./views/index.haml`.
|
||||||
|
|
||||||
[Opções
|
[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,
|
podem ser definidas globalmente através das configurações do sinatra,
|
||||||
veja [Opções e
|
veja [Opções e
|
||||||
Configurações](http://www.sinatrarb.com/configuration.html), e substitua
|
Configurações](http://www.sinatrarb.com/configuration.html), e substitua
|
||||||
|
@ -233,7 +233,7 @@ end
|
||||||
Renderiza `./views/stylesheet.sass`.
|
Renderiza `./views/stylesheet.sass`.
|
||||||
|
|
||||||
[Opções
|
[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,
|
podem ser definidas globalmente através das configurações do sinatra,
|
||||||
veja [Opções e
|
veja [Opções e
|
||||||
Configurações](http://www.sinatrarb.com/configuration.html), e substitua
|
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
|
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
|
(mais frequentemente utilizada para arquivos rackup). Por exemplo, o
|
||||||
método `use` aceita múltiplos argumentos/variáveis, bem como blocos:
|
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
|
`Sinatra::Base` é um quadro branco. Muitas opções são desactivadas por
|
||||||
padrão, incluindo o servidor embutido. Veja [Opções e
|
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.
|
detalhes de opções disponíveis e seus comportamentos.
|
||||||
|
|
||||||
SIDEBAR: A DSL de alto nível do Sinatra é implementada utilizando um simples
|
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
|
- [Contribuir](http://www.sinatrarb.com/contributing) - Encontrou um
|
||||||
bug? Precisa de ajuda? Tem um patch?
|
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)
|
- [Lista de Email](http://groups.google.com/group/sinatrarb/topics)
|
||||||
|
|
||||||
|
|
42
README.ru.md
42
README.ru.md
|
@ -91,7 +91,7 @@
|
||||||
устаревшим*
|
устаревшим*
|
||||||
|
|
||||||
Sinatra — это предметно-ориентированный каркас
|
Sinatra — это предметно-ориентированный каркас
|
||||||
([DSL](http://ru.wikipedia.org/wiki/Предметно-ориентированный_язык_программирования))
|
([DSL](https://ru.wikipedia.org/wiki/Предметно-ориентированный_язык))
|
||||||
для быстрого создания функциональных веб-приложений на Ruby с минимумом усилий:
|
для быстрого создания функциональных веб-приложений на Ruby с минимумом усилий:
|
||||||
|
|
||||||
```ruby
|
```ruby
|
||||||
|
@ -595,7 +595,7 @@ get('/') { markdown :index }
|
||||||
<table>
|
<table>
|
||||||
<tr>
|
<tr>
|
||||||
<td>Зависимости</td>
|
<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>
|
||||||
<tr>
|
<tr>
|
||||||
<td>Расширения файлов</td>
|
<td>Расширения файлов</td>
|
||||||
|
@ -648,7 +648,7 @@ get('/') { markdown :index }
|
||||||
<table>
|
<table>
|
||||||
<tr>
|
<tr>
|
||||||
<td>Зависимости</td>
|
<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>
|
||||||
<tr>
|
<tr>
|
||||||
<td>Расширения файлов</td>
|
<td>Расширения файлов</td>
|
||||||
|
@ -665,7 +665,7 @@ get('/') { markdown :index }
|
||||||
<table>
|
<table>
|
||||||
<tr>
|
<tr>
|
||||||
<td>Зависимости</td>
|
<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>
|
||||||
<tr>
|
<tr>
|
||||||
<td>Расширения файлов</td>
|
<td>Расширения файлов</td>
|
||||||
|
@ -687,7 +687,7 @@ get('/') { markdown :index }
|
||||||
<td>Зависимости</td>
|
<td>Зависимости</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="https://github.com/vmg/redcarpet" title="RedCarpet">RedCarpet</a>,
|
||||||
<a href="http://deveiate.org/projects/BlueCloth" title="BlueCloth">BlueCloth</a>,
|
<a href="http://deveiate.org/projects/BlueCloth" title="BlueCloth">BlueCloth</a>,
|
||||||
<a href="http://kramdown.gettalong.org/" title="kramdown">kramdown</a>,
|
<a href="http://kramdown.gettalong.org/" title="kramdown">kramdown</a>,
|
||||||
|
@ -843,7 +843,7 @@ erb :overview, :locals => { :text => rdoc(:introduction) }
|
||||||
<table>
|
<table>
|
||||||
<tr>
|
<tr>
|
||||||
<td>Зависимости</td>
|
<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>
|
||||||
<tr>
|
<tr>
|
||||||
<td>Расширения файлов</td>
|
<td>Расширения файлов</td>
|
||||||
|
@ -995,7 +995,7 @@ erb :overview, :locals => { :text => mediawiki(:introduction) }
|
||||||
<tr>
|
<tr>
|
||||||
<td>Зависимости</td>
|
<td>Зависимости</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
|
Stylus
|
||||||
</a> и
|
</a> и
|
||||||
<a href="https://github.com/sstephenson/execjs/blob/master/README.md#readme" title="ExecJS">
|
<a href="https://github.com/sstephenson/execjs/blob/master/README.md#readme" title="ExecJS">
|
||||||
|
@ -1526,8 +1526,8 @@ end
|
||||||
```
|
```
|
||||||
|
|
||||||
Что позволяет вам реализовать стриминговые API,
|
Что позволяет вам реализовать стриминговые API,
|
||||||
[Server Sent Events](http://dev.w3.org/html5/eventsource/),
|
[Server Sent Events](https://w3c.github.io/eventsource/),
|
||||||
и может служить основой для [WebSockets](http://en.wikipedia.org/wiki/WebSocket).
|
и может служить основой для [WebSockets](https://en.wikipedia.org/wiki/WebSocket).
|
||||||
Также такой подход можно использовать для увеличения производительности в случае,
|
Также такой подход можно использовать для увеличения производительности в случае,
|
||||||
когда какая-то часть контента зависит от медленного ресурса.
|
когда какая-то часть контента зависит от медленного ресурса.
|
||||||
|
|
||||||
|
@ -1654,7 +1654,7 @@ end
|
||||||
|
|
||||||
```ruby
|
```ruby
|
||||||
redirect to('/bar'), 303
|
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
|
```ruby
|
||||||
etag @article.sha1, :weak
|
etag @article.sha1, :weak
|
||||||
|
@ -2055,7 +2055,7 @@ end
|
||||||
### Настройка защиты от атак
|
### Настройка защиты от атак
|
||||||
|
|
||||||
Sinatra использует
|
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` идентична той, что определена для
|
Семантика `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` принимает как
|
(чаще всего используется в rackup файлах). Например, метод `use` принимает как
|
||||||
множественные переменные, так и блоки:
|
множественные переменные, так и блоки:
|
||||||
|
|
||||||
|
@ -2387,7 +2387,7 @@ Rack распространяется с различными стандартн
|
||||||
|
|
||||||
Тесты для Sinatra приложений могут быть написаны с помощью библиотек,
|
Тесты для Sinatra приложений могут быть написаны с помощью библиотек,
|
||||||
фреймворков, поддерживающих тестирование Rack.
|
фреймворков, поддерживающих тестирование 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
|
```ruby
|
||||||
|
@ -2868,7 +2868,7 @@ gem install sinatra --pre
|
||||||
### С помощью Bundler
|
### С помощью Bundler
|
||||||
|
|
||||||
Если вы хотите запускать свое приложение с последней версией Sinatra, то
|
Если вы хотите запускать свое приложение с последней версией Sinatra, то
|
||||||
рекомендуем использовать [Bundler](http://gembundler.com/).
|
рекомендуем использовать [Bundler](http://bundler.io).
|
||||||
|
|
||||||
Сначала установите Bundler, если у вас его еще нет:
|
Сначала установите Bundler, если у вас его еще нет:
|
||||||
|
|
||||||
|
@ -2944,15 +2944,15 @@ SemVerTag.
|
||||||
документация, новости и ссылки на другие ресурсы.
|
документация, новости и ссылки на другие ресурсы.
|
||||||
* [Участие в проекте](http://www.sinatrarb.com/contributing) — Обнаружили
|
* [Участие в проекте](http://www.sinatrarb.com/contributing) — Обнаружили
|
||||||
баг? Нужна помощь? Написали патч?
|
баг? Нужна помощь? Написали патч?
|
||||||
* [Отслеживание проблем/ошибок](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)
|
* [Группы рассылки](http://groups.google.com/group/sinatrarb/topics)
|
||||||
* IRC: [#sinatra](irc://chat.freenode.net/#sinatra) на http://freenode.net
|
* IRC: [#sinatra](irc://chat.freenode.net/#sinatra) на http://freenode.net
|
||||||
* [Sinatra и Друзья](https://sinatrarb.slack.com) на Slack, а так же
|
* [Sinatra и Друзья](https://sinatrarb.slack.com) на Slack, а так же
|
||||||
[ссылка](https://sinatra-slack.herokuapp.com/) для инвайта.
|
[ссылка](https://sinatra-slack.herokuapp.com/) для инвайта.
|
||||||
* [Sinatra Book](https://github.com/sinatra/sinatra-book/) учебник и сборник рецептов
|
* [Sinatra Book](https://github.com/sinatra/sinatra-book/) учебник и сборник рецептов
|
||||||
* [Sinatra Recipes](http://recipes.sinatrarb.com/) сборник рецептов
|
* [Sinatra Recipes](http://recipes.sinatrarb.com/) сборник рецептов
|
||||||
* API документация к [последнему релизу](http://rubydoc.info/gems/sinatra)
|
* API документация к [последнему релизу](http://www.rubydoc.info/gems/sinatra)
|
||||||
или [текущему HEAD](http://rubydoc.info/github/sinatra/sinatra) на
|
или [текущему HEAD](http://www.rubydoc.info/github/sinatra/sinatra) на
|
||||||
http://rubydoc.info
|
http://www.rubydoc.info/
|
||||||
* [Сервер непрерывной интеграции](http://travis-ci.org/sinatra/sinatra)
|
* [Сервер непрерывной интеграции](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应用。
|
领域专属语言),可以轻松、快速的创建web应用。
|
||||||
|
|
||||||
~~~~ruby
|
~~~~ruby
|
||||||
|
@ -281,7 +281,7 @@ end
|
||||||
|
|
||||||
填充 `./views/index.haml`。
|
填充 `./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的配置全局设定, 参见
|
可以通过Sinatra的配置全局设定, 参见
|
||||||
[选项和配置](http://www.sinatrarb.com/configuration.html),
|
[选项和配置](http://www.sinatrarb.com/configuration.html),
|
||||||
也可以个别的被覆盖。
|
也可以个别的被覆盖。
|
||||||
|
@ -381,7 +381,7 @@ end
|
||||||
这里调用的是 `./views/stylesheet.sass`。
|
这里调用的是 `./views/stylesheet.sass`。
|
||||||
|
|
||||||
[Sass
|
[Sass
|
||||||
的选项](http://sass-lang.com/docs/yardoc/file.SASS_REFERENCE.html#options)
|
的选项](http://sass-lang.com/documentation/file.SASS_REFERENCE.html#options)
|
||||||
可以通过Sinatra选项全局设定, 参考
|
可以通过Sinatra选项全局设定, 参考
|
||||||
[选项和配置(英文)](http://www.sinatrarb.com/configuration.html),
|
[选项和配置(英文)](http://www.sinatrarb.com/configuration.html),
|
||||||
也可以在个体的基础上覆盖。
|
也可以在个体的基础上覆盖。
|
||||||
|
@ -726,7 +726,7 @@ end
|
||||||
- `therubyracer` gem/library
|
- `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 模版了:
|
现在你可以调用 CoffeeScript 模版了:
|
||||||
|
@ -1118,7 +1118,7 @@ end
|
||||||
|
|
||||||
~~~~ruby
|
~~~~ruby
|
||||||
redirect to('/bar'), 303
|
redirect to('/bar'), 303
|
||||||
redirect 'http://google.com', 'wrong place, buddy'
|
redirect 'http://www.google.com/', 'wrong place, buddy'
|
||||||
~~~~
|
~~~~
|
||||||
|
|
||||||
用 `redirect back`可以把用户重定向到原始页面:
|
用 `redirect back`可以把用户重定向到原始页面:
|
||||||
|
@ -1200,7 +1200,7 @@ end
|
||||||
~~~~
|
~~~~
|
||||||
|
|
||||||
使用 [weak
|
使用 [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
|
~~~~ruby
|
||||||
|
@ -1680,7 +1680,7 @@ end
|
||||||
~~~~
|
~~~~
|
||||||
|
|
||||||
`use` 的语义和在
|
`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` 方法接受
|
DSL(在rack文件中最频繁使用)中定义的完全一样。例如,`use` 方法接受
|
||||||
多个/可变 参数,包括代码块:
|
多个/可变 参数,包括代码块:
|
||||||
|
|
||||||
|
@ -1765,7 +1765,7 @@ Sinatra::Base子类可用的方法实际上就是通过顶层 DSL 可用的方
|
||||||
|
|
||||||
`+Sinatra::Base+` 是一张白纸。大部分的选项默认是禁用的,
|
`+Sinatra::Base+` 是一张白纸。大部分的选项默认是禁用的,
|
||||||
包含内置的服务器。参见
|
包含内置的服务器。参见
|
||||||
[选项和配置](http://sinatra.github.com/configuration.html)
|
[选项和配置](http://www.sinatrarb.com/configuration.html)
|
||||||
查看可用选项的具体细节和他们的行为。
|
查看可用选项的具体细节和他们的行为。
|
||||||
|
|
||||||
### 模块化 vs. 传统的方式
|
### 模块化 vs. 传统的方式
|
||||||
|
@ -2089,7 +2089,7 @@ Sinatra应该会运行在任何支持上述Ruby实现的操作系统。
|
||||||
### 通过Bundler
|
### 通过Bundler
|
||||||
|
|
||||||
如果你想使用最新的Sinatra运行你的应用,通过
|
如果你想使用最新的Sinatra运行你的应用,通过
|
||||||
[Bundler](http://gembundler.com/) 是推荐的方式。
|
[Bundler](http://bundler.io) 是推荐的方式。
|
||||||
|
|
||||||
首先,安装bundler,如果你还没有安装:
|
首先,安装bundler,如果你还没有安装:
|
||||||
|
|
||||||
|
@ -2148,9 +2148,9 @@ gem 'activerecord', '~> 3.0' # 也许你还需要 ActiveRecord 3.x
|
||||||
- [贡献](http://www.sinatrarb.com/contributing) - 找到了一个bug?
|
- [贡献](http://www.sinatrarb.com/contributing) - 找到了一个bug?
|
||||||
需要帮助?有了一个 patch?
|
需要帮助?有了一个 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)
|
- [邮件列表](http://groups.google.com/group/sinatrarb/topics)
|
||||||
|
|
||||||
|
@ -2161,6 +2161,6 @@ gem 'activerecord', '~> 3.0' # 也许你还需要 ActiveRecord 3.x
|
||||||
|
|
||||||
- [Sinatra使用技巧](http://recipes.sinatrarb.com/) 网友贡献的实用技巧
|
- [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