File tree Expand file tree Collapse file tree 2 files changed +9
-1
lines changed
Expand file tree Collapse file tree 2 files changed +9
-1
lines changed Original file line number Diff line number Diff line change 1- 0.0.8
1+ 0.1
Original file line number Diff line number Diff line change @@ -13,6 +13,7 @@ def initialize(app, options = {})
1313 unless options [ :id ] && options [ :id ] . length == 16
1414 raise ArgumentError , 'Need a valid Olark ID!'
1515 end
16+
1617 @app , @options = app , DEFAULTS . merge ( options )
1718 @id , @tag , @paths = [ @options . delete ( :id ) ,
1819 @options . delete ( :tag ) ,
@@ -38,6 +39,13 @@ def _call(env)
3839 @request = Rack ::Request . new ( env )
3940 valid_path = @paths . select { |path | @request . path_info =~ path } . length > 0
4041
42+ # Deprecation warning, repeated and annoying. Sorry about your log space.
43+ if @options [ :format ]
44+ logger = env [ 'rack.errors' ]
45+ logger . write ( "[#{ Time . now . strftime ( "%Y-%M-%d %H:%M:%S" ) } ] WARNING " )
46+ logger . write ( "Rack::Olark: The 'format' option no longer works! See README.md for details.\n " )
47+ end
48+
4149 if html? && ( @paths . empty? || valid_path )
4250 response = Rack ::Response . new ( [ ] , @status , @headers )
4351 @response . each { |fragment | response . write ( inject ( fragment ) ) }
You can’t perform that action at this time.
0 commit comments