diff --git a/lib/rubocop/cop/isucon/sinatra/serve_static_file.rb b/lib/rubocop/cop/isucon/sinatra/serve_static_file.rb index 9419b897..d6bec272 100644 --- a/lib/rubocop/cop/isucon/sinatra/serve_static_file.rb +++ b/lib/rubocop/cop/isucon/sinatra/serve_static_file.rb @@ -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)"