roda 2.28.0 → 2.29.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/CHANGELOG +46 -0
- data/README.rdoc +25 -7
- data/doc/release_notes/2.29.0.txt +156 -0
- data/lib/roda.rb +25 -3
- data/lib/roda/plugins/_erubis_escaping.rb +2 -0
- data/lib/roda/plugins/_symbol_regexp_matchers.rb +22 -0
- data/lib/roda/plugins/assets.rb +3 -2
- data/lib/roda/plugins/branch_locals.rb +74 -0
- data/lib/roda/plugins/caching.rb +15 -7
- data/lib/roda/plugins/chunked.rb +10 -7
- data/lib/roda/plugins/content_for.rb +4 -1
- data/lib/roda/plugins/drop_body.rb +3 -2
- data/lib/roda/plugins/error_email.rb +3 -2
- data/lib/roda/plugins/error_mail.rb +3 -2
- data/lib/roda/plugins/head.rb +2 -1
- data/lib/roda/plugins/header_matchers.rb +3 -0
- data/lib/roda/plugins/heartbeat.rb +3 -2
- data/lib/roda/plugins/json.rb +5 -3
- data/lib/roda/plugins/json_parser.rb +3 -2
- data/lib/roda/plugins/mailer.rb +3 -3
- data/lib/roda/plugins/match_affix.rb +6 -0
- data/lib/roda/plugins/multi_route.rb +3 -1
- data/lib/roda/plugins/padrino_render.rb +3 -2
- data/lib/roda/plugins/params_capturing.rb +3 -3
- data/lib/roda/plugins/partials.rb +3 -3
- data/lib/roda/plugins/path.rb +4 -2
- data/lib/roda/plugins/path_rewriter.rb +2 -2
- data/lib/roda/plugins/per_thread_caching.rb +2 -0
- data/lib/roda/plugins/placeholder_string_matchers.rb +42 -0
- data/lib/roda/plugins/precompile_templates.rb +3 -2
- data/lib/roda/plugins/render.rb +86 -37
- data/lib/roda/plugins/render_each.rb +2 -1
- data/lib/roda/plugins/render_locals.rb +102 -0
- data/lib/roda/plugins/run_append_slash.rb +2 -1
- data/lib/roda/plugins/run_handler.rb +2 -1
- data/lib/roda/plugins/sinatra_helpers.rb +4 -4
- data/lib/roda/plugins/static_path_info.rb +2 -0
- data/lib/roda/plugins/static_routing.rb +1 -1
- data/lib/roda/plugins/streaming.rb +9 -4
- data/lib/roda/plugins/symbol_matchers.rb +23 -20
- data/lib/roda/plugins/view_options.rb +63 -28
- data/lib/roda/plugins/view_subdirs.rb +1 -0
- data/lib/roda/plugins/websockets.rb +2 -0
- data/lib/roda/version.rb +1 -1
- data/spec/composition_spec.rb +2 -2
- data/spec/matchers_spec.rb +6 -5
- data/spec/plugin/_erubis_escaping_spec.rb +5 -5
- data/spec/plugin/backtracking_array_spec.rb +0 -2
- data/spec/plugin/branch_locals_spec.rb +88 -0
- data/spec/plugin/content_for_spec.rb +8 -2
- data/spec/plugin/halt_spec.rb +8 -0
- data/spec/plugin/header_matchers_spec.rb +20 -5
- data/spec/plugin/multi_route_spec.rb +1 -1
- data/spec/plugin/named_templates_spec.rb +2 -2
- data/spec/plugin/params_capturing_spec.rb +1 -1
- data/spec/plugin/per_thread_caching_spec.rb +1 -1
- data/spec/plugin/placeholder_string_matchers_spec.rb +159 -0
- data/spec/plugin/render_locals_spec.rb +114 -0
- data/spec/plugin/render_spec.rb +83 -8
- data/spec/plugin/streaming_spec.rb +104 -4
- data/spec/plugin/symbol_matchers_spec.rb +1 -1
- data/spec/plugin/view_options_spec.rb +83 -7
- data/spec/plugin/websockets_spec.rb +7 -8
- data/spec/spec_helper.rb +22 -2
- metadata +11 -2
|
@@ -10,7 +10,7 @@ rescue LoadError
|
|
|
10
10
|
warn "#{lib} not installed, skipping websockets plugin test"
|
|
11
11
|
else
|
|
12
12
|
describe "websockets plugin" do
|
|
13
|
-
|
|
13
|
+
deprecated "supports regular requests" do
|
|
14
14
|
app(:websockets) do |r|
|
|
15
15
|
r.websocket{}
|
|
16
16
|
"a"
|
|
@@ -20,7 +20,12 @@ describe "websockets plugin" do
|
|
|
20
20
|
end
|
|
21
21
|
|
|
22
22
|
describe "websockets plugin" do
|
|
23
|
-
|
|
23
|
+
after do
|
|
24
|
+
#$DEBUG=nil
|
|
25
|
+
@server.stop
|
|
26
|
+
end
|
|
27
|
+
|
|
28
|
+
deprecated "supports websocket requests" do
|
|
24
29
|
events = @events = []
|
|
25
30
|
app(:bare) do
|
|
26
31
|
plugin :websockets, :adapter=>:thin
|
|
@@ -52,13 +57,7 @@ describe "websockets plugin" do
|
|
|
52
57
|
end
|
|
53
58
|
end
|
|
54
59
|
q.pop
|
|
55
|
-
end
|
|
56
|
-
after do
|
|
57
|
-
#$DEBUG=nil
|
|
58
|
-
@server.stop
|
|
59
|
-
end
|
|
60
60
|
|
|
61
|
-
it "supports websocket requests" do
|
|
62
61
|
ws = Faye::WebSocket::Client.new("ws://localhost:#{@port}")
|
|
63
62
|
msg = nil
|
|
64
63
|
sleep_for = 0.01
|
data/spec/spec_helper.rb
CHANGED
|
@@ -29,9 +29,25 @@ require "stringio"
|
|
|
29
29
|
gem 'minitest'
|
|
30
30
|
require "minitest/autorun"
|
|
31
31
|
|
|
32
|
-
|
|
32
|
+
$RODA_WARN = true
|
|
33
|
+
def (Roda::RodaPlugins).warn(s)
|
|
34
|
+
return unless $RODA_WARN
|
|
35
|
+
$stderr.puts s
|
|
36
|
+
puts caller.grep(/_spec\.rb:\d+:/)
|
|
37
|
+
end
|
|
33
38
|
|
|
34
39
|
class Minitest::Spec
|
|
40
|
+
def self.deprecated(a, &block)
|
|
41
|
+
it("#{a} (deprecated)") do
|
|
42
|
+
begin
|
|
43
|
+
$RODA_WARN = false
|
|
44
|
+
instance_exec(&block)
|
|
45
|
+
ensure
|
|
46
|
+
$RODA_WARN = true
|
|
47
|
+
end
|
|
48
|
+
end
|
|
49
|
+
end
|
|
50
|
+
|
|
35
51
|
def app(type=nil, &block)
|
|
36
52
|
case type
|
|
37
53
|
when :new
|
|
@@ -44,7 +60,11 @@ class Minitest::Spec
|
|
|
44
60
|
route(&block)
|
|
45
61
|
end
|
|
46
62
|
else
|
|
47
|
-
|
|
63
|
+
if block
|
|
64
|
+
@app = _app{route(&block)}
|
|
65
|
+
else
|
|
66
|
+
@app ||= _app{route(&block)}
|
|
67
|
+
end
|
|
48
68
|
end
|
|
49
69
|
end
|
|
50
70
|
|
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: roda
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 2.
|
|
4
|
+
version: 2.29.0
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Jeremy Evans
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2017-
|
|
11
|
+
date: 2017-08-16 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: rack
|
|
@@ -208,6 +208,7 @@ extra_rdoc_files:
|
|
|
208
208
|
- doc/release_notes/2.26.0.txt
|
|
209
209
|
- doc/release_notes/2.27.0.txt
|
|
210
210
|
- doc/release_notes/2.28.0.txt
|
|
211
|
+
- doc/release_notes/2.29.0.txt
|
|
211
212
|
files:
|
|
212
213
|
- CHANGELOG
|
|
213
214
|
- MIT-LICENSE
|
|
@@ -240,6 +241,7 @@ files:
|
|
|
240
241
|
- doc/release_notes/2.26.0.txt
|
|
241
242
|
- doc/release_notes/2.27.0.txt
|
|
242
243
|
- doc/release_notes/2.28.0.txt
|
|
244
|
+
- doc/release_notes/2.29.0.txt
|
|
243
245
|
- doc/release_notes/2.3.0.txt
|
|
244
246
|
- doc/release_notes/2.4.0.txt
|
|
245
247
|
- doc/release_notes/2.5.0.txt
|
|
@@ -250,10 +252,12 @@ files:
|
|
|
250
252
|
- doc/release_notes/2.9.0.txt
|
|
251
253
|
- lib/roda.rb
|
|
252
254
|
- lib/roda/plugins/_erubis_escaping.rb
|
|
255
|
+
- lib/roda/plugins/_symbol_regexp_matchers.rb
|
|
253
256
|
- lib/roda/plugins/all_verbs.rb
|
|
254
257
|
- lib/roda/plugins/assets.rb
|
|
255
258
|
- lib/roda/plugins/assets_preloading.rb
|
|
256
259
|
- lib/roda/plugins/backtracking_array.rb
|
|
260
|
+
- lib/roda/plugins/branch_locals.rb
|
|
257
261
|
- lib/roda/plugins/caching.rb
|
|
258
262
|
- lib/roda/plugins/chunked.rb
|
|
259
263
|
- lib/roda/plugins/class_level_routing.rb
|
|
@@ -304,10 +308,12 @@ files:
|
|
|
304
308
|
- lib/roda/plugins/path_matchers.rb
|
|
305
309
|
- lib/roda/plugins/path_rewriter.rb
|
|
306
310
|
- lib/roda/plugins/per_thread_caching.rb
|
|
311
|
+
- lib/roda/plugins/placeholder_string_matchers.rb
|
|
307
312
|
- lib/roda/plugins/precompile_templates.rb
|
|
308
313
|
- lib/roda/plugins/public.rb
|
|
309
314
|
- lib/roda/plugins/render.rb
|
|
310
315
|
- lib/roda/plugins/render_each.rb
|
|
316
|
+
- lib/roda/plugins/render_locals.rb
|
|
311
317
|
- lib/roda/plugins/request_headers.rb
|
|
312
318
|
- lib/roda/plugins/response_request.rb
|
|
313
319
|
- lib/roda/plugins/run_append_slash.rb
|
|
@@ -347,6 +353,7 @@ files:
|
|
|
347
353
|
- spec/plugin/assets_preloading_spec.rb
|
|
348
354
|
- spec/plugin/assets_spec.rb
|
|
349
355
|
- spec/plugin/backtracking_array_spec.rb
|
|
356
|
+
- spec/plugin/branch_locals_spec.rb
|
|
350
357
|
- spec/plugin/caching_spec.rb
|
|
351
358
|
- spec/plugin/chunked_spec.rb
|
|
352
359
|
- spec/plugin/class_level_routing_spec.rb
|
|
@@ -397,9 +404,11 @@ files:
|
|
|
397
404
|
- spec/plugin/path_rewriter_spec.rb
|
|
398
405
|
- spec/plugin/path_spec.rb
|
|
399
406
|
- spec/plugin/per_thread_caching_spec.rb
|
|
407
|
+
- spec/plugin/placeholder_string_matchers_spec.rb
|
|
400
408
|
- spec/plugin/precompile_templates_spec.rb
|
|
401
409
|
- spec/plugin/public_spec.rb
|
|
402
410
|
- spec/plugin/render_each_spec.rb
|
|
411
|
+
- spec/plugin/render_locals_spec.rb
|
|
403
412
|
- spec/plugin/render_spec.rb
|
|
404
413
|
- spec/plugin/request_headers_spec.rb
|
|
405
414
|
- spec/plugin/response_request_spec.rb
|