sinatra 1.4.8 → 2.1.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 (133) hide show
  1. checksums.yaml +5 -5
  2. data/AUTHORS.md +1 -0
  3. data/CHANGELOG.md +272 -54
  4. data/CONTRIBUTING.md +8 -8
  5. data/Gemfile +48 -47
  6. data/LICENSE +4 -1
  7. data/MAINTENANCE.md +42 -0
  8. data/README.de.md +651 -443
  9. data/README.es.md +738 -357
  10. data/README.fr.md +197 -100
  11. data/README.hu.md +40 -6
  12. data/README.ja.md +125 -67
  13. data/README.ko.md +15 -15
  14. data/README.malayalam.md +3141 -0
  15. data/README.md +592 -432
  16. data/README.pt-br.md +2362 -335
  17. data/README.pt-pt.md +5 -5
  18. data/README.ru.md +857 -608
  19. data/README.zh.md +91 -29
  20. data/Rakefile +77 -51
  21. data/SECURITY.md +35 -0
  22. data/VERSION +1 -0
  23. data/examples/chat.rb +2 -1
  24. data/examples/rainbows.conf +3 -0
  25. data/examples/rainbows.rb +20 -0
  26. data/examples/stream.ru +4 -4
  27. data/lib/sinatra/base.rb +243 -265
  28. data/lib/sinatra/indifferent_hash.rb +200 -0
  29. data/lib/sinatra/main.rb +30 -10
  30. data/lib/sinatra/show_exceptions.rb +67 -62
  31. data/lib/sinatra/version.rb +1 -1
  32. data/sinatra.gemspec +44 -8
  33. metadata +43 -167
  34. data/lib/sinatra/ext.rb +0 -17
  35. data/test/asciidoctor_test.rb +0 -72
  36. data/test/base_test.rb +0 -167
  37. data/test/builder_test.rb +0 -91
  38. data/test/coffee_test.rb +0 -96
  39. data/test/compile_test.rb +0 -183
  40. data/test/contest.rb +0 -91
  41. data/test/creole_test.rb +0 -65
  42. data/test/delegator_test.rb +0 -160
  43. data/test/encoding_test.rb +0 -20
  44. data/test/erb_test.rb +0 -116
  45. data/test/extensions_test.rb +0 -98
  46. data/test/filter_test.rb +0 -487
  47. data/test/haml_test.rb +0 -109
  48. data/test/helper.rb +0 -132
  49. data/test/helpers_test.rb +0 -1917
  50. data/test/integration/app.rb +0 -79
  51. data/test/integration_helper.rb +0 -236
  52. data/test/integration_test.rb +0 -104
  53. data/test/less_test.rb +0 -69
  54. data/test/liquid_test.rb +0 -77
  55. data/test/mapped_error_test.rb +0 -285
  56. data/test/markaby_test.rb +0 -80
  57. data/test/markdown_test.rb +0 -85
  58. data/test/mediawiki_test.rb +0 -68
  59. data/test/middleware_test.rb +0 -68
  60. data/test/nokogiri_test.rb +0 -67
  61. data/test/public/favicon.ico +0 -0
  62. data/test/public/hello+world.txt +0 -1
  63. data/test/rabl_test.rb +0 -89
  64. data/test/rack_test.rb +0 -45
  65. data/test/radius_test.rb +0 -59
  66. data/test/rdoc_test.rb +0 -66
  67. data/test/readme_test.rb +0 -130
  68. data/test/request_test.rb +0 -100
  69. data/test/response_test.rb +0 -63
  70. data/test/result_test.rb +0 -76
  71. data/test/route_added_hook_test.rb +0 -59
  72. data/test/routing_test.rb +0 -1456
  73. data/test/sass_test.rb +0 -115
  74. data/test/scss_test.rb +0 -88
  75. data/test/server_test.rb +0 -56
  76. data/test/settings_test.rb +0 -582
  77. data/test/sinatra_test.rb +0 -12
  78. data/test/slim_test.rb +0 -102
  79. data/test/static_test.rb +0 -266
  80. data/test/streaming_test.rb +0 -149
  81. data/test/stylus_test.rb +0 -90
  82. data/test/templates_test.rb +0 -382
  83. data/test/textile_test.rb +0 -65
  84. data/test/views/a/in_a.str +0 -1
  85. data/test/views/ascii.erb +0 -2
  86. data/test/views/b/in_b.str +0 -1
  87. data/test/views/calc.html.erb +0 -1
  88. data/test/views/error.builder +0 -3
  89. data/test/views/error.erb +0 -3
  90. data/test/views/error.haml +0 -3
  91. data/test/views/error.sass +0 -2
  92. data/test/views/explicitly_nested.str +0 -1
  93. data/test/views/foo/hello.test +0 -1
  94. data/test/views/hello.asciidoc +0 -1
  95. data/test/views/hello.builder +0 -1
  96. data/test/views/hello.coffee +0 -1
  97. data/test/views/hello.creole +0 -1
  98. data/test/views/hello.erb +0 -1
  99. data/test/views/hello.haml +0 -1
  100. data/test/views/hello.less +0 -5
  101. data/test/views/hello.liquid +0 -1
  102. data/test/views/hello.mab +0 -1
  103. data/test/views/hello.md +0 -1
  104. data/test/views/hello.mediawiki +0 -1
  105. data/test/views/hello.nokogiri +0 -1
  106. data/test/views/hello.rabl +0 -2
  107. data/test/views/hello.radius +0 -1
  108. data/test/views/hello.rdoc +0 -1
  109. data/test/views/hello.sass +0 -2
  110. data/test/views/hello.scss +0 -3
  111. data/test/views/hello.slim +0 -1
  112. data/test/views/hello.str +0 -1
  113. data/test/views/hello.styl +0 -2
  114. data/test/views/hello.test +0 -1
  115. data/test/views/hello.textile +0 -1
  116. data/test/views/hello.wlang +0 -1
  117. data/test/views/hello.yajl +0 -1
  118. data/test/views/layout2.builder +0 -3
  119. data/test/views/layout2.erb +0 -2
  120. data/test/views/layout2.haml +0 -2
  121. data/test/views/layout2.liquid +0 -2
  122. data/test/views/layout2.mab +0 -2
  123. data/test/views/layout2.nokogiri +0 -3
  124. data/test/views/layout2.rabl +0 -3
  125. data/test/views/layout2.radius +0 -2
  126. data/test/views/layout2.slim +0 -3
  127. data/test/views/layout2.str +0 -2
  128. data/test/views/layout2.test +0 -1
  129. data/test/views/layout2.wlang +0 -2
  130. data/test/views/nested.str +0 -1
  131. data/test/views/utf8.erb +0 -2
  132. data/test/wlang_test.rb +0 -87
  133. data/test/yajl_test.rb +0 -86
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
- SHA1:
3
- metadata.gz: 49eaa57b3d06c8eb819329b3c57cd6401c5da1c2
4
- data.tar.gz: d30fe1da78dade1d0b6c961feeef2dc1ef61e268
2
+ SHA256:
3
+ metadata.gz: a13ef28ef13aa508887d370e6e666ec7af2aa27d464c2c3907fe72f3f3091fcb
4
+ data.tar.gz: 0aef31461f40ec12007e04dcfc8df077ce389a8710ef79c74466ba08eedd8085
5
5
  SHA512:
6
- metadata.gz: 961cb8068ba88aeb8c6a5d801512ddf5c22e71f293545d11fc8514794a1928acbdf8d3ad03d79c4b6281b3999c11bedcc61ea6a95157add919b8a620c57904e0
7
- data.tar.gz: 7a525a8d3fd006f267bd28cafad4aadd1c713acb8ab2c508ca2ceecb8bef3e6863fb9f70e68270027d3df1375dccb16e525ec382ce071c68fe997edd18eb53ba
6
+ metadata.gz: b93f4761e873891715668e34a695e35bb0f57983f7bf260440a7d06ead5e4b88cdeb173f4f093e74aada601b54773df47211d882ea30880fe98c0f4225cd4846
7
+ data.tar.gz: 2aaa6acfcbcb7f2e875820ba61b243916de46c0c689182afbb13f59a168a74f0bff6a0c546e47f29a60804311d960bc26cc5c897c15b05f9f26e677c60e939e3
data/AUTHORS.md CHANGED
@@ -7,6 +7,7 @@ Sinatra was designed and developed by Blake Mizerany in California.
7
7
  * **Kashyap Kondamudi**
8
8
  * **Ashley Williams**
9
9
  * **Trevor Bramble**
10
+ * **Kunpei Sakai**
10
11
 
11
12
  ### Alumni
12
13
 
data/CHANGELOG.md CHANGED
@@ -1,20 +1,238 @@
1
- = 1.4.7 / 2016-01-24
1
+ ## 2.1.0 / 2020-09-05
2
+
3
+ * Fix additional Ruby 2.7 keyword warnings [#1586](https://github.com/sinatra/sinatra/pull/1586) by Stefan Sundin
4
+
5
+ * Drop Ruby 2.2 support [#1455](https://github.com/sinatra/sinatra/pull/1455) by Eloy Pérez
6
+
7
+ * Add Rack::Protection::ReferrerPolicy [#1291](https://github.com/sinatra/sinatra/pull/1291) by Stefan Sundin
8
+
9
+ * Add `default_content_type` setting. Fixes [#1238](https://github.com/sinatra/sinatra/pull/1238) [#1239](https://github.com/sinatra/sinatra/pull/1239) by Mike Pastore
10
+
11
+ * Allow `set :<engine>` in sinatra-namespace [#1255](https://github.com/sinatra/sinatra/pull/1255) by Christian Höppner
12
+
13
+ * Use prepend instead of include for helpers. Fixes [#1213](https://github.com/sinatra/sinatra/pull/1213) [#1214](https://github.com/sinatra/sinatra/pull/1214) by Mike Pastore
14
+
15
+ * Fix issue with passed routes and provides Fixes [#1095](https://github.com/sinatra/sinatra/pull/1095) [#1606](https://github.com/sinatra/sinatra/pull/1606) by Mike Pastore, Jordan Owens
16
+
17
+ * Add QuietLogger that excludes pathes from Rack::CommonLogger [1250](https://github.com/sinatra/sinatra/pull/1250) by Christoph Wagner
18
+
19
+ * Sinatra::Contrib dependency updates. Fixes [#1207](https://github.com/sinatra/sinatra/pull/1207) [#1411](https://github.com/sinatra/sinatra/pull/1411) by Mike Pastore
20
+
21
+ * Allow CSP to fallback to default-src. Fixes [#1484](https://github.com/sinatra/sinatra/pull/1484) [#1490](https://github.com/sinatra/sinatra/pull/1490) by Jordan Owens
22
+
23
+ * Replace `origin_whitelist` with `permitted_origins`. Closes [#1620](https://github.com/sinatra/sinatra/issues/1620) [#1625](https://github.com/sinatra/sinatra/pull/1625) by rhymes
24
+
25
+ * Use Rainbows instead of thin for async/stream features. Closes [#1624](https://github.com/sinatra/sinatra/issues/1624) [#1627](https://github.com/sinatra/sinatra/pull/1627) by Ryuichi KAWAMATA
26
+
27
+ * Enable EscapedParams if passed via settings. Closes [#1615](https://github.com/sinatra/sinatra/issues/1615) [#1632](https://github.com/sinatra/sinatra/issues/1632) by Anders Bälter
28
+
29
+ * Support for parameters in mime types. Fixes [#1141](https://github.com/sinatra/sinatra/issues/1141) by John Hope
30
+
31
+ * Handle null byte when serving static files [#1574](https://github.com/sinatra/sinatra/issues/1574) by Kush Fanikiso
32
+
33
+ * Improve development support and documentation and source code by Olle Jonsson, Pierre-Adrien Buisson, Shota Iguchi
34
+
35
+ ## 2.0.8.1 / 2020-01-02
36
+
37
+ * Allow multiple hashes to be passed in `merge` and `merge!` for `Sinatra::IndifferentHash` [#1572](https://github.com/sinatra/sinatra/pull/1572) by Shota Iguchi
38
+
39
+ ## 2.0.8 / 2020-01-01
40
+
41
+ * Lookup Tilt class for template engine without loading files [#1558](https://github.com/sinatra/sinatra/pull/1558). Fixes [#1172](https://github.com/sinatra/sinatra/issues/1172) by Jordan Owens
42
+
43
+ * Add request info in NotFound exception [#1566](https://github.com/sinatra/sinatra/pull/1566) by Stefan Sundin
44
+
45
+ * Add `.yaml` support in `Sinatra::Contrib::ConfigFile` [#1564](https://github.com/sinatra/sinatra/issues/1564). Fixes [#1563](https://github.com/sinatra/sinatra/issues/1563) by Emerson Manabu Araki
46
+
47
+ * Remove only routing parameters from @params hash [#1569](https://github.com/sinatra/sinatra/pull/1569). Fixes [#1567](https://github.com/sinatra/sinatra/issues/1567) by Jordan Owens, Horacio
48
+
49
+ * Support `capture` and `content_for` with Hamlit [#1580](https://github.com/sinatra/sinatra/pull/1580) by Takashi Kokubun
50
+
51
+ * Eliminate warnings of keyword parameter for Ruby 2.7.0 [#1581](https://github.com/sinatra/sinatra/pull/1581) by Osamtimizer
52
+
53
+ ## 2.0.7 / 2019-08-22
54
+
55
+ * Fix a regression [#1560](https://github.com/sinatra/sinatra/pull/1560) by Kunpei Sakai
56
+
57
+ ## 2.0.6 / 2019-08-21
58
+
59
+ * Fix an issue setting environment from command line option [#1547](https://github.com/sinatra/sinatra/pull/1547), [#1554](https://github.com/sinatra/sinatra/pull/1554) by Jordan Owens, Kunpei Sakai
60
+
61
+ * Support pandoc as a new markdown renderer [#1533](https://github.com/sinatra/sinatra/pull/1533) by Vasiliy
62
+
63
+ * Remove outdated code for tilt 1.x [#1532](https://github.com/sinatra/sinatra/pull/1532) by Vasiliy
64
+
65
+ * Remove an extra logic for `force_encoding` [#1527](https://github.com/sinatra/sinatra/pull/1527) by Jordan Owens
66
+
67
+ * Avoid multiple errors even if `params` contains special values [#1526](https://github.com/sinatra/sinatra/pull/1527) by Kunpei Sakai
68
+
69
+ * Support `bundler/inline` with `require 'sinatra'` integration [#1520](https://github.com/sinatra/sinatra/pull/1520) by Kunpei Sakai
70
+
71
+ * Avoid `TypeError` when params contain a key without a value on Ruby < 2.4 [#1516](https://github.com/sinatra/sinatra/pull/1516) by Samuel Giddins
72
+
73
+ * Improve development support and documentation and source code by Olle Jonsson, Basavanagowda Kanur, Yuki MINAMIYA
74
+
75
+ ## 2.0.5 / 2018-12-22
76
+
77
+ * Avoid FrozenError when params contains frozen value [#1506](https://github.com/sinatra/sinatra/pull/1506) by Kunpei Sakai
78
+
79
+ * Add support for Erubi [#1494](https://github.com/sinatra/sinatra/pull/1494) by @tkmru
80
+
81
+ * `IndifferentHash` monkeypatch warning improvements [#1477](https://github.com/sinatra/sinatra/pull/1477) by Mike Pastore
82
+
83
+ * Improve development support and documentation and source code by Anusree Prakash, Jordan Owens, @ceclinux and @krororo.
84
+
85
+ ### sinatra-contrib
86
+
87
+ * Add `flush` option to `content_for` [#1225](https://github.com/sinatra/sinatra/pull/1225) by Shota Iguchi
88
+
89
+ * Drop activesupport dependency from sinatra-contrib [#1448](https://github.com/sinatra/sinatra/pull/1448)
90
+
91
+ * Update `yield_content` to append default to ERB template buffer [#1500](https://github.com/sinatra/sinatra/pull/1500) by Jordan Owens
92
+
93
+ ### rack-protection
94
+
95
+ * Don't track the Accept-Language header by default [#1504](https://github.com/sinatra/sinatra/pull/1504) by Artem Chistyakov
96
+
97
+ ## 2.0.4 / 2018-09-15
98
+
99
+ * Don't blow up when passing frozen string to `send_file` disposition [#1137](https://github.com/sinatra/sinatra/pull/1137) by Andrew Selder
100
+
101
+ * Fix ubygems LoadError [#1436](https://github.com/sinatra/sinatra/pull/1436) by Pavel Rosický
102
+
103
+ * Unescape regex captures [#1446](https://github.com/sinatra/sinatra/pull/1446) by Jordan Owens
104
+
105
+ * Slight performance improvements for IndifferentHash [#1427](https://github.com/sinatra/sinatra/pull/1427) by Mike Pastore
106
+
107
+ * Improve development support and documentation and source code by Will Yang, Jake Craige, Grey Baker and Guilherme Goettems Schneider
108
+
109
+ ## 2.0.3 / 2018-06-09
110
+
111
+ * Fix the backports gem regression [#1442](https://github.com/sinatra/sinatra/issues/1442) by Marc-André Lafortune
112
+
113
+ ## 2.0.2 / 2018-06-05
114
+
115
+ * Escape invalid query parameters [#1432](https://github.com/sinatra/sinatra/issues/1432) by Kunpei Sakai
116
+ * The patch fixes [CVE-2018-11627](https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2018-11627).
117
+
118
+ * Fix undefined method error for `Sinatra::RequiredParams` with hash key [#1431](https://github.com/sinatra/sinatra/issues/1431) by Arpit Chauhan
119
+
120
+ * Add xml content-types to valid html_types for Rack::Protection [#1413](https://github.com/sinatra/sinatra/issues/1413) by Reenan Arbitrario
121
+
122
+ * Encode route parameters using :default_encoding setting [#1412](https://github.com/sinatra/sinatra/issues/1412) by Brian m. Carlson
123
+
124
+ * Fix unpredictable behaviour from Sinatra::ConfigFile [#1244](https://github.com/sinatra/sinatra/issues/1244) by John Hope
125
+
126
+ * Add Sinatra::IndifferentHash#slice [#1405](https://github.com/sinatra/sinatra/issues/1405) by Shota Iguchi
127
+
128
+ * Remove status code 205 from drop body response [#1398](https://github.com/sinatra/sinatra/issues/1398) by Shota Iguchi
129
+
130
+ * Ignore empty captures from params [#1390](https://github.com/sinatra/sinatra/issues/1390) by Shota Iguchi
131
+
132
+ * Improve development support and documentation and source code by Zp Yuan, Andreas Finger, Olle Jonsson, Shota Iguchi, Nikita Bulai and Joshua O'Brien
133
+
134
+ ## 2.0.1 / 2018-02-17
135
+
136
+ * Repair nested namespaces, by avoiding prefix duplication [#1322](https://github.com/sinatra/sinatra/issues/1322). Fixes [#1310](https://github.com/sinatra/sinatra/issues/1310) by Kunpei Sakai
137
+
138
+ * Add pattern matches to values for Mustermann::Concat [#1333](https://github.com/sinatra/sinatra/issues/1333). Fixes [#1332](https://github.com/sinatra/sinatra/issues/1332) by Dawa Ometto
139
+
140
+ * Ship the VERSION file with the gem, to allow local unpacking [#1338](https://github.com/sinatra/sinatra/issues/1338) by Olle Jonsson
141
+
142
+ * Fix issue with custom error handler on bad request [#1351](https://github.com/sinatra/sinatra/issues/1351). Fixes [#1350](https://github.com/sinatra/sinatra/issues/1350) by Jordan Owens
143
+
144
+ * Override Rack::ShowExceptions#pretty to set custom template [#1377](https://github.com/sinatra/sinatra/issues/1377). Fixes [#1376](https://github.com/sinatra/sinatra/issues/1376) by Jordan Owens
145
+
146
+ * Enhanced path validation in Windows [#1379](https://github.com/sinatra/sinatra/issues/1379) by Orange Tsai from DEVCORE
147
+ * The patch fixes [CVE-2018-7212](https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2018-7212)
148
+
149
+ * Improve development support and documentation by Faheel Ahmad, Shota Iguchi, Olle Jonsson, Manabu Niseki, John Hope, Horacio, Ice-Storm, GraniteRock, Raman Skaskevich, Carlos Azuaje, 284km, Dan Rice and Zachary Scott
150
+
151
+ ## 2.0.0 / 2017-04-10
152
+
153
+ * Use Mustermann for patterns [#1086](https://github.com/sinatra/sinatra/issues/1086) by Konstantin Haase
154
+
155
+ * Server now provides `-q` flag for quiet mode, which disables start/stop messages [#1153](https://github.com/sinatra/sinatra/issues/1153) by Vasiliy.
156
+
157
+ * Session middleware can now be specified with `:session_store` setting [#1161](https://github.com/sinatra/sinatra/issues/1161) by Jordan Owens.
158
+
159
+ * `APP_ENV` is now preferred and recommended over `RACK_ENV` for setting environment [#984](https://github.com/sinatra/sinatra/issues/984) by Damien Mathieu.
160
+
161
+ * Add Reel support [#793](https://github.com/sinatra/sinatra/issues/793) by Patricio Mac Adden.
162
+
163
+ * Make route params available during error handling [#895](https://github.com/sinatra/sinatra/issues/895) by Jeremy Evans.
164
+
165
+ * Unify `not_found` and `error` 404 behavior [#896](https://github.com/sinatra/sinatra/issues/896) by Jeremy Evans.
166
+
167
+ * Enable Ruby 2.3 `frozen_string_literal` feature [#1076](https://github.com/sinatra/sinatra/issues/1076) by Vladimir Kochnev.
168
+
169
+ * Add Sinatra::ShowExceptions::TEMPLATE and patched Rack::ShowExceptions to prefer Sinatra template by Zachary Scott.
170
+
171
+ * Sinatra::Runner is used internally for integration tests [#840](https://github.com/sinatra/sinatra/issues/840) by Nick Sutterer.
172
+
173
+ * Fix case-sensitivity issue in `uri` method [#889](https://github.com/sinatra/sinatra/issues/889) by rennex.
174
+
175
+ * Use `Rack::Utils.status_code` to allow `status` helper to use symbol as well as numeric codes [#968](https://github.com/sinatra/sinatra/issues/968) by Tobias H. Michaelsen.
176
+
177
+ * Improved error handling for invalid params through Rack [#1070](https://github.com/sinatra/sinatra/issues/1070) by Jordan Owens.
178
+
179
+ * Ensure template is cached only once [#1021](https://github.com/sinatra/sinatra/issues/1021) by Patrik Rak.
180
+
181
+ * Rack middleware is initialized at server runtime rather than after receiving first request [#1205](https://github.com/sinatra/sinatra/issues/1205) by Itamar Turner-Trauring.
182
+
183
+ * Improve Session Secret documentation to encourage better security practices [#1218](https://github.com/sinatra/sinatra/issues/1218) by Glenn Rempe
184
+
185
+ * Exposed global and per-route options for Mustermann route parsing [#1233](https://github.com/sinatra/sinatra/issues/1233) by Mike Pastore
186
+
187
+ * Use same `session_secret` for classic and modular apps in development [#1245](https://github.com/sinatra/sinatra/issues/1245) by Marcus Stollsteimer
188
+
189
+ * Make authenticity token length a fixed value of 32 [#1181](https://github.com/sinatra/sinatra/issues/1181) by Jordan Owens
190
+
191
+ * Modernize Rack::Protection::ContentSecurityPolicy with CSP Level 2 and 3 Directives [#1202](https://github.com/sinatra/sinatra/issues/1202) by Glenn Rempe
192
+
193
+ * Adds preload option to Rack:Protection:StrictTransport [#1209](https://github.com/sinatra/sinatra/issues/1209) by Ed Robinson
194
+
195
+ * Improve BadRequest logic. Raise and handle exceptions if status is 400 [#1212](https://github.com/sinatra/sinatra/issues/1212) by Mike Pastore
196
+
197
+ * Make Rack::Test a development dependency [#1232](https://github.com/sinatra/sinatra/issues/1232) by Mike Pastore
198
+
199
+ * Capture exception messages of raised NotFound and BadRequest [#1210](https://github.com/sinatra/sinatra/issues/1210) by Mike Pastore
200
+
201
+ * Add explicit set method to contrib/cookies to override cookie settings [#1240](https://github.com/sinatra/sinatra/issues/1240) by Andrew Allen
202
+
203
+ * Avoid executing filters even if prefix matches with other namespace [#1253](https://github.com/sinatra/sinatra/issues/1253) by namusyaka
204
+
205
+ * Make `#has_key?` also indifferent in access, can accept String or Symbol [#1262](https://github.com/sinatra/sinatra/issues/1262) by Stephen Paul Weber
206
+
207
+ * Add `allow_if` option to bypass json csrf protection [#1265](https://github.com/sinatra/sinatra/issues/1265) by Jordan Owens
208
+
209
+ * rack-protection: Bundle StrictTransport, CookieTossing, and CSP [#1267](https://github.com/sinatra/sinatra/issues/1267) by Mike Pastore
210
+
211
+ * Add `:strict_paths` option for managing trailing slashes [#1273](https://github.com/sinatra/sinatra/issues/1273) by namusyaka
212
+
213
+ * Add full IndifferentHash implementation to params [#1279](https://github.com/sinatra/sinatra/issues/1279) by Mike Pastore
214
+
215
+ ## 1.4.8 / 2017-01-30
216
+
217
+ * Fix the deprecation warning from Ruby about Fixnum. [#1235](https://github.com/sinatra/sinatra/issues/1235) by Akira Matsuda
218
+
219
+ ## 1.4.7 / 2016-01-24
2
220
 
3
221
  * Add Ashley Williams, Trevor Bramble, and Kashyap Kondamudi to team Sinatra.
4
222
 
5
223
  * Correctly handle encoded colons in routes. (Jeremy Evans)
6
224
 
7
- * Rename CHANGES to CHANGELOG.md and update Rakefile. #1043 (Eliza Sorensen)
225
+ * Rename CHANGES to CHANGELOG.md and update Rakefile. [#1043](https://github.com/sinatra/sinatra/issues/1043) (Eliza Sorensen)
8
226
 
9
- * Improve documentation. #941, #1069, #1075, #1025, #1052 (Many great folks)
227
+ * Improve documentation. [#941](https://github.com/sinatra/sinatra/issues/941), [#1069](https://github.com/sinatra/sinatra/issues/1069), [#1075](https://github.com/sinatra/sinatra/issues/1075), [#1025](https://github.com/sinatra/sinatra/issues/1025), [#1052](https://github.com/sinatra/sinatra/issues/1052) (Many great folks)
10
228
 
11
229
  * Introduce `Sinatra::Ext` to workaround Rack 1.6 bug to fix Ruby 1.8.7
12
- support. #1080 (Zachary Scott)
230
+ support. [#1080](https://github.com/sinatra/sinatra/issues/1080) (Zachary Scott)
13
231
 
14
- * Add CONTRIBUTING guide. #987 (Katrina Owen)
232
+ * Add CONTRIBUTING guide. [#987](https://github.com/sinatra/sinatra/issues/987) (Katrina Owen)
15
233
 
16
234
 
17
- = 1.4.6 / 2015-03-23
235
+ ## 1.4.6 / 2015-03-23
18
236
 
19
237
  * Improve tests and documentation. (Darío Hereñú, Seiichi Yonezawa, kyoendo,
20
238
  John Voloski, Ferenc-, Renaud Martinet, Christian Haase, marocchino,
@@ -44,7 +262,7 @@
44
262
  * Upgrade test suite to Minitest version 5 and fix Ruby 2.2 compatibility.
45
263
  (Vipul A M)
46
264
 
47
- = 1.4.5 / 2014-04-08
265
+ ## 1.4.5 / 2014-04-08
48
266
 
49
267
  * Improve tests and documentation. (Seiichi Yonezawa, Mike Gehard, Andrew
50
268
  Deitrick, Matthew Nicholas Bradley, GoGo tanaka, Carlos Lazo, Shim Tw,
@@ -61,7 +279,7 @@
61
279
 
62
280
  * Fix bug in request.accept? that might trigger a NoMethodError. (sbonami)
63
281
 
64
- = 1.4.4 / 2013-10-21
282
+ ## 1.4.4 / 2013-10-21
65
283
 
66
284
  * Allow setting layout to false specifically for a single rendering engine.
67
285
  (Matt Wildig)
@@ -96,7 +314,7 @@
96
314
 
97
315
  * Reduce file size of dev mode images for 404 and 500 pages. (Francis Go)
98
316
 
99
- = 1.4.3 / 2013-06-07
317
+ ## 1.4.3 / 2013-06-07
100
318
 
101
319
  * Running a Sinatra file directly or via `run!` it will now ignore an
102
320
  empty $PORT env variable. (noxqsgit)
@@ -117,7 +335,7 @@
117
335
 
118
336
  * Request#accept? now returns true instead of a truthy value. (Alan Harris)
119
337
 
120
- = 1.4.2 / 2013-03-21
338
+ ## 1.4.2 / 2013-03-21
121
339
 
122
340
  * Fix parsing error for case where both the pattern and the captured part
123
341
  contain a dot. (Florian Hanke, Konstantin Haase)
@@ -126,11 +344,11 @@
126
344
 
127
345
  * Improve documentation. (Patricio Mac Adden, Joe Bottigliero)
128
346
 
129
- = 1.4.1 / 2013-03-15
347
+ ## 1.4.1 / 2013-03-15
130
348
 
131
349
  * Make delegated methods available in config.ru (Konstantin Haase)
132
350
 
133
- = 1.4.0 / 2013-03-15
351
+ ## 1.4.0 / 2013-03-15
134
352
 
135
353
  * Add support for LINK and UNLINK requests. (Konstantin Haase)
136
354
 
@@ -164,9 +382,9 @@
164
382
  halt in a before filter or route. (Konstantin Haase)
165
383
 
166
384
  * Sinatra::Base.new now returns a Sinatra::Wrapper instance, exposing
167
- #settings and #helpers, yet going through the middleware stack on #call.
168
- It also implements a nice #inspect, so it plays nice with Rails' `rake
169
- routes`. (Konstantin Haase)
385
+ `#settings` and `#helpers`, yet going through the middleware stack on
386
+ `#call`. It also implements a nice `#inspect`, so it plays nice with
387
+ Rails' `rake routes`. (Konstantin Haase)
170
388
 
171
389
  * In addition to WebRick, Thin and Mongrel, Sinatra will now automatically pick
172
390
  up Puma, Trinidad, ControlTower or Net::HTTP::Server when installed. The
@@ -251,7 +469,7 @@
251
469
  * Exceptions in `after` filter are now handled like any other exception.
252
470
  (Nathan Esquenazi)
253
471
 
254
- = 1.3.6 (backport release) / 2013-03-15
472
+ ## 1.3.6 (backport release) / 2013-03-15
255
473
 
256
474
  Backported from 1.4.0:
257
475
 
@@ -261,7 +479,7 @@ Backported from 1.4.0:
261
479
 
262
480
  * No longer override `define_singleton_method`. (Konstantin Haase)
263
481
 
264
- = 1.3.5 / 2013-02-25
482
+ ## 1.3.5 / 2013-02-25
265
483
 
266
484
  * Fix for RubyGems 2.0 (Uchio KONDO)
267
485
 
@@ -269,7 +487,7 @@ Backported from 1.4.0:
269
487
 
270
488
  * No longer override `define_singleton_method`. (Konstantin Haase)
271
489
 
272
- = 1.3.4 / 2013-01-26
490
+ ## 1.3.4 / 2013-01-26
273
491
 
274
492
  * Improve documentation. (Kashyap, Stanislav Chistenko, Konstantin Haase,
275
493
  ymmtmsys, Anurag Priyam)
@@ -286,7 +504,7 @@ Backported from 1.4.0:
286
504
  * Status, headers and body will be set correctly in an after filter when using
287
505
  halt in a before filter or route. (Konstantin Haase)
288
506
 
289
- = 1.3.3 / 2012-08-19
507
+ ## 1.3.3 / 2012-08-19
290
508
 
291
509
  * Improved documentation. (burningTyger, Konstantin Haase, Gabriel Andretta,
292
510
  Anurag Priyam, michelc)
@@ -313,7 +531,7 @@ Backported from 1.4.0:
313
531
  * When protecting against CSRF attacks, drop the session instead of refusing
314
532
  the request. (Konstantin Haase)
315
533
 
316
- = 1.3.2 / 2011-12-30
534
+ ## 1.3.2 / 2011-12-30
317
535
 
318
536
  * Don't automatically add `Rack::CommonLogger` if `Rack::Server` is adding it,
319
537
  too. (Konstantin Haase)
@@ -340,7 +558,7 @@ Backported from 1.4.0:
340
558
 
341
559
  * Improved MagLev support. (Tim Felgentreff)
342
560
 
343
- = 1.3.1 / 2011-10-05
561
+ ## 1.3.1 / 2011-10-05
344
562
 
345
563
  * Support adding more than one callback to the stream object. (Konstantin
346
564
  Haase)
@@ -348,7 +566,7 @@ Backported from 1.4.0:
348
566
  * Fix for infinite loop when streaming on 1.9.2 with Thin from a modular
349
567
  application (Konstantin Haase)
350
568
 
351
- = 1.3.0 / 2011-09-30
569
+ ## 1.3.0 / 2011-09-30
352
570
 
353
571
  * Added `stream` helper method for easily creating streaming APIs, Server
354
572
  Sent Events or even WebSockets. See README for more on that topic.
@@ -475,7 +693,7 @@ Backported from 1.4.0:
475
693
  * Fix handling of broken query params when displaying exceptions. (Luke
476
694
  Jahnke)
477
695
 
478
- = 1.2.9 (backports release) / 2013-03-15
696
+ ## 1.2.9 (backports release) / 2013-03-15
479
697
 
480
698
  IMPORTANT: THIS IS THE LAST 1.2.x RELEASE, PLEASE UPGRADE.
481
699
 
@@ -489,14 +707,14 @@ IMPORTANT: THIS IS THE LAST 1.2.x RELEASE, PLEASE UPGRADE.
489
707
 
490
708
  * Add backports library so we can still run on Ruby 1.8.6. (Konstantin Haase)
491
709
 
492
- = 1.2.8 (backports release) / 2011-12-30
710
+ ## 1.2.8 (backports release) / 2011-12-30
493
711
 
494
712
  Backported from 1.3.2:
495
713
 
496
714
  * Fix bug where rendering a second template in the same request after the
497
715
  first one raised an exception skipped the default layout (Nathan Baum)
498
716
 
499
- = 1.2.7 (backports release) / 2011-09-30
717
+ ## 1.2.7 (backports release) / 2011-09-30
500
718
 
501
719
  Custom changes:
502
720
 
@@ -529,16 +747,16 @@ Backported from 1.3.0:
529
747
  * Fix handling of broken query params when displaying exceptions. (Luke
530
748
  Jahnke)
531
749
 
532
- = 1.2.6 / 2011-05-01
750
+ ## 1.2.6 / 2011-05-01
533
751
 
534
752
  * Fix broken delegation, backport delegation tests from Sinatra 1.3.
535
753
  (Konstantin Haase)
536
754
 
537
- = 1.2.5 / 2011-04-30
755
+ ## 1.2.5 / 2011-04-30
538
756
 
539
757
  * Restore compatibility with Ruby 1.8.6. (Konstantin Haase)
540
758
 
541
- = 1.2.4 / 2011-04-30
759
+ ## 1.2.4 / 2011-04-30
542
760
 
543
761
  * Sinatra::Application (classic style) does not use a session secret in
544
762
  development mode, so sessions are not invalidated after every request when
@@ -546,9 +764,9 @@ Backported from 1.3.0:
546
764
 
547
765
  * The request object was shared between multiple Sinatra instances in the
548
766
  same middleware chain. This caused issues if any non-sinatra routing
549
- happend in-between two of those instances, or running a request twice
767
+ happened in-between two of those instances, or running a request twice
550
768
  against an application (described in the README). The caching was reverted.
551
- See GH#239 and GH#256 for more infos. (Konstantin Haase)
769
+ See GH[#239](https://github.com/sinatra/sinatra/issues/239) and GH[#256](https://github.com/sinatra/sinatra/issues/256) for more infos. (Konstantin Haase)
552
770
 
553
771
  * Fixes issues where the top level DSL was interfering with method_missing
554
772
  proxies. This issue surfaced when Rails 3 was used with older Sass versions
@@ -562,7 +780,7 @@ Backported from 1.3.0:
562
780
  * Remove HEAD request logic and let Rack::Head handle it instead. (Paolo
563
781
  "Nusco" Perrotta)
564
782
 
565
- = 1.2.3 / 2011-04-13
783
+ ## 1.2.3 / 2011-04-13
566
784
 
567
785
  * This release is compatible with Tilt 1.3, it will still work with Tilt 1.2.2,
568
786
  however, if you want to use a newer Tilt version, you have to upgrade to at
@@ -571,7 +789,7 @@ Backported from 1.3.0:
571
789
  * Helpers dealing with time, like `expires`, handle objects that pretend to be
572
790
  numbers, like `ActiveSupport::Duration`, better. (Konstantin Haase)
573
791
 
574
- = 1.2.2 / 2011-04-08
792
+ ## 1.2.2 / 2011-04-08
575
793
 
576
794
  * The `:provides => :js` condition now matches both `application/javascript`
577
795
  and `text/javascript`. The `:provides => :xml` condition now matches both
@@ -599,7 +817,7 @@ Backported from 1.3.0:
599
817
  * In development environment, when running under a nested path, the image URIs
600
818
  on the error pages are set properly. (Konstantin Haase)
601
819
 
602
- = 1.2.1 / 2011-03-17
820
+ ## 1.2.1 / 2011-03-17
603
821
 
604
822
  * Use a generated session secret when using `enable :sessions`. (Konstantin
605
823
  Haase)
@@ -612,7 +830,7 @@ Backported from 1.3.0:
612
830
  * README translations improved (Gabriel Andretta, burningTyger, Sylvain Desvé,
613
831
  Gregor Schmidt)
614
832
 
615
- = 1.2.0 / 2011-03-03
833
+ ## 1.2.0 / 2011-03-03
616
834
 
617
835
  * Added `slim` rendering method for rendering Slim templates. (Steve
618
836
  Hodgkiss)
@@ -661,11 +879,11 @@ Backported from 1.3.0:
661
879
  * Sinatra now ships with a Gemfile for development dependencies, since it eases
662
880
  supporting different platforms, like JRuby. (Konstantin Haase)
663
881
 
664
- = 1.1.4 (backports release) / 2011-04-13
882
+ ## 1.1.4 (backports release) / 2011-04-13
665
883
 
666
884
  * Compatible with Tilt 1.3. (Konstantin Haase)
667
885
 
668
- = 1.1.3 / 2011-02-20
886
+ ## 1.1.3 / 2011-02-20
669
887
 
670
888
  * Fixed issues with `user_agent` condition if the user agent header is missing.
671
889
  (Konstantin Haase)
@@ -684,11 +902,11 @@ Backported from 1.3.0:
684
902
  a rendering engine - it was not possible to register ".html.erb" without
685
903
  tricks. (Konstantin Haase)
686
904
 
687
- = 1.1.2 / 2010-10-25
905
+ ## 1.1.2 / 2010-10-25
688
906
 
689
907
  Like 1.1.1, but with proper CHANGES file.
690
908
 
691
- = 1.1.1 / 2010-10-25
909
+ ## 1.1.1 / 2010-10-25
692
910
 
693
911
  * README has been translated to Russian (Nickolay Schwarz, Vasily Polovnyov)
694
912
  and Portuguese (Luciano Sousa).
@@ -720,7 +938,7 @@ Like 1.1.1, but with proper CHANGES file.
720
938
  honor default_encoding and URLs support unicode characters. (Konstantin
721
939
  Haase)
722
940
 
723
- = 1.1.0 / 2010-10-24
941
+ ## 1.1.0 / 2010-10-24
724
942
 
725
943
  * Before and after filters now support pattern matching, including the
726
944
  ability to use captures: "before('/user/:name') { |name| ... }". This
@@ -826,7 +1044,7 @@ Like 1.1.1, but with proper CHANGES file.
826
1044
  * Sinatra now depends on Rack 1.1 or higher. Rack 1.0 is no longer supported.
827
1045
  (Konstantin Haase)
828
1046
 
829
- = 1.0 / 2010-03-23
1047
+ ## 1.0 / 2010-03-23
830
1048
 
831
1049
  * It's now possible to register blocks to run after each request using
832
1050
  after filters. After filters run at the end of each request, after
@@ -969,7 +1187,7 @@ the 1.0 release:
969
1187
  * The `:methodoverride' option to enable/disable the POST _method hack is
970
1188
  obsolete; use `:method_override` instead.
971
1189
 
972
- = 0.9.2 / 2009-05-18
1190
+ ## 0.9.2 / 2009-05-18
973
1191
 
974
1192
  * This version is compatible with Rack 1.0. [Rein Henrichs]
975
1193
 
@@ -1050,12 +1268,12 @@ the 1.0 release:
1050
1268
  * Fix in-file templates __END__ detection when __END__ exists with
1051
1269
  other stuff on a line [Yoji Shidara]
1052
1270
 
1053
- = 0.9.1.1 / 2009-03-09
1271
+ ## 0.9.1.1 / 2009-03-09
1054
1272
 
1055
1273
  * Fix directory traversal vulnerability in default static files
1056
1274
  route. See [#177] for more info.
1057
1275
 
1058
- = 0.9.1 / 2009-03-01
1276
+ ## 0.9.1 / 2009-03-01
1059
1277
 
1060
1278
  * Sinatra now runs under Ruby 1.9.1 [#61]
1061
1279
 
@@ -1125,7 +1343,7 @@ the 1.0 release:
1125
1343
  * Fixed that "." in route patterns erroneously matched any character
1126
1344
  instead of a literal ".". [#124]
1127
1345
 
1128
- = 0.9.0.4 / 2009-01-25
1346
+ ## 0.9.0.4 / 2009-01-25
1129
1347
 
1130
1348
  * Using halt with more than 1 args causes ArgumentError [#131]
1131
1349
  * using halt in a before filter doesn't modify response [#127]
@@ -1134,7 +1352,7 @@ the 1.0 release:
1134
1352
  * Preserve non-nested params in nested params hash [#117]
1135
1353
  * Fix backtrace dump with Rack::Lint [#116]
1136
1354
 
1137
- = 0.9.0.3 / 2009-01-21
1355
+ ## 0.9.0.3 / 2009-01-21
1138
1356
 
1139
1357
  * Fall back on mongrel then webrick when thin not found. [#75]
1140
1358
  * Use :environment instead of :env in test helpers to
@@ -1143,12 +1361,12 @@ the 1.0 release:
1143
1361
  * Fix app_file detection on windows [#118]
1144
1362
  * Fix static files with Rack::Lint in pipeline [#121]
1145
1363
 
1146
- = 0.9.0.2 / 2009-01-18
1364
+ ## 0.9.0.2 / 2009-01-18
1147
1365
 
1148
1366
  * Halting a before block should stop processing of routes [#85]
1149
1367
  * Fix redirect/halt in before filters [#85]
1150
1368
 
1151
- = 0.9.0 / 2009-01-18
1369
+ ## 0.9.0 / 2009-01-18
1152
1370
 
1153
1371
  * Works with and requires Rack >= 0.9.1
1154
1372
 
@@ -1241,7 +1459,7 @@ the 1.0 release:
1241
1459
  subclass of Sinatra::Base; each request is processed within an
1242
1460
  instance.
1243
1461
 
1244
- = 0.3.3 / 2009-01-06
1462
+ ## 0.3.3 / 2009-01-06
1245
1463
 
1246
1464
  * Pin to Rack 0.4.0 (this is the last release on Rack 0.4)
1247
1465
 
@@ -1254,12 +1472,12 @@ the 1.0 release:
1254
1472
  * BUG: raising Sinatra::NotFound resulted in a 500 response
1255
1473
  code instead of 404.
1256
1474
 
1257
- * BUG: use_in_file_templates! fails with CR/LF (#45)
1475
+ * BUG: use_in_file_templates! fails with CR/LF [#45]
1258
1476
 
1259
1477
  * BUG: Sinatra detects the app file and root path when run under
1260
1478
  thin/passenger.
1261
1479
 
1262
- = 0.3.2
1480
+ ## 0.3.2
1263
1481
 
1264
1482
  * BUG: Static and send_file read entire file into String before
1265
1483
  sending. Updated to stream with 8K chunks instead.
@@ -1269,11 +1487,11 @@ the 1.0 release:
1269
1487
 
1270
1488
  * Various minor doc fixes.
1271
1489
 
1272
- = 0.3.1
1490
+ ## 0.3.1
1273
1491
 
1274
1492
  * Unbreak optional path parameters [jeremyevans]
1275
1493
 
1276
- = 0.3.0
1494
+ ## 0.3.0
1277
1495
 
1278
1496
  * Add sinatra.gemspec w/ support for github gem builds. Forks can now
1279
1497
  enable the build gem option in github to get free username-sinatra.gem
@@ -1330,10 +1548,10 @@ the 1.0 release:
1330
1548
 
1331
1549
  * Fix for escaped paths not resolving static files [Matthew Walker]
1332
1550
 
1333
- = 0.2.1
1551
+ ## 0.2.1
1334
1552
 
1335
1553
  * File upload fix and minor tweaks.
1336
1554
 
1337
- = 0.2.0
1555
+ ## 0.2.0
1338
1556
 
1339
1557
  * Initial gem release of 0.2 codebase.
data/CONTRIBUTING.md CHANGED
@@ -36,13 +36,7 @@ can be applied as quickly as possible:
36
36
  modify the `README.md` file to reflect that. Again, if you don't
37
37
  update the `README`, we have to, and this holds up acceptance.
38
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
39
+ 4. **Push it:** Once you're ready, push your changes to a topic branch
46
40
  and add a note to the ticket with the URL to your branch. Or, say
47
41
  something like, "you can find the patch on johndoe/foobranch". We also
48
42
  gladly accept GitHub [pull requests](http://help.github.com/pull-requests/).
@@ -62,7 +56,7 @@ track patch requests.
62
56
  is where the website sources are managed. There are almost always people in
63
57
  `#sinatra` that are happy to discuss, apply, and publish website patches.
64
58
 
65
- * [The Book](http://sinatra-book.gittr.com/) has its own [Git
59
+ * [The Book](http://sinatra-org-book.herokuapp.com/) has its own [Git
66
60
  repository](http://github.com/sinatra/sinatra-book/) and build process but is
67
61
  managed the same as the website and project codebase.
68
62
 
@@ -98,3 +92,9 @@ fine).
98
92
 
99
93
  [ghi]: http://github.com/sinatra/sinatra/issues
100
94
  [ml]: http://groups.google.com/group/sinatrarb/topics "Sinatra Mailing List"
95
+
96
+ * ["Help Wanted"](https://github.com/sinatra/sinatra/labels/help%20wanted): Anyone willing to pitch in is open to contribute to this ticket as they see fit (will try to add context / summarize or ask for requirements)
97
+
98
+ * ["Good First Issue"](https://github.com/sinatra/sinatra/labels/good%20first%20issue): Potential first time contributors should start here
99
+
100
+ * ["Wishlist"](https://github.com/sinatra/sinatra/labels/Wishlist): All the things I wish we had but have no time for