odania 0.0.24 → 0.0.25

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 7556edee100f621b9f326c7b21df1a33f9315beb
4
- data.tar.gz: 73108f618ec93623d8b638443910eee6ed3a8ecb
3
+ metadata.gz: 4d869250e9939f0bd3314c657810dfa7f54c0492
4
+ data.tar.gz: 83cd00c003898d412f13c10caaf5071d3094f583
5
5
  SHA512:
6
- metadata.gz: a287b037fdc60d676f7f8030a05c275ba3ac7b08f86cf7f8a349f896eb695e8cb01c6a0f5f1a5a83186b82a159d7be9c72f5da9410c90cbc6cc8a1e6f295748d
7
- data.tar.gz: 1418a94ca5a651178d94454bbf9b4c8f1f1a5b773b998757d68775669a7db4eb14f9f501322ebc790c04bfb827e99cfb78922262949adef1a07329f63dbe9a2e
6
+ metadata.gz: e5eada7c634669f18bb2e0687c986eda0e6a88e91c1f01f22099f83bb5d65c314112a3bfcf9b417b21b4e228d520a2406459f3bd7b6b47610bf01946faa6a4c6
7
+ data.tar.gz: e9d540901337d77fbaf3c513ed0910e43933a36dfd98ff2f2170c809538e96aaf9af0a5473803994f1221d0620e5d26cc45e6d1d8fb4f46136c340406723cd9c
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- odania (0.0.24)
4
+ odania (0.0.25)
5
5
  deep_merge
6
6
  diplomat
7
7
  erubis
@@ -1,3 +1,3 @@
1
1
  module Odania
2
- VERSION = '0.0.24'
2
+ VERSION = '0.0.25'
3
3
  end
@@ -10,8 +10,10 @@ sub vcl_recv {
10
10
  if (req.http.host ~ "<%= domain.name %>$") {
11
11
  std.log("varnish log info '<%= domain.name %>':" + req.http.host);
12
12
 
13
+ # subdomains
13
14
  <% domain.subdomains.each_pair do |subdomain_name, subdomain| %>
14
- <% unless '_general'.eql? subdomain_name %><%= is_first ? '' : 'else ' %>if (req.http.host ~ "^<%= subdomain.name %>.<%= domain.name %>$") {<% end %>
15
+ <% next if '_general'.eql? subdomain_name %>
16
+ <%= is_first ? '' : 'else ' %>if (req.http.host ~ "^<%= subdomain.name %>.<%= domain.name %>$") {
15
17
  std.log("subdomain identified '<%= subdomain.name %>.<%= domain.name %>':" + req.http.host + " url: " + req.url );
16
18
 
17
19
  <% subdomain.assets.each_pair do |url, page| %>
@@ -25,10 +27,21 @@ sub vcl_recv {
25
27
  }
26
28
  <% end %>
27
29
 
28
- <% unless '_general'.eql? subdomain_name %>
29
30
  }
30
31
  <% is_first = false %>
31
- <% end %>
32
+ <% end %>
33
+
34
+ # general
35
+ <% subdomain = domain.subdomain('_general') %>
36
+ <% subdomain.assets.each_pair do |url, page| %>
37
+ if (req.url ~ "^<%= prepare_url url %>") {
38
+ std.log("page identified '<%= subdomain.name %>.<%= domain.name %>' Page:'<%= url %>':" + req.url);
39
+
40
+ set req.backend_hint = <%= page.director %>.backend();
41
+ <% unless page.plugin_url.nil? %>set req.url = "<%= page.plugin_url %>";<% end %>
42
+
43
+ return (hash);
44
+ }
32
45
  <% end %>
33
46
  }
34
47
  }
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: odania
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.24
4
+ version: 0.0.25
5
5
  platform: ruby
6
6
  authors:
7
7
  - Mike Petersen