sinatra 1.4.6 → 1.4.7

Sign up to get free protection for your applications and to get access to all the features.

Potentially problematic release.


This version of sinatra might be problematic. Click here for more details.

checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: ab40363a01800a6eca6fbfd31a92a7bc82eb6324
4
- data.tar.gz: 8eb57d7e6f169ce4a8671fb1211c65516ddb21ec
3
+ metadata.gz: 4c058fb61ccbbdfec994df6e2c9f974a86f7a37e
4
+ data.tar.gz: e0064574ee40beab396f08d5800e758febdf5930
5
5
  SHA512:
6
- metadata.gz: 058b79bc51a5b1e85a9343cfa5552a0f646ebd429721b89101b2b245c491dabe157c0719d82fc85f74193d094d61c62e9b91c0e401dd4dcef5c92292b021e5be
7
- data.tar.gz: 05ff1ebc8d85c01b95b17347717e7d0a9da61f3205b36588b9d4228d3373c036549dd0e86c6961a37ce6a70c8bf3f7cb23fceb0d49b5c83cf445a2eb7d206e06
6
+ metadata.gz: 1a2805b30e9d10a026efa8ba6e6ca237eb5820ccc269d15771ccc5f9403bc300f3d7bb7eb3a89f867ab4eb68194c6df9e2b60d6fa229fec24a8d260e0d7f98cf
7
+ data.tar.gz: a78ea1f840c1087ed181df74a59763e189a5e973fdbfb0d47390fae66abd9a50704ec1a690ea7e6f97a436e32fd1cfe750cc64f651273c46e709b454a6de54e5
data/AUTHORS.md CHANGED
@@ -4,13 +4,16 @@ Sinatra was designed and developed by Blake Mizerany in California.
4
4
 
5
5
  * **Konstantin Haase** (maintainer)
6
6
  * **Zachary Scott**
7
- * **Katrina Owen**
7
+ * **Kashyap Kondamudi**
8
+ * **Ashley Williams**
9
+ * **Trevor Bramble**
8
10
 
9
11
  ### Alumni
10
12
 
11
13
  * **Blake Mizerany** (creator)
12
14
  * **Ryan Tomayko**
13
15
  * **Simon Rozet**
16
+ * **Katrina Owen**
14
17
 
15
18
  ### Thanks
16
19
 
@@ -74,4 +77,4 @@ Sinatra would not be possible:
74
77
  And last but not least:
75
78
 
76
79
  * [Frank Sinatra](http://www.sinatra.com/) (chairman of the board) for having so much class he
77
- deserves a web-framework named after him.
80
+ deserves a web-framework named after him.
@@ -1,4 +1,20 @@
1
- = 1.4.6 / 2015-03-2x
1
+ = 1.4.7 / 2016-01-24
2
+
3
+ * Add Ashley Williams, Trevor Bramble, and Kashyap Kondamudi to team Sinatra.
4
+
5
+ * Correctly handle encoded colons in routes. (Jeremy Evans)
6
+
7
+ * Rename CHANGES to CHANGELOG.md and update Rakefile. #1043 (Eliza Sorensen)
8
+
9
+ * Improve documentation. #941, #1069, #1075, #1025, #1052 (Many great folks)
10
+
11
+ * Introduce `Sinatra::Ext` to workaround Rack 1.6 bug to fix Ruby 1.8.7
12
+ support. #1080 (Zachary Scott)
13
+
14
+ * Add CONTRIBUTING guide. #987 (Katrina Owen)
15
+
16
+
17
+ = 1.4.6 / 2015-03-23
2
18
 
3
19
  * Improve tests and documentation. (Darío Hereñú, Seiichi Yonezawa, kyoendo,
4
20
  John Voloski, Ferenc-, Renaud Martinet, Christian Haase, marocchino,
@@ -0,0 +1,100 @@
1
+ # Contribute
2
+
3
+ Want to show Sinatra some love? Help out by contributing!
4
+
5
+ ## Found a bug?
6
+
7
+ Log it in our [issue tracker][ghi] or send a note to the [mailing list][ml].
8
+ Be sure to include all relevant information, like the versions of Sinatra and
9
+ Ruby you're using. A [gist](http://gist.github.com/) of the code that caused
10
+ the issue as well as any error messages are also very helpful.
11
+
12
+ ## Need help?
13
+
14
+ The [Sinatra mailing list][ml] has over 900 subscribers, many of which are happy
15
+ to help out newbies or talk about potential feature additions. You can also
16
+ drop by the [#sinatra](irc://chat.freenode.net/#sinatra) channel on
17
+ [irc.freenode.net](http://freenode.net).
18
+
19
+ ## Have a patch?
20
+
21
+ Bugs and feature requests that include patches are much more likely to
22
+ get attention. Here are some guidelines that will help ensure your patch
23
+ can be applied as quickly as possible:
24
+
25
+ 1. **Use [Git](http://git-scm.com) and [GitHub](http://github.com):**
26
+ The easiest way to get setup is to fork the
27
+ [sinatra/sinatra repo](http://github.com/sinatra/sinatra/).
28
+ Or, the [sinatra.github.com repo](http://github.com/sinatra/sinatra.github.com/),
29
+ if the patch is doc related.
30
+
31
+ 2. **Write unit tests:** If you add or modify functionality, it must
32
+ include unit tests. If you don't write tests, we have to, and this
33
+ can hold up acceptance of the patch.
34
+
35
+ 3. **Mind the `README`:** If the patch adds or modifies a major feature,
36
+ modify the `README.md` file to reflect that. Again, if you don't
37
+ update the `README`, we have to, and this holds up acceptance.
38
+
39
+ 4. **Update the change log (`CHANGELOG.md`):** The change log helps give an
40
+ overview of the changes that go into each release, and gives credit
41
+ where credit is due. We make sure that the change log is up to date
42
+ before each release, and we always appreciate it when people make
43
+ it easier to get the release out the door.
44
+
45
+ 5. **Push it:** Once you're ready, push your changes to a topic branch
46
+ and add a note to the ticket with the URL to your branch. Or, say
47
+ something like, "you can find the patch on johndoe/foobranch". We also
48
+ gladly accept GitHub [pull requests](http://help.github.com/pull-requests/).
49
+
50
+ __NOTE:__ _We will take whatever we can get._ If you prefer to attach diffs in
51
+ emails to the mailing list, that's fine; but do know that _someone_ will need
52
+ to take the diff through the process described above and this can hold things
53
+ up considerably.
54
+
55
+ ## Want to write docs?
56
+
57
+ The process for contributing to Sinatra's website, documentation or the book
58
+ is the same as contributing code. We use Git for versions control and GitHub to
59
+ track patch requests.
60
+
61
+ * [The sinatra.github.com repo](http://github.com/sinatra/sinatra.github.com/)
62
+ is where the website sources are managed. There are almost always people in
63
+ `#sinatra` that are happy to discuss, apply, and publish website patches.
64
+
65
+ * [The Book](http://sinatra-book.gittr.com/) has its own [Git
66
+ repository](http://github.com/sinatra/sinatra-book/) and build process but is
67
+ managed the same as the website and project codebase.
68
+
69
+ * [Sinatra Recipes](http://recipes.sinatrarb.com/) is a community
70
+ project where anyone is free to contribute ideas, recipes and tutorials. Which
71
+ also has its own [Git repository](http://github.com/sinatra/sinatra-recipes).
72
+
73
+ * [The Introduction](http://www.sinatrarb.com/intro.html) is generated from
74
+ Sinatra's [README file](http://github.com/sinatra/sinatra/blob/master/README.md).
75
+
76
+ * If you want to help translating the documentation, the README is already
77
+ available in
78
+ [Japanese](http://github.com/sinatra/sinatra/blob/master/README.ja.md),
79
+ [German](http://github.com/sinatra/sinatra/blob/master/README.de.md),
80
+ [Chinese](https://github.com/sinatra/sinatra/blob/master/README.zh.md),
81
+ [Russian](https://github.com/sinatra/sinatra/blob/master/README.ru.md),
82
+ [European](https://github.com/sinatra/sinatra/blob/master/README.pt-pt.md) and
83
+ [Brazilian](https://github.com/sinatra/sinatra/blob/master/README.pt-br.md)
84
+ Portuguese,
85
+ [French](https://github.com/sinatra/sinatra/blob/master/README.fr.md),
86
+ [Spanish](https://github.com/sinatra/sinatra/blob/master/README.es.md),
87
+ [Korean](https://github.com/sinatra/sinatra/blob/master/README.ko.md), and
88
+ [Hungarian](https://github.com/sinatra/sinatra/blob/master/README.hu.md).
89
+ The translations tend to fall behind the English version. Translations into
90
+ other languages would also be appreciated.
91
+
92
+ ## Looking for something to do?
93
+
94
+ If you'd like to help out but aren't sure how, pick something that looks
95
+ interesting from the [issues][ghi] list and hack on. Make sure to leave a
96
+ comment on the ticket noting that you're investigating (a simple "Taking…" is
97
+ fine).
98
+
99
+ [ghi]: http://github.com/sinatra/sinatra/issues
100
+ [ml]: http://groups.google.com/group/sinatrarb/topics "Sinatra Mailing List"
data/LICENSE CHANGED
@@ -1,5 +1,5 @@
1
1
  Copyright (c) 2007, 2008, 2009 Blake Mizerany
2
- Copyright (c) 2010, 2011, 2012, 2013, 2014 Konstantin Haase
2
+ Copyright (c) 2010, 2011, 2012, 2013, 2014, 2015, 2016 Konstantin Haase
3
3
 
4
4
  Permission is hereby granted, free of charge, to any person
5
5
  obtaining a copy of this software and associated documentation
@@ -20,4 +20,4 @@ NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
20
20
  HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
21
21
  WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
22
22
  FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
23
- OTHER DEALINGS IN THE SOFTWARE.
23
+ OTHER DEALINGS IN THE SOFTWARE.
@@ -4,7 +4,7 @@
4
4
  Umständen nicht auf dem aktuellen Stand (aktuell Sinatra 1.4.5).*
5
5
 
6
6
  Sinatra ist eine
7
- [DSL](http://de.wikipedia.org/wiki/Domänenspezifische_Sprache), die das
7
+ [DSL](https://de.wikipedia.org/wiki/Domänenspezifische_Sprache), die das
8
8
  schnelle Erstellen von Webanwendungen in Ruby mit minimalem Aufwand
9
9
  ermöglicht:
10
10
 
@@ -111,6 +111,7 @@ aufgerufen werden.
111
111
  * [Anfrage- oder Instanz-Scope](#anfrage--oder-instanz-scope)
112
112
  * [Delegation-Scope](#delegation-scope)
113
113
  * [Kommandozeile](#kommandozeile)
114
+ * [Multi-Threading](#multi-threading)
114
115
  * [Systemanforderungen](#systemanforderungen)
115
116
  * [Der neuste Stand (The Bleeding Edge)](#der-neuste-stand-the-bleeding-edge)
116
117
  * [Mit Bundler](#mit-bundler)
@@ -219,15 +220,15 @@ end
219
220
  Routen-Muster können auch mit optionalen Parametern ausgestattet werden:
220
221
 
221
222
  ```ruby
222
- get '/posts.?:format?' do
223
- # passt auf "GET /posts" sowie jegliche Erweiterung
224
- # wie "GET /posts.json", "GET /posts.xml" etc.
223
+ get '/posts/:format?' do
224
+ # passt auf "GET /posts/" sowie jegliche Erweiterung
225
+ # wie "GET /posts/json", "GET /posts/xml" etc.
225
226
  end
226
227
  ```
227
228
 
228
229
  Routen können auch den query-Parameter verwenden:
229
230
 
230
- ``` ruby
231
+ ```ruby
231
232
  get '/posts' do
232
233
  # matches "GET /posts?title=foo&author=bar"
233
234
  title = params['title']
@@ -527,7 +528,7 @@ Rendering-Methoden rendern jeden String direkt.
527
528
 
528
529
  ### Direkte Templates
529
530
 
530
- ``` ruby
531
+ ```ruby
531
532
  get '/' do
532
533
  haml '%div.title Hallo Welt'
533
534
  end
@@ -607,7 +608,7 @@ Nimmt ebenso einen Block für Inline-Templates entgegen (siehe Beispiel).
607
608
  <table>
608
609
  <tr>
609
610
  <td>Abhängigkeit</td>
610
- <td><a href="http://nokogiri.org/">nokogiri</a></td>
611
+ <td><a href="http://www.nokogiri.org/">nokogiri</a></td>
611
612
  </tr>
612
613
  <tr>
613
614
  <td>Dateierweiterung</td>
@@ -662,7 +663,7 @@ Nimmt ebenso einen Block für Inline-Templates entgegen (siehe Beispiel).
662
663
  <table>
663
664
  <tr>
664
665
  <td>Abhängigkeit</td>
665
- <td><a href="http://www.lesscss.org/">less</a></td>
666
+ <td><a href="http://lesscss.org/">less</a></td>
666
667
  </tr>
667
668
  <tr>
668
669
  <td>Dateierweiterung</td>
@@ -680,7 +681,7 @@ Nimmt ebenso einen Block für Inline-Templates entgegen (siehe Beispiel).
680
681
  <table>
681
682
  <tr>
682
683
  <td>Abhängigkeit</td>
683
- <td><a href="http://www.liquidmarkup.org/">liquid</a></td>
684
+ <td><a href="http://liquidmarkup.org/">liquid</a></td>
684
685
  </tr>
685
686
  <tr>
686
687
  <td>Dateierweiterung</td>
@@ -702,7 +703,7 @@ denen man Variablen weitergibt.
702
703
  <tr>
703
704
  <td>Abhängigkeit</td>
704
705
  <td>Eine der folgenden Bibliotheken:
705
- <a href="https://github.com/rtomayko/rdiscount" title="RDiscount">RDiscount</a>,
706
+ <a href="https://github.com/davidfstr/rdiscount" title="RDiscount">RDiscount</a>,
706
707
  <a href="https://github.com/vmg/redcarpet" title="RedCarpet">RedCarpet</a>,
707
708
  <a href="http://deveiate.org/projects/BlueCloth" title="BlueCloth">BlueCloth</a>,
708
709
  <a href="http://kramdown.gettalong.org/" title="kramdown">kramdown</a> oder
@@ -862,7 +863,7 @@ man üblicherweise locals verwenden wollen, mit denen man Variablen weitergibt.
862
863
  <table>
863
864
  <tr>
864
865
  <td>Abhängigkeit</td>
865
- <td><a href="http://markaby.github.com/">markaby</a></td>
866
+ <td><a href="http://markaby.github.io/">markaby</a></td>
866
867
  </tr>
867
868
  <tr>
868
869
  <td>Dateierweiterung</td>
@@ -969,14 +970,14 @@ Da man aus dem Mediawiki-Template heraus keine Ruby-Methoden aufrufen und auch
969
970
  keine locals verwenden kann, wird man Mediawiki üblicherweise in Kombination mit
970
971
  anderen Renderern verwenden wollen:
971
972
 
972
- ``` ruby
973
+ ```ruby
973
974
  erb :overview, :locals => { :text => mediawiki(:introduction) }
974
975
  ```
975
976
 
976
977
  Beachte: Man kann die `mediawiki`-Methode auch aus anderen Templates
977
978
  heraus aufrufen:
978
979
 
979
- ``` ruby
980
+ ```ruby
980
981
  %h1 Grüße von Haml!
981
982
  %p= mediawiki(:greetings)
982
983
  ```
@@ -1010,7 +1011,7 @@ Templates zu verwenden und einen anderen für das Layout, indem die
1010
1011
  <tr>
1011
1012
  <td>Abhängigkeit</td>
1012
1013
  <td>
1013
- <a href="https://github.com/lucasmazza/ruby-stylus" title="Ruby Stylus">
1014
+ <a href="https://github.com/forgecrafted/ruby-stylus" title="Ruby Stylus">
1014
1015
  Stylus
1015
1016
  </a> und eine Möglichkeit
1016
1017
  <a href="https://github.com/sstephenson/execjs/blob/master/README.md#readme" title="ExecJS">
@@ -1031,7 +1032,7 @@ Templates zu verwenden und einen anderen für das Layout, indem die
1031
1032
  Um Stylus-Templates ausführen zu können, müssen `stylus` und `stylus/tilt`
1032
1033
  zuerst geladen werden:
1033
1034
 
1034
- ``` ruby
1035
+ ```ruby
1035
1036
  require 'sinatra'
1036
1037
  require 'stylus'
1037
1038
  require 'stylus/tilt'
@@ -1068,7 +1069,7 @@ end
1068
1069
  Die Template-Quelle wird als Ruby-String evaluiert. Die daraus resultierende
1069
1070
  json Variable wird mit Hilfe von `#to_json` umgewandelt:
1070
1071
 
1071
- ``` ruby
1072
+ ```ruby
1072
1073
  json = { :foo => 'bar' }
1073
1074
  json[:baz] = key
1074
1075
  ```
@@ -1076,7 +1077,7 @@ json[:baz] = key
1076
1077
  Die `:callback` und `:variable` Optionen können mit dem gerenderten Objekt
1077
1078
  verwendet werden:
1078
1079
 
1079
- ``` javascript
1080
+ ```javascript
1080
1081
  var resource = {"foo":"bar","baz":"qux"};
1081
1082
  present(resource);
1082
1083
  ```
@@ -1134,7 +1135,7 @@ Ein Layout ist üblicherweise ein Template, das ein `yield` aufruft. Ein solches
1134
1135
  Template kann entweder wie oben beschrieben über die `:template` Option
1135
1136
  verwendet werden oder mit einem Block gerendert werden:
1136
1137
 
1137
- ``` ruby
1138
+ ```ruby
1138
1139
  erb :post, :layout => false do
1139
1140
  erb :index
1140
1141
  end
@@ -1145,7 +1146,7 @@ Dieser Code entspricht weitestgehend `erb :index, :layout => :post`.
1145
1146
  Blöcke an Render-Methoden weiterzugeben ist besonders bei verschachtelten
1146
1147
  Layouts hilfreich:
1147
1148
 
1148
- ``` ruby
1149
+ ```ruby
1149
1150
  erb :main_layout, :layout => false do
1150
1151
  erb :admin_layout do
1151
1152
  erb :user
@@ -1155,7 +1156,7 @@ end
1155
1156
 
1156
1157
  Der gleiche Effekt kann auch mit weniger Code erreicht werden:
1157
1158
 
1158
- ``` ruby
1159
+ ```ruby
1159
1160
  erb :admin_layout, :layout => :main_layout do
1160
1161
  erb :user
1161
1162
  end
@@ -1257,7 +1258,7 @@ Tilt zu erfahren.
1257
1258
  Um einen eigenen Mechanismus zum Aufsuchen von Templates zu
1258
1259
  implementieren, muss `#find_template` definiert werden:
1259
1260
 
1260
- ``` ruby
1261
+ ```ruby
1261
1262
  configure do
1262
1263
  set :views [ './views/a', './views/b' ]
1263
1264
  end
@@ -1395,7 +1396,7 @@ set :sessions, :domain => 'foo.com'
1395
1396
  Um eine Session mit anderen Apps und zwischen verschiedenen Subdomains
1396
1397
  von foo.com zu teilen, wird ein *.* der Domain vorangestellt:
1397
1398
 
1398
- ``` ruby
1399
+ ```ruby
1399
1400
  set :sessions, :domain => '.foo,com'
1400
1401
  ```
1401
1402
 
@@ -1539,14 +1540,14 @@ end
1539
1540
  ```
1540
1541
 
1541
1542
  Damit lassen sich Streaming-APIs realisieren, sog.
1542
- [Server Sent Events](http://dev.w3.org/html5/eventsource/), die als Basis für
1543
- [WebSockets](http://en.wikipedia.org/wiki/WebSocket) dienen. Ebenso können sie
1543
+ [Server Sent Events](https://w3c.github.io/eventsource/), die als Basis für
1544
+ [WebSockets](https://en.wikipedia.org/wiki/WebSocket) dienen. Ebenso können sie
1544
1545
  verwendet werden, um den Durchsatz zu erhöhen, wenn ein Teil der Daten von
1545
1546
  langsamen Ressourcen abhängig ist.
1546
1547
 
1547
1548
  Es ist zu beachten, dass das Verhalten beim Streaming, insbesondere die Anzahl
1548
1549
  nebenläufiger Anfragen, stark davon abhängt, welcher Webserver für die
1549
- Applikation verwendet wird. Einige Server, z.B. WEBRick, unterstützen
1550
+ Applikation verwendet wird. Einige Server unterstützen
1550
1551
  Streaming nicht oder nur teilweise. Sollte der Server Streaming nicht
1551
1552
  unterstützen, wird ein vollständiger Response-Body zurückgeschickt, sobald der
1552
1553
  an `stream` weitergegebene Block abgearbeitet ist. Mit Shotgun funktioniert
@@ -1671,7 +1672,7 @@ Weitere Parameter werden wie Argumente der `halt`-Methode behandelt:
1671
1672
 
1672
1673
  ```ruby
1673
1674
  redirect to('/bar'), 303
1674
- redirect 'http://google.com', 'Hier bist du falsch'
1675
+ redirect 'http://www.google.com/', 'Hier bist du falsch'
1675
1676
  ```
1676
1677
 
1677
1678
  Ebenso leicht lässt sich ein Schritt zurück mit dem Alias `redirect back`
@@ -1756,7 +1757,7 @@ end
1756
1757
  ```
1757
1758
 
1758
1759
  ebenso ist es möglich einen
1759
- [schwachen ETag](http://de.wikipedia.org/wiki/HTTP_ETag) zu verwenden:
1760
+ [schwachen ETag](https://de.wikipedia.org/wiki/HTTP_ETag) zu verwenden:
1760
1761
 
1761
1762
  ```ruby
1762
1763
  etag @article.sha1, :weak
@@ -2072,7 +2073,7 @@ end
2072
2073
  #### Einstellung des Angriffsschutzes
2073
2074
 
2074
2075
  Sinatra verwendet
2075
- [Rack::Protection](https://github.com/rkh/rack-protection#readme), um die
2076
+ [Rack::Protection](https://github.com/sinatra/rack-protection#readme), um die
2076
2077
  Anwendung vor häufig vorkommenden Angriffen zu schützen. Diese Voreinstellung
2077
2078
  lässt sich selbstverständlich deaktivieren, der damit verbundene
2078
2079
  Geschwindigkeitszuwachs steht aber in keinem Verhätnis zu den möglichen
@@ -2359,7 +2360,7 @@ end
2359
2360
  ```
2360
2361
 
2361
2362
  Die Semantik von `use` entspricht der gleichnamigen Methode der
2362
- [Rack::Builder](http://rubydoc.info/github/rack/rack/master/Rack/Builder)-DSL
2363
+ [Rack::Builder](http://www.rubydoc.info/github/rack/rack/master/Rack/Builder)-DSL
2363
2364
  (meist verwendet in Rackup-Dateien). Ein Beispiel dafür ist, dass die
2364
2365
  `use`-Methode mehrere/verschiedene Argumente und auch Blöcke entgegennimmt:
2365
2366
 
@@ -2382,7 +2383,7 @@ oder im [Rack wiki](https://github.com/rack/rack/wiki/List-of-Middleware).
2382
2383
  ## Testen
2383
2384
 
2384
2385
  Sinatra-Tests können mit jedem auf Rack aufbauendem Test-Framework geschrieben
2385
- werden. [Rack::Test](http://rdoc.info/github/brynary/rack-test/master/frames)
2386
+ werden. [Rack::Test](http://www.rubydoc.info/github/brynary/rack-test/master/frames)
2386
2387
  wird empfohlen:
2387
2388
 
2388
2389
  ```ruby
@@ -2463,13 +2464,13 @@ Veränderungen zu `Sinatra::Base` konvertiert werden:
2463
2464
 
2464
2465
  `Sinatra::Base` ist ein unbeschriebenes Blatt. Die meisten Optionen sind per
2465
2466
  Standard deaktiviert. Das betrifft auch den eingebauten Server. Siehe
2466
- [Optionen und Konfiguration](http://sinatra.github.com/configuration.html) für
2467
+ [Optionen und Konfiguration](http://www.sinatrarb.com/configuration.html) für
2467
2468
  Details über mögliche Optionen.
2468
2469
 
2469
2470
  Damit eine App sich ähnlich wie eine klassische App verhält, kann man
2470
2471
  auch eine Subclass von `Sinatra::Application` erstellen:
2471
2472
 
2472
- ``` ruby
2473
+ ```ruby
2473
2474
  require 'sinatra/base'
2474
2475
 
2475
2476
  class MyApp < Sinatra::Application
@@ -2540,7 +2541,7 @@ werden:
2540
2541
  <tr>
2541
2542
  <td>static</td>
2542
2543
  <td>true</td>
2543
- <td>false</td>
2544
+ <td>File.exist?(public_folder)</td>
2544
2545
  <td>true</td>
2545
2546
  </tr>
2546
2547
  </table>
@@ -2821,6 +2822,42 @@ Die Optionen sind:
2821
2822
  -x # Mutex-Lock einschalten (Standard ist off)
2822
2823
  ```
2823
2824
 
2825
+ ### Multi-threading
2826
+
2827
+ _Paraphrasiert von [dieser Antwort auf StackOverflow][so-answer] von Konstantin_
2828
+
2829
+ Sinatra erlegt kein Nebenläufigkeitsmodell auf, sondern überlässt dies dem
2830
+ selbst gewählten Rack-Proxy (Server), so wie Thin, Puma oder WEBrick.
2831
+ Sinatra selbst ist Thread-sicher, somit ist es kein Problem wenn der
2832
+ Rack-Proxy ein anderes Threading-Modell für Nebenläufigkeit benutzt.
2833
+ Das heißt, dass wenn der Server gestartet wird, dass man die korrekte
2834
+ Aufrufsmethode benutzen sollte für den jeweiligen Rack-Proxy.
2835
+ Das folgende Beispiel ist eine Veranschaulichung eines mehrprozessigen
2836
+ Thin Servers:
2837
+
2838
+ ``` ruby
2839
+ # app.rb
2840
+
2841
+ require 'sinatra/base'
2842
+
2843
+ class App < Sinatra::Base
2844
+ get '/' do
2845
+ "Hello, World"
2846
+ end
2847
+ end
2848
+
2849
+ App.run!
2850
+
2851
+ ```
2852
+
2853
+ Um den Server zu starten, führt man das folgende Kommando aus:
2854
+
2855
+ ``` shell
2856
+ thin --threaded start
2857
+ ```
2858
+
2859
+ [so-answer]: http://stackoverflow.com/questions/6278817/is-sinatra-multi-threaded/6282999#6282999)
2860
+
2824
2861
  ## Systemanforderungen
2825
2862
 
2826
2863
  Die folgenden Versionen werden offiziell unterstützt:
@@ -2889,7 +2926,7 @@ gem install sinatra --pre
2889
2926
  ### Mit Bundler
2890
2927
 
2891
2928
  Wenn die Applikation mit der neuesten Version von Sinatra und
2892
- [Bundler](http://gembundler.com/) genutzt werden soll, empfehlen wir den
2929
+ [Bundler](http://bundler.io) genutzt werden soll, empfehlen wir den
2893
2930
  nachfolgenden Weg.
2894
2931
 
2895
2932
  Soweit Bundler noch nicht installiert ist:
@@ -2976,12 +3013,12 @@ SemVer und SemVerTag.
2976
3013
 
2977
3014
  ## Mehr
2978
3015
 
2979
- * [Projekt-Website](http://sinatra.github.com/) - Ergänzende Dokumentation,
3016
+ * [Projekt-Website](http://www.sinatrarb.com/) - Ergänzende Dokumentation,
2980
3017
  News und Links zu anderen Ressourcen.
2981
- * [Mitmachen](http://sinatra.github.com/contributing.html) - Einen Fehler
3018
+ * [Mitmachen](http://www.sinatrarb.com/contributing.html) - Einen Fehler
2982
3019
  gefunden? Brauchst du Hilfe? Hast du einen Patch?
2983
- * [Issue-Tracker](http://github.com/sinatra/sinatra/issues)
2984
- * [Twitter](http://twitter.com/sinatra)
3020
+ * [Issue-Tracker](https://github.com/sinatra/sinatra/issues)
3021
+ * [Twitter](https://twitter.com/sinatra)
2985
3022
  * [Mailing-Liste](http://groups.google.com/group/sinatrarb)
2986
3023
  * [#sinatra](irc://chat.freenode.net/#sinatra) auf http://freenode.net Es
2987
3024
  gibt dort auch immer wieder deutschsprachige Entwickler, die gerne weiterhelfen.
@@ -2989,6 +3026,6 @@ SemVer und SemVerTag.
2989
3026
  * [Sinatra Recipes](http://recipes.sinatrarb.com/) Sinatra-Rezepte aus der
2990
3027
  Community
2991
3028
  * API Dokumentation für die [aktuelle
2992
- Version](http://rubydoc.info/gems/sinatra) oder für
2993
- [HEAD](http://rubydoc.info/github/sinatra/sinatra) auf http://rubydoc.info
2994
- * [CI Server](http://travis-ci.org/sinatra/sinatra)
3029
+ Version](http://www.rubydoc.info//gems/sinatra) oder für
3030
+ [HEAD](http://www.rubydoc.info/github/sinatra/sinatra) auf http://rubydoc.info
3031
+ * [CI Server](https://travis-ci.org/sinatra/sinatra)