Skip to content

Commit cdfcb89

Browse files
committed
Version bump to 0.1, because why not. And I added a deprecation warning.
1 parent 800b62c commit cdfcb89

File tree

2 files changed

+9
-1
lines changed

2 files changed

+9
-1
lines changed

VERSION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
0.0.8
1+
0.1

lib/rack/olark.rb

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff 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)) }

0 commit comments

Comments
 (0)