sinatra-cacher 0.9.0 → 0.9.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 (2) hide show
  1. data/lib/sinatra/cacher.rb +3 -5
  2. metadata +1 -1
@@ -3,7 +3,7 @@ require 'sinatra/base'
3
3
 
4
4
  module Sinatra
5
5
  module Cacher
6
- VERSION = '0.9.0'
6
+ VERSION = '0.9.1'
7
7
 
8
8
  def self.registered(app)
9
9
  app.helpers Helpers
@@ -121,15 +121,13 @@ module Sinatra
121
121
  end
122
122
 
123
123
  def cache_route(verb, path, opts={}, &blk)
124
+ tag = opts.delete(:tag)
125
+
124
126
  unless cache_enabled?
125
127
  route(verb, path, opts, &blk)
126
128
  return
127
129
  end
128
130
 
129
- # If we change tag when calling the route once, it remains change for the next time
130
- # the route is called.
131
- # Therefore don't change tag
132
- tag = opts.delete(:tag)
133
131
  method = generate_method :"C#{verb} #{path} #{opts.hash}", &blk
134
132
 
135
133
  cache_blk = Proc.new { |context, *args|
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: sinatra-cacher
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.9.0
4
+ version: 0.9.1
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors: