@@ -43,7 +43,7 @@ def initialize(info = {})
43
43
register_advanced_options ( [
44
44
OptAddress . new ( 'URIHOST' , [ false , 'Host to use in URI (useful for tunnels)' ] ) ,
45
45
OptPort . new ( 'URIPORT' , [ false , 'Port to use in URI (useful for tunnels)' ] ) ,
46
- OptBool . new ( 'SendRobots' , [ false , " Return a robots.txt file if asked for one" , false ] ) ,
46
+ OptBool . new ( 'SendRobots' , [ false , ' Return a robots.txt file if asked for one' , false ] )
47
47
] )
48
48
49
49
# Used to keep track of resources added to the service manager by
@@ -181,22 +181,22 @@ def start_service(opts = {})
181
181
end
182
182
183
183
if datastore [ 'SendRobots' ]
184
- add_robots_resource ( )
184
+ add_robots_resource
185
185
end
186
186
187
187
add_resource ( uopts )
188
188
189
189
end
190
190
191
- def add_robots_resource ( )
191
+ def add_robots_resource
192
192
proc = Proc . new do |cli , req |
193
193
self . cli = cli
194
194
send_robots ( cli , req )
195
195
end
196
196
197
- vprint_status ( " Adding hardcoded uri /robots.txt" )
197
+ vprint_status ( ' Adding hardcoded URI /robots.txt' )
198
198
begin
199
- add_resource ( { 'Path' => " /robots.txt" , 'Proc' => proc } )
199
+ add_resource ( 'Path' => ' /robots.txt' , 'Proc' => proc )
200
200
rescue RuntimeError => e
201
201
print_warning ( e . message )
202
202
end
@@ -629,9 +629,9 @@ def send_not_found(cli)
629
629
# Sends a canned robots.txt file
630
630
#
631
631
def send_robots ( cli , request )
632
- print_status ( "sending robots.txt" )
632
+ print_status ( 'Sending robots.txt' )
633
633
robots = create_response ( 200 , 'Success' )
634
- robots [ 'Content-Type' ] = " text/plain"
634
+ robots [ 'Content-Type' ] = ' text/plain'
635
635
636
636
robots . body = %Q{\
637
637
User-agent: *
0 commit comments