sinatra 1.4.6 → 2.0.0

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.

Files changed (125) hide show
  1. checksums.yaml +4 -4
  2. data/AUTHORS.md +5 -2
  3. data/{CHANGES → CHANGELOG.md} +126 -46
  4. data/CONTRIBUTING.md +100 -0
  5. data/Gemfile +12 -17
  6. data/LICENSE +5 -2
  7. data/MAINTENANCE.md +42 -0
  8. data/README.de.md +711 -466
  9. data/README.es.md +206 -171
  10. data/README.fr.md +370 -344
  11. data/README.hu.md +44 -10
  12. data/README.ja.md +300 -210
  13. data/README.ko.md +230 -191
  14. data/README.md +675 -528
  15. data/README.pt-br.md +149 -115
  16. data/README.pt-pt.md +65 -65
  17. data/README.ru.md +198 -97
  18. data/README.zh.md +1943 -1237
  19. data/Rakefile +72 -49
  20. data/SECURITY.md +35 -0
  21. data/lib/sinatra/base.rb +141 -207
  22. data/lib/sinatra/indifferent_hash.rb +150 -0
  23. data/lib/sinatra/main.rb +1 -0
  24. data/lib/sinatra/show_exceptions.rb +70 -56
  25. data/lib/sinatra/version.rb +1 -1
  26. data/sinatra.gemspec +19 -7
  27. metadata +32 -163
  28. data/test/asciidoctor_test.rb +0 -72
  29. data/test/base_test.rb +0 -167
  30. data/test/builder_test.rb +0 -91
  31. data/test/coffee_test.rb +0 -96
  32. data/test/compile_test.rb +0 -183
  33. data/test/contest.rb +0 -91
  34. data/test/creole_test.rb +0 -65
  35. data/test/delegator_test.rb +0 -160
  36. data/test/encoding_test.rb +0 -20
  37. data/test/erb_test.rb +0 -116
  38. data/test/extensions_test.rb +0 -98
  39. data/test/filter_test.rb +0 -487
  40. data/test/haml_test.rb +0 -109
  41. data/test/helper.rb +0 -132
  42. data/test/helpers_test.rb +0 -1917
  43. data/test/integration/app.rb +0 -79
  44. data/test/integration_helper.rb +0 -236
  45. data/test/integration_test.rb +0 -104
  46. data/test/less_test.rb +0 -69
  47. data/test/liquid_test.rb +0 -77
  48. data/test/mapped_error_test.rb +0 -285
  49. data/test/markaby_test.rb +0 -80
  50. data/test/markdown_test.rb +0 -85
  51. data/test/mediawiki_test.rb +0 -68
  52. data/test/middleware_test.rb +0 -68
  53. data/test/nokogiri_test.rb +0 -67
  54. data/test/public/favicon.ico +0 -0
  55. data/test/rabl_test.rb +0 -89
  56. data/test/rack_test.rb +0 -45
  57. data/test/radius_test.rb +0 -59
  58. data/test/rdoc_test.rb +0 -66
  59. data/test/readme_test.rb +0 -130
  60. data/test/request_test.rb +0 -100
  61. data/test/response_test.rb +0 -63
  62. data/test/result_test.rb +0 -76
  63. data/test/route_added_hook_test.rb +0 -59
  64. data/test/routing_test.rb +0 -1412
  65. data/test/sass_test.rb +0 -115
  66. data/test/scss_test.rb +0 -88
  67. data/test/server_test.rb +0 -56
  68. data/test/settings_test.rb +0 -582
  69. data/test/sinatra_test.rb +0 -12
  70. data/test/slim_test.rb +0 -102
  71. data/test/static_test.rb +0 -236
  72. data/test/streaming_test.rb +0 -149
  73. data/test/stylus_test.rb +0 -90
  74. data/test/templates_test.rb +0 -382
  75. data/test/textile_test.rb +0 -65
  76. data/test/views/a/in_a.str +0 -1
  77. data/test/views/ascii.erb +0 -2
  78. data/test/views/b/in_b.str +0 -1
  79. data/test/views/calc.html.erb +0 -1
  80. data/test/views/error.builder +0 -3
  81. data/test/views/error.erb +0 -3
  82. data/test/views/error.haml +0 -3
  83. data/test/views/error.sass +0 -2
  84. data/test/views/explicitly_nested.str +0 -1
  85. data/test/views/foo/hello.test +0 -1
  86. data/test/views/hello.asciidoc +0 -1
  87. data/test/views/hello.builder +0 -1
  88. data/test/views/hello.coffee +0 -1
  89. data/test/views/hello.creole +0 -1
  90. data/test/views/hello.erb +0 -1
  91. data/test/views/hello.haml +0 -1
  92. data/test/views/hello.less +0 -5
  93. data/test/views/hello.liquid +0 -1
  94. data/test/views/hello.mab +0 -1
  95. data/test/views/hello.md +0 -1
  96. data/test/views/hello.mediawiki +0 -1
  97. data/test/views/hello.nokogiri +0 -1
  98. data/test/views/hello.rabl +0 -2
  99. data/test/views/hello.radius +0 -1
  100. data/test/views/hello.rdoc +0 -1
  101. data/test/views/hello.sass +0 -2
  102. data/test/views/hello.scss +0 -3
  103. data/test/views/hello.slim +0 -1
  104. data/test/views/hello.str +0 -1
  105. data/test/views/hello.styl +0 -2
  106. data/test/views/hello.test +0 -1
  107. data/test/views/hello.textile +0 -1
  108. data/test/views/hello.wlang +0 -1
  109. data/test/views/hello.yajl +0 -1
  110. data/test/views/layout2.builder +0 -3
  111. data/test/views/layout2.erb +0 -2
  112. data/test/views/layout2.haml +0 -2
  113. data/test/views/layout2.liquid +0 -2
  114. data/test/views/layout2.mab +0 -2
  115. data/test/views/layout2.nokogiri +0 -3
  116. data/test/views/layout2.rabl +0 -3
  117. data/test/views/layout2.radius +0 -2
  118. data/test/views/layout2.slim +0 -3
  119. data/test/views/layout2.str +0 -2
  120. data/test/views/layout2.test +0 -1
  121. data/test/views/layout2.wlang +0 -2
  122. data/test/views/nested.str +0 -1
  123. data/test/views/utf8.erb +0 -2
  124. data/test/wlang_test.rb +0 -87
  125. data/test/yajl_test.rb +0 -86
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: ab40363a01800a6eca6fbfd31a92a7bc82eb6324
4
- data.tar.gz: 8eb57d7e6f169ce4a8671fb1211c65516ddb21ec
3
+ metadata.gz: fcc61f758e37e82a6ba459dd28ac0427d1e293aa
4
+ data.tar.gz: 89da52018e78be121896892c8f1bd2786048c191
5
5
  SHA512:
6
- metadata.gz: 058b79bc51a5b1e85a9343cfa5552a0f646ebd429721b89101b2b245c491dabe157c0719d82fc85f74193d094d61c62e9b91c0e401dd4dcef5c92292b021e5be
7
- data.tar.gz: 05ff1ebc8d85c01b95b17347717e7d0a9da61f3205b36588b9d4228d3373c036549dd0e86c6961a37ce6a70c8bf3f7cb23fceb0d49b5c83cf445a2eb7d206e06
6
+ metadata.gz: eedfb95c98ca07e7522e60437f6e7a373b569124bf513a456f9ffc679af95b58e1c0368d08ea76085ae7ea9315947dcf956ba4d07c752ad111533a24a65d7b9e
7
+ data.tar.gz: 298a3ccc3bc242b195c8788efc65e94f45274634f5e04cc7f679fd407fa9c0cff2844de338d08369f8e11452da84293a9fe12c4fdbe898c5eeeef6258cbf725a
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,84 @@
1
- = 1.4.6 / 2015-03-2x
1
+ ## 2.0.0 / 2017-04-10
2
+
3
+ * Use Mustermann for patterns #1086 by Konstantin Haase
4
+
5
+ * Server now provides `-q` flag for quiet mode, which disables start/stop messages #1153 by Vasiliy.
6
+
7
+ * Session middleware can now be specified with `:session_store` setting #1161 by Jordan Owens.
8
+
9
+ * `APP_ENV` is now preferred and recommended over `RACK_ENV` for setting environment #984 by Damien Mathieu.
10
+
11
+ * Add Reel support #793 by Patricio Mac Adden.
12
+
13
+ * Make route params available during error handling #895 by Jeremy Evans.
14
+
15
+ * Unify `not_found` and `error` 404 behavior #896 by Jeremy Evans.
16
+
17
+ * Enable Ruby 2.3 `frozen_string_literal` feature #1076 by Vladimir Kochnev.
18
+
19
+ * Add Sinatra::ShowExceptions::TEMPLATE and patched Rack::ShowExceptions to prefer Sinatra template by Zachary Scott.
20
+
21
+ * Sinatra::Runner is used internally for integration tests #840 by Nick Sutterer.
22
+
23
+ * Fix case-sensitivity issue in `uri` method #889 by rennex.
24
+
25
+ * Use `Rack::Utils.status_code` to allow `status` helper to use symbol as well as numeric codes #968 by Tobias H. Michaelsen.
26
+
27
+ * Improved error handling for invalid params through Rack #1070 by Jordan Owens.
28
+
29
+ * Ensure template is cached only once #1021 by Patrik Rak.
30
+
31
+ * Rack middleware is initialized at server runtime rather than after receiving first request #1205 by Itamar Turner-Trauring.
32
+
33
+ * Improve Session Secret documentation to encourage better security practices #1218 by Glenn Rempe
34
+
35
+ * Exposed global and per-route options for Mustermann route parsing #1233 by Mike Pastore
36
+
37
+ * Use same `session_secret` for classic and modular apps in development #1245 by Marcus Stollsteimer
38
+
39
+ * Make authenticity token length a fixed value of 32 #1181 by Jordan Owens
40
+
41
+ * Modernize Rack::Protection::ContentSecurityPolicy with CSP Level 2 and 3 Directives #1202 by Glenn Rempe
42
+
43
+ * Adds preload option to Rack:Protection:StrictTransport #1209 by Ed Robinson
44
+
45
+ * Improve BadRequest logic. Raise and handle exceptions if status is 400 #1212 by Mike Pastore
46
+
47
+ * Make Rack::Test a development dependency #1232 by Mike Pastore
48
+
49
+ * Capture exception messages of raised NotFound and BadRequest #1210 by Mike Pastore
50
+
51
+ * Add explicit set method to contrib/cookies to override cookie settings #1240 by Andrew Allen
52
+
53
+ * Avoid executing filters even if prefix matches with other namespace #1253 by namusyaka
54
+
55
+ * Make `#has_key?` also indifferent in access, can accept String or Symbol #1262 by John Hope
56
+
57
+ * Add `allow_if` option to bypass json csrf protection #1265 by Jordan Owens
58
+
59
+ * rack-protection: Bundle StrictTransport, CookieTossing, and CSP #1267 by Mike Pastore
60
+
61
+ * Add `:strict_paths` option for managing trailing slashes #1273 by namusyaka
62
+
63
+ * Add full IndifferentHash implementation to params #1279 by Mike Pastore
64
+
65
+ ## 1.4.7 / 2016-01-24
66
+
67
+ * Add Ashley Williams, Trevor Bramble, and Kashyap Kondamudi to team Sinatra.
68
+
69
+ * Correctly handle encoded colons in routes. (Jeremy Evans)
70
+
71
+ * Rename CHANGES to CHANGELOG.md and update Rakefile. #1043 (Eliza Sorensen)
72
+
73
+ * Improve documentation. #941, #1069, #1075, #1025, #1052 (Many great folks)
74
+
75
+ * Introduce `Sinatra::Ext` to workaround Rack 1.6 bug to fix Ruby 1.8.7
76
+ support. #1080 (Zachary Scott)
77
+
78
+ * Add CONTRIBUTING guide. #987 (Katrina Owen)
79
+
80
+
81
+ ## 1.4.6 / 2015-03-23
2
82
 
3
83
  * Improve tests and documentation. (Darío Hereñú, Seiichi Yonezawa, kyoendo,
4
84
  John Voloski, Ferenc-, Renaud Martinet, Christian Haase, marocchino,
@@ -28,7 +108,7 @@
28
108
  * Upgrade test suite to Minitest version 5 and fix Ruby 2.2 compatibility.
29
109
  (Vipul A M)
30
110
 
31
- = 1.4.5 / 2014-04-08
111
+ ## 1.4.5 / 2014-04-08
32
112
 
33
113
  * Improve tests and documentation. (Seiichi Yonezawa, Mike Gehard, Andrew
34
114
  Deitrick, Matthew Nicholas Bradley, GoGo tanaka, Carlos Lazo, Shim Tw,
@@ -45,7 +125,7 @@
45
125
 
46
126
  * Fix bug in request.accept? that might trigger a NoMethodError. (sbonami)
47
127
 
48
- = 1.4.4 / 2013-10-21
128
+ ## 1.4.4 / 2013-10-21
49
129
 
50
130
  * Allow setting layout to false specifically for a single rendering engine.
51
131
  (Matt Wildig)
@@ -80,7 +160,7 @@
80
160
 
81
161
  * Reduce file size of dev mode images for 404 and 500 pages. (Francis Go)
82
162
 
83
- = 1.4.3 / 2013-06-07
163
+ ## 1.4.3 / 2013-06-07
84
164
 
85
165
  * Running a Sinatra file directly or via `run!` it will now ignore an
86
166
  empty $PORT env variable. (noxqsgit)
@@ -101,7 +181,7 @@
101
181
 
102
182
  * Request#accept? now returns true instead of a truthy value. (Alan Harris)
103
183
 
104
- = 1.4.2 / 2013-03-21
184
+ ## 1.4.2 / 2013-03-21
105
185
 
106
186
  * Fix parsing error for case where both the pattern and the captured part
107
187
  contain a dot. (Florian Hanke, Konstantin Haase)
@@ -110,11 +190,11 @@
110
190
 
111
191
  * Improve documentation. (Patricio Mac Adden, Joe Bottigliero)
112
192
 
113
- = 1.4.1 / 2013-03-15
193
+ ## 1.4.1 / 2013-03-15
114
194
 
115
195
  * Make delegated methods available in config.ru (Konstantin Haase)
116
196
 
117
- = 1.4.0 / 2013-03-15
197
+ ## 1.4.0 / 2013-03-15
118
198
 
119
199
  * Add support for LINK and UNLINK requests. (Konstantin Haase)
120
200
 
@@ -148,9 +228,9 @@
148
228
  halt in a before filter or route. (Konstantin Haase)
149
229
 
150
230
  * Sinatra::Base.new now returns a Sinatra::Wrapper instance, exposing
151
- #settings and #helpers, yet going through the middleware stack on #call.
152
- It also implements a nice #inspect, so it plays nice with Rails' `rake
153
- routes`. (Konstantin Haase)
231
+ `#settings` and `#helpers`, yet going through the middleware stack on
232
+ `#call`. It also implements a nice `#inspect`, so it plays nice with
233
+ Rails' `rake routes`. (Konstantin Haase)
154
234
 
155
235
  * In addition to WebRick, Thin and Mongrel, Sinatra will now automatically pick
156
236
  up Puma, Trinidad, ControlTower or Net::HTTP::Server when installed. The
@@ -235,7 +315,7 @@
235
315
  * Exceptions in `after` filter are now handled like any other exception.
236
316
  (Nathan Esquenazi)
237
317
 
238
- = 1.3.6 (backport release) / 2013-03-15
318
+ ## 1.3.6 (backport release) / 2013-03-15
239
319
 
240
320
  Backported from 1.4.0:
241
321
 
@@ -245,7 +325,7 @@ Backported from 1.4.0:
245
325
 
246
326
  * No longer override `define_singleton_method`. (Konstantin Haase)
247
327
 
248
- = 1.3.5 / 2013-02-25
328
+ ## 1.3.5 / 2013-02-25
249
329
 
250
330
  * Fix for RubyGems 2.0 (Uchio KONDO)
251
331
 
@@ -253,7 +333,7 @@ Backported from 1.4.0:
253
333
 
254
334
  * No longer override `define_singleton_method`. (Konstantin Haase)
255
335
 
256
- = 1.3.4 / 2013-01-26
336
+ ## 1.3.4 / 2013-01-26
257
337
 
258
338
  * Improve documentation. (Kashyap, Stanislav Chistenko, Konstantin Haase,
259
339
  ymmtmsys, Anurag Priyam)
@@ -270,7 +350,7 @@ Backported from 1.4.0:
270
350
  * Status, headers and body will be set correctly in an after filter when using
271
351
  halt in a before filter or route. (Konstantin Haase)
272
352
 
273
- = 1.3.3 / 2012-08-19
353
+ ## 1.3.3 / 2012-08-19
274
354
 
275
355
  * Improved documentation. (burningTyger, Konstantin Haase, Gabriel Andretta,
276
356
  Anurag Priyam, michelc)
@@ -297,7 +377,7 @@ Backported from 1.4.0:
297
377
  * When protecting against CSRF attacks, drop the session instead of refusing
298
378
  the request. (Konstantin Haase)
299
379
 
300
- = 1.3.2 / 2011-12-30
380
+ ## 1.3.2 / 2011-12-30
301
381
 
302
382
  * Don't automatically add `Rack::CommonLogger` if `Rack::Server` is adding it,
303
383
  too. (Konstantin Haase)
@@ -324,7 +404,7 @@ Backported from 1.4.0:
324
404
 
325
405
  * Improved MagLev support. (Tim Felgentreff)
326
406
 
327
- = 1.3.1 / 2011-10-05
407
+ ## 1.3.1 / 2011-10-05
328
408
 
329
409
  * Support adding more than one callback to the stream object. (Konstantin
330
410
  Haase)
@@ -332,7 +412,7 @@ Backported from 1.4.0:
332
412
  * Fix for infinite loop when streaming on 1.9.2 with Thin from a modular
333
413
  application (Konstantin Haase)
334
414
 
335
- = 1.3.0 / 2011-09-30
415
+ ## 1.3.0 / 2011-09-30
336
416
 
337
417
  * Added `stream` helper method for easily creating streaming APIs, Server
338
418
  Sent Events or even WebSockets. See README for more on that topic.
@@ -459,7 +539,7 @@ Backported from 1.4.0:
459
539
  * Fix handling of broken query params when displaying exceptions. (Luke
460
540
  Jahnke)
461
541
 
462
- = 1.2.9 (backports release) / 2013-03-15
542
+ ## 1.2.9 (backports release) / 2013-03-15
463
543
 
464
544
  IMPORTANT: THIS IS THE LAST 1.2.x RELEASE, PLEASE UPGRADE.
465
545
 
@@ -473,14 +553,14 @@ IMPORTANT: THIS IS THE LAST 1.2.x RELEASE, PLEASE UPGRADE.
473
553
 
474
554
  * Add backports library so we can still run on Ruby 1.8.6. (Konstantin Haase)
475
555
 
476
- = 1.2.8 (backports release) / 2011-12-30
556
+ ## 1.2.8 (backports release) / 2011-12-30
477
557
 
478
558
  Backported from 1.3.2:
479
559
 
480
560
  * Fix bug where rendering a second template in the same request after the
481
561
  first one raised an exception skipped the default layout (Nathan Baum)
482
562
 
483
- = 1.2.7 (backports release) / 2011-09-30
563
+ ## 1.2.7 (backports release) / 2011-09-30
484
564
 
485
565
  Custom changes:
486
566
 
@@ -513,16 +593,16 @@ Backported from 1.3.0:
513
593
  * Fix handling of broken query params when displaying exceptions. (Luke
514
594
  Jahnke)
515
595
 
516
- = 1.2.6 / 2011-05-01
596
+ ## 1.2.6 / 2011-05-01
517
597
 
518
598
  * Fix broken delegation, backport delegation tests from Sinatra 1.3.
519
599
  (Konstantin Haase)
520
600
 
521
- = 1.2.5 / 2011-04-30
601
+ ## 1.2.5 / 2011-04-30
522
602
 
523
603
  * Restore compatibility with Ruby 1.8.6. (Konstantin Haase)
524
604
 
525
- = 1.2.4 / 2011-04-30
605
+ ## 1.2.4 / 2011-04-30
526
606
 
527
607
  * Sinatra::Application (classic style) does not use a session secret in
528
608
  development mode, so sessions are not invalidated after every request when
@@ -546,7 +626,7 @@ Backported from 1.3.0:
546
626
  * Remove HEAD request logic and let Rack::Head handle it instead. (Paolo
547
627
  "Nusco" Perrotta)
548
628
 
549
- = 1.2.3 / 2011-04-13
629
+ ## 1.2.3 / 2011-04-13
550
630
 
551
631
  * This release is compatible with Tilt 1.3, it will still work with Tilt 1.2.2,
552
632
  however, if you want to use a newer Tilt version, you have to upgrade to at
@@ -555,7 +635,7 @@ Backported from 1.3.0:
555
635
  * Helpers dealing with time, like `expires`, handle objects that pretend to be
556
636
  numbers, like `ActiveSupport::Duration`, better. (Konstantin Haase)
557
637
 
558
- = 1.2.2 / 2011-04-08
638
+ ## 1.2.2 / 2011-04-08
559
639
 
560
640
  * The `:provides => :js` condition now matches both `application/javascript`
561
641
  and `text/javascript`. The `:provides => :xml` condition now matches both
@@ -583,7 +663,7 @@ Backported from 1.3.0:
583
663
  * In development environment, when running under a nested path, the image URIs
584
664
  on the error pages are set properly. (Konstantin Haase)
585
665
 
586
- = 1.2.1 / 2011-03-17
666
+ ## 1.2.1 / 2011-03-17
587
667
 
588
668
  * Use a generated session secret when using `enable :sessions`. (Konstantin
589
669
  Haase)
@@ -596,7 +676,7 @@ Backported from 1.3.0:
596
676
  * README translations improved (Gabriel Andretta, burningTyger, Sylvain Desvé,
597
677
  Gregor Schmidt)
598
678
 
599
- = 1.2.0 / 2011-03-03
679
+ ## 1.2.0 / 2011-03-03
600
680
 
601
681
  * Added `slim` rendering method for rendering Slim templates. (Steve
602
682
  Hodgkiss)
@@ -645,11 +725,11 @@ Backported from 1.3.0:
645
725
  * Sinatra now ships with a Gemfile for development dependencies, since it eases
646
726
  supporting different platforms, like JRuby. (Konstantin Haase)
647
727
 
648
- = 1.1.4 (backports release) / 2011-04-13
728
+ ## 1.1.4 (backports release) / 2011-04-13
649
729
 
650
730
  * Compatible with Tilt 1.3. (Konstantin Haase)
651
731
 
652
- = 1.1.3 / 2011-02-20
732
+ ## 1.1.3 / 2011-02-20
653
733
 
654
734
  * Fixed issues with `user_agent` condition if the user agent header is missing.
655
735
  (Konstantin Haase)
@@ -668,11 +748,11 @@ Backported from 1.3.0:
668
748
  a rendering engine - it was not possible to register ".html.erb" without
669
749
  tricks. (Konstantin Haase)
670
750
 
671
- = 1.1.2 / 2010-10-25
751
+ ## 1.1.2 / 2010-10-25
672
752
 
673
753
  Like 1.1.1, but with proper CHANGES file.
674
754
 
675
- = 1.1.1 / 2010-10-25
755
+ ## 1.1.1 / 2010-10-25
676
756
 
677
757
  * README has been translated to Russian (Nickolay Schwarz, Vasily Polovnyov)
678
758
  and Portuguese (Luciano Sousa).
@@ -704,7 +784,7 @@ Like 1.1.1, but with proper CHANGES file.
704
784
  honor default_encoding and URLs support unicode characters. (Konstantin
705
785
  Haase)
706
786
 
707
- = 1.1.0 / 2010-10-24
787
+ ## 1.1.0 / 2010-10-24
708
788
 
709
789
  * Before and after filters now support pattern matching, including the
710
790
  ability to use captures: "before('/user/:name') { |name| ... }". This
@@ -810,7 +890,7 @@ Like 1.1.1, but with proper CHANGES file.
810
890
  * Sinatra now depends on Rack 1.1 or higher. Rack 1.0 is no longer supported.
811
891
  (Konstantin Haase)
812
892
 
813
- = 1.0 / 2010-03-23
893
+ ## 1.0 / 2010-03-23
814
894
 
815
895
  * It's now possible to register blocks to run after each request using
816
896
  after filters. After filters run at the end of each request, after
@@ -953,7 +1033,7 @@ the 1.0 release:
953
1033
  * The `:methodoverride' option to enable/disable the POST _method hack is
954
1034
  obsolete; use `:method_override` instead.
955
1035
 
956
- = 0.9.2 / 2009-05-18
1036
+ ## 0.9.2 / 2009-05-18
957
1037
 
958
1038
  * This version is compatible with Rack 1.0. [Rein Henrichs]
959
1039
 
@@ -1034,12 +1114,12 @@ the 1.0 release:
1034
1114
  * Fix in-file templates __END__ detection when __END__ exists with
1035
1115
  other stuff on a line [Yoji Shidara]
1036
1116
 
1037
- = 0.9.1.1 / 2009-03-09
1117
+ ## 0.9.1.1 / 2009-03-09
1038
1118
 
1039
1119
  * Fix directory traversal vulnerability in default static files
1040
1120
  route. See [#177] for more info.
1041
1121
 
1042
- = 0.9.1 / 2009-03-01
1122
+ ## 0.9.1 / 2009-03-01
1043
1123
 
1044
1124
  * Sinatra now runs under Ruby 1.9.1 [#61]
1045
1125
 
@@ -1109,7 +1189,7 @@ the 1.0 release:
1109
1189
  * Fixed that "." in route patterns erroneously matched any character
1110
1190
  instead of a literal ".". [#124]
1111
1191
 
1112
- = 0.9.0.4 / 2009-01-25
1192
+ ## 0.9.0.4 / 2009-01-25
1113
1193
 
1114
1194
  * Using halt with more than 1 args causes ArgumentError [#131]
1115
1195
  * using halt in a before filter doesn't modify response [#127]
@@ -1118,7 +1198,7 @@ the 1.0 release:
1118
1198
  * Preserve non-nested params in nested params hash [#117]
1119
1199
  * Fix backtrace dump with Rack::Lint [#116]
1120
1200
 
1121
- = 0.9.0.3 / 2009-01-21
1201
+ ## 0.9.0.3 / 2009-01-21
1122
1202
 
1123
1203
  * Fall back on mongrel then webrick when thin not found. [#75]
1124
1204
  * Use :environment instead of :env in test helpers to
@@ -1127,12 +1207,12 @@ the 1.0 release:
1127
1207
  * Fix app_file detection on windows [#118]
1128
1208
  * Fix static files with Rack::Lint in pipeline [#121]
1129
1209
 
1130
- = 0.9.0.2 / 2009-01-18
1210
+ ## 0.9.0.2 / 2009-01-18
1131
1211
 
1132
1212
  * Halting a before block should stop processing of routes [#85]
1133
1213
  * Fix redirect/halt in before filters [#85]
1134
1214
 
1135
- = 0.9.0 / 2009-01-18
1215
+ ## 0.9.0 / 2009-01-18
1136
1216
 
1137
1217
  * Works with and requires Rack >= 0.9.1
1138
1218
 
@@ -1225,7 +1305,7 @@ the 1.0 release:
1225
1305
  subclass of Sinatra::Base; each request is processed within an
1226
1306
  instance.
1227
1307
 
1228
- = 0.3.3 / 2009-01-06
1308
+ ## 0.3.3 / 2009-01-06
1229
1309
 
1230
1310
  * Pin to Rack 0.4.0 (this is the last release on Rack 0.4)
1231
1311
 
@@ -1243,7 +1323,7 @@ the 1.0 release:
1243
1323
  * BUG: Sinatra detects the app file and root path when run under
1244
1324
  thin/passenger.
1245
1325
 
1246
- = 0.3.2
1326
+ ## 0.3.2
1247
1327
 
1248
1328
  * BUG: Static and send_file read entire file into String before
1249
1329
  sending. Updated to stream with 8K chunks instead.
@@ -1253,11 +1333,11 @@ the 1.0 release:
1253
1333
 
1254
1334
  * Various minor doc fixes.
1255
1335
 
1256
- = 0.3.1
1336
+ ## 0.3.1
1257
1337
 
1258
1338
  * Unbreak optional path parameters [jeremyevans]
1259
1339
 
1260
- = 0.3.0
1340
+ ## 0.3.0
1261
1341
 
1262
1342
  * Add sinatra.gemspec w/ support for github gem builds. Forks can now
1263
1343
  enable the build gem option in github to get free username-sinatra.gem
@@ -1314,10 +1394,10 @@ the 1.0 release:
1314
1394
 
1315
1395
  * Fix for escaped paths not resolving static files [Matthew Walker]
1316
1396
 
1317
- = 0.2.1
1397
+ ## 0.2.1
1318
1398
 
1319
1399
  * File upload fix and minor tweaks.
1320
1400
 
1321
- = 0.2.0
1401
+ ## 0.2.0
1322
1402
 
1323
1403
  * Initial gem release of 0.2 codebase.
data/CONTRIBUTING.md ADDED
@@ -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-org-book.herokuapp.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/Gemfile CHANGED
@@ -11,38 +11,30 @@ source 'https://rubygems.org' unless ENV['QUICK']
11
11
  gemspec
12
12
 
13
13
  gem 'rake'
14
+ gem 'rack', git: 'https://github.com/rack/rack.git'
14
15
  gem 'rack-test', '>= 0.6.2'
15
16
  gem "minitest", "~> 5.0"
17
+ gem 'yard'
16
18
 
17
- # Allows stuff like `tilt=1.2.2 bundle install` or `tilt=master ...`.
18
- # Used by the CI.
19
- repos = {'tilt' => "rtomayko/tilt", 'rack' => "rack/rack"}
19
+ gem "rack-protection", path: "rack-protection"
20
+ gem "sinatra-contrib", path: "sinatra-contrib"
20
21
 
21
- %w[tilt rack].each do |lib|
22
- dep = case ENV[lib]
23
- when 'stable', nil then nil
24
- when /(\d+\.)+\d+/ then "~> " + ENV[lib].sub("#{lib}-", '')
25
- else {:github => repos[lib], :branch => dep}
26
- end
27
- gem lib, dep
28
- end
22
+ gem "twitter-text", "1.14.0"
29
23
 
30
24
  if RUBY_ENGINE == 'jruby'
31
25
  gem 'nokogiri', '!= 1.5.0'
32
- gem 'jruby-openssl'
33
26
  gem 'trinidad'
34
27
  end
35
28
 
36
- if RUBY_ENGINE == "ruby" and RUBY_VERSION > '1.9.2'
29
+ if RUBY_ENGINE == "ruby"
37
30
  gem 'less', '~> 2.0'
38
- gem 'therubyracer'
31
+ gem 'mini_racer'
39
32
  gem 'redcarpet'
40
33
  gem 'wlang', '>= 2.0.1'
41
34
  gem 'bluecloth'
42
35
  gem 'rdiscount'
43
36
  gem 'RedCloth'
44
37
  gem 'puma'
45
- gem 'net-http-server'
46
38
  gem 'yajl-ruby'
47
39
  gem 'nokogiri'
48
40
  gem 'thin'
@@ -63,6 +55,9 @@ if RUBY_ENGINE == "ruby" and RUBY_VERSION > '1.9.2'
63
55
  gem 'erubis'
64
56
  gem 'haml', '>= 3.0'
65
57
  gem 'sass'
58
+ gem 'reel-rack'
59
+ gem 'celluloid', '~> 0.16.0'
60
+ gem 'simplecov', require: false
66
61
  end
67
62
 
68
63
  if RUBY_ENGINE == "rbx"
@@ -71,6 +66,6 @@ if RUBY_ENGINE == "rbx"
71
66
  gem 'rubysl-test-unit'
72
67
  end
73
68
 
74
- platforms :ruby_18, :jruby do
75
- gem 'json' unless RUBY_VERSION > '1.9' # is there a jruby but 1.8 only selector?
69
+ platforms :jruby do
70
+ gem 'json'
76
71
  end
data/LICENSE CHANGED
@@ -1,5 +1,8 @@
1
+ The MIT License (MIT)
2
+
1
3
  Copyright (c) 2007, 2008, 2009 Blake Mizerany
2
- Copyright (c) 2010, 2011, 2012, 2013, 2014 Konstantin Haase
4
+ Copyright (c) 2010-2017 Konstantin Haase
5
+ Copyright (c) 2015-2017 Zachary Scott
3
6
 
4
7
  Permission is hereby granted, free of charge, to any person
5
8
  obtaining a copy of this software and associated documentation
@@ -20,4 +23,4 @@ NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
20
23
  HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
21
24
  WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
22
25
  FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
23
- OTHER DEALINGS IN THE SOFTWARE.
26
+ OTHER DEALINGS IN THE SOFTWARE.