rack-campaign 0.0.3 → 0.0.4
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/README.textile +19 -19
- data/Rakefile +1 -1
- data/examples/config.ru +3 -5
- data/examples/unicorn.rb +1 -1
- data/lib/rack/zetetic/{campaign_link.rb → campaign.rb} +1 -1
- metadata +3 -3
data/README.textile
CHANGED
@@ -57,32 +57,32 @@ blog-getstrip:
|
|
57
57
|
# Rack-up application config
|
58
58
|
|
59
59
|
require 'rubygems'
|
60
|
-
require 'rack/zetetic/
|
60
|
+
require 'rack/zetetic/campaign'
|
61
61
|
|
62
|
-
run Rack::Zetetic::
|
62
|
+
run Rack::Zetetic::Campaign.new('/www/campaigns/campaigns.yml')
|
63
63
|
</code></pre>
|
64
64
|
|
65
65
|
*nginx.conf*:
|
66
66
|
|
67
67
|
<pre><code>
|
68
|
-
|
69
|
-
|
70
|
-
|
71
|
-
|
72
|
-
|
73
|
-
|
74
|
-
|
75
|
-
|
76
|
-
|
77
|
-
|
78
|
-
|
79
|
-
|
80
|
-
|
81
|
-
|
82
|
-
|
83
|
-
|
84
|
-
}
|
68
|
+
# define upstream for campaign routing
|
69
|
+
upstream campaigns {
|
70
|
+
server unix:/www/campaigns/tmp/sockets/unicorn.sock;
|
71
|
+
}
|
72
|
+
|
73
|
+
location /c {
|
74
|
+
proxy_redirect off;
|
75
|
+
proxy_set_header Host $host;
|
76
|
+
proxy_set_header X-Real-IP $remote_addr;
|
77
|
+
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
78
|
+
proxy_max_temp_file_size 0;
|
79
|
+
|
80
|
+
# forward everything else to the mongrel cluster
|
81
|
+
if (!-f $request_filename) {
|
82
|
+
proxy_pass http://campaigns;
|
83
|
+
break;
|
85
84
|
}
|
85
|
+
}
|
86
86
|
</code></pre>
|
87
87
|
|
88
88
|
*/etc/init.d/unicorn_rack*:
|
data/Rakefile
CHANGED
data/examples/config.ru
CHANGED
@@ -1,6 +1,4 @@
|
|
1
|
-
# Rack
|
2
|
-
|
1
|
+
# Rack-up config
|
3
2
|
require 'rubygems'
|
4
|
-
require 'rack/zetetic/
|
5
|
-
|
6
|
-
run Rack::Zetetic::CampaignLink.new('/path/to/your/campaigns.yml')
|
3
|
+
require 'rack/zetetic/campaign'
|
4
|
+
run Rack::Zetetic::Campaign.new('/path/to/your/campaigns.yml')
|
data/examples/unicorn.rb
CHANGED
metadata
CHANGED
@@ -5,8 +5,8 @@ version: !ruby/object:Gem::Version
|
|
5
5
|
segments:
|
6
6
|
- 0
|
7
7
|
- 0
|
8
|
-
-
|
9
|
-
version: 0.0.
|
8
|
+
- 4
|
9
|
+
version: 0.0.4
|
10
10
|
platform: ruby
|
11
11
|
authors:
|
12
12
|
- Billy Gray
|
@@ -42,7 +42,7 @@ files:
|
|
42
42
|
- LICENSE
|
43
43
|
- README.textile
|
44
44
|
- Rakefile
|
45
|
-
- lib/rack/zetetic/
|
45
|
+
- lib/rack/zetetic/campaign.rb
|
46
46
|
- examples/campaigns.yml
|
47
47
|
- examples/config.ru
|
48
48
|
- examples/initscript
|