Skip to content

Commit

Permalink
Update example code
Browse files Browse the repository at this point in the history
  • Loading branch information
sue445 committed Jan 3, 2022
1 parent 1a0d123 commit b788f04
Showing 1 changed file with 11 additions and 27 deletions.
38 changes: 11 additions & 27 deletions lib/rubocop/cop/isucon/sinatra/serve_static_file.rb
Original file line number Diff line number Diff line change
Expand Up @@ -6,35 +6,19 @@ module Isucon
module Sinatra
# Serve static files on front server (e.g. nginx)
#
# @example EnforcedStyle: bar (default)
# # Description of the `bar` style.
#
# # bad
# bad_bar_method
#
# @example
# # bad
# bad_bar_method(args)
#
# # good
# good_bar_method
#
# # good
# good_bar_method(args)
#
# @example EnforcedStyle: foo
# # Description of the `foo` style.
#
# # bad
# bad_foo_method
#
# # bad
# bad_foo_method(args)
#
# # good
# good_foo_method
# class App < Sinatra::Base
# get '/' do
# content_type :html
# File.read(File.join(__dir__, '..', 'public', 'index.html'))
# end
# end
#
# # good
# good_foo_method(args)
# # good (e.g. Serve on nginx)
# location / {
# try_files $uri $uri/ /index.html;
# }
#
class ServeStaticFile < Base
MSG = "Serve static files on front server (e.g. nginx)"
Expand Down

0 comments on commit b788f04

Please sign in to comment.