lacquer 0.5.0.beta3 → 0.5.0.beta4

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.
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.5.0.beta3
1
+ 0.5.0.beta4
data/lacquer.gemspec CHANGED
@@ -5,11 +5,11 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = %q{lacquer}
8
- s.version = "0.5.0.beta3"
8
+ s.version = "0.5.0.beta4"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new("> 1.3.1") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["Russ Smith (russ@bashme.org)", "Ryan Johns", "Garry Tan (garry@posterous.com), Gabe da Silveira (gabe@websaviour.com)", "Håkon Lerring"]
12
- s.date = %q{2011-05-26}
12
+ s.date = %q{2011-06-01}
13
13
  s.description = %q{Rails drop in for Varnish support.}
14
14
  s.email = %q{russ@bashme.org}
15
15
  s.extra_rdoc_files = [
@@ -54,6 +54,14 @@ module Lacquer
54
54
  }
55
55
  CODE
56
56
  end
57
+
58
+ def to_vcl_pipe_urls
59
+ <<-CODE.strip_heredoc
60
+ if(#{to_vcl_conditions(urls_by(:pipe))}) {
61
+ return(pipe);
62
+ }
63
+ CODE
64
+ end
57
65
 
58
66
  protected
59
67
 
@@ -26,6 +26,7 @@ module Lacquer
26
26
  #
27
27
  # clear_cache_for(root_path, blog_posts_path, '/other/content/*')
28
28
  def clear_cache_for(*paths)
29
+ return unless Lacquer.configuration.enable_cache
29
30
  case Lacquer.configuration.job_backend
30
31
  when :delayed_job
31
32
  require 'lacquer/delayed_job_job'
@@ -39,6 +39,14 @@ describe Lacquer::CacheControl do
39
39
  pass_urls.should include('if(req.url ~ "^/admin")')
40
40
  pass_urls.should include('return(pass)')
41
41
  end
42
+
43
+ it "returns vcl for pipe urls" do
44
+ cache_control = described_class.new
45
+ cache_control.register :pipe, :url => "*.mp4$"
46
+ pass_urls = cache_control.to_vcl_pipe_urls
47
+ pass_urls.should include('if(req.url ~ "*.mp4$")')
48
+ pass_urls.should include('return(pipe)')
49
+ end
42
50
 
43
51
  it "returns vcl for override ttl on beresp" do
44
52
  cache_control = described_class.new
metadata CHANGED
@@ -2,7 +2,7 @@
2
2
  name: lacquer
3
3
  version: !ruby/object:Gem::Version
4
4
  prerelease: 6
5
- version: 0.5.0.beta3
5
+ version: 0.5.0.beta4
6
6
  platform: ruby
7
7
  authors:
8
8
  - Russ Smith (russ@bashme.org)
@@ -13,7 +13,7 @@ autorequire:
13
13
  bindir: bin
14
14
  cert_chain: []
15
15
 
16
- date: 2011-05-26 00:00:00 -07:00
16
+ date: 2011-06-01 00:00:00 -07:00
17
17
  default_executable:
18
18
  dependencies:
19
19
  - !ruby/object:Gem::Dependency
@@ -145,7 +145,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
145
145
  requirements:
146
146
  - - ">="
147
147
  - !ruby/object:Gem::Version
148
- hash: 3568634987189967618
148
+ hash: -447822799593533696
149
149
  segments:
150
150
  - 0
151
151
  version: "0"