From 9891bdfd6d2838829f91e229f9a8d1191fab8a38 Mon Sep 17 00:00:00 2001 From: Jeremy Evans Date: Thu, 25 Jul 2024 11:07:22 -0700 Subject: [PATCH] Fix bad example code in *public plugin documentation --- lib/roda/plugins/multi_public.rb | 6 +++--- lib/roda/plugins/public.rb | 2 +- lib/roda/plugins/timestamp_public.rb | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/lib/roda/plugins/multi_public.rb b/lib/roda/plugins/multi_public.rb index 9694d5495..7e5b02d8e 100644 --- a/lib/roda/plugins/multi_public.rb +++ b/lib/roda/plugins/multi_public.rb @@ -21,7 +21,7 @@ module RodaPlugins # font: 'assets/fonts', # form: 'static/forms/pdfs' # - # r.route do + # route do # r.on "images" do # r.multi_public(:img) # end @@ -43,7 +43,7 @@ module RodaPlugins # 'fonts' => 'assets/fonts', # 'forms' => 'static/forms/pdfs' # - # r.route do + # route do # r.on %w"images fonts forms" do |dir| # r.multi_public(dir) # end @@ -58,7 +58,7 @@ module RodaPlugins # 'fonts' => ['assets/fonts', {'Cache-Control'=>'max-age=31536000'}, 'font/ttf'], # 'forms' => ['static/forms/pdfs', nil, 'application/pdf'] # - # r.route do + # route do # r.on %w"images fonts forms" do |dir| # r.multi_public(dir) # end diff --git a/lib/roda/plugins/public.rb b/lib/roda/plugins/public.rb index 90e8a8c8c..c2edd1c76 100644 --- a/lib/roda/plugins/public.rb +++ b/lib/roda/plugins/public.rb @@ -31,7 +31,7 @@ module RodaPlugins # plugin :public, root: 'static' # # # Assuming public is the location of files - # r.route do + # route do # # Make GET /images/foo.png look for public/images/foo.png # r.public # diff --git a/lib/roda/plugins/timestamp_public.rb b/lib/roda/plugins/timestamp_public.rb index d365d73a6..697b9e077 100644 --- a/lib/roda/plugins/timestamp_public.rb +++ b/lib/roda/plugins/timestamp_public.rb @@ -25,7 +25,7 @@ module RodaPlugins # plugin :public, root: 'static', prefix: 'public' # # # Assuming public is the location of files, and static is the path prefix - # r.route do + # route do # # Make GET /static/1238099123/images/foo.png look for public/images/foo.png # r.timestamp_public #