rack-olark 0.0.8 → 0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (3) hide show
  1. data/VERSION +1 -1
  2. data/lib/rack/olark.rb +8 -0
  3. metadata +1 -1
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.0.8
1
+ 0.1
data/lib/rack/olark.rb CHANGED
@@ -13,6 +13,7 @@ module Rack
13
13
  unless options[:id] && options[:id].length == 16
14
14
  raise ArgumentError, 'Need a valid Olark ID!'
15
15
  end
16
+
16
17
  @app, @options = app, DEFAULTS.merge(options)
17
18
  @id, @tag, @paths = [@options.delete(:id),
18
19
  @options.delete(:tag),
@@ -38,6 +39,13 @@ module Rack
38
39
  @request = Rack::Request.new(env)
39
40
  valid_path = @paths.select { |path| @request.path_info =~ path }.length > 0
40
41
 
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
+
41
49
  if html? && (@paths.empty? || valid_path)
42
50
  response = Rack::Response.new([], @status, @headers)
43
51
  @response.each { |fragment| response.write(inject(fragment)) }
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rack-olark
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.8
4
+ version: '0.1'
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors: