rack-campaign 0.0.3 → 0.0.4

Sign up to get free protection for your applications and to get access to all the features.
@@ -57,32 +57,32 @@ blog-getstrip:
57
57
  # Rack-up application config
58
58
 
59
59
  require 'rubygems'
60
- require 'rack/zetetic/rack-campaign'
60
+ require 'rack/zetetic/campaign'
61
61
 
62
- run Rack::Zetetic::CampaignLink.new('/www/campaigns/campaigns.yml')
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
- # 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;
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
@@ -5,7 +5,7 @@ require 'date'
5
5
  require 'spec/rake/spectask'
6
6
 
7
7
  GEM = "rack-campaign"
8
- GEM_VERSION = "0.0.3"
8
+ GEM_VERSION = "0.0.4"
9
9
  AUTHOR = "Billy Gray"
10
10
  EMAIL = "wgray@zetetic.net"
11
11
  HOMEPAGE = "http://github.com/billymeltdown/rack-campaign"
@@ -1,6 +1,4 @@
1
- # Rack application
2
-
1
+ # Rack-up config
3
2
  require 'rubygems'
4
- require 'rack/zetetic/rack-campaign'
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')
@@ -2,7 +2,7 @@
2
2
  # Unicorn-specific config
3
3
  # Largely borrowed from the Github crew
4
4
 
5
- app_dir = '/www/campaign_link'
5
+ app_dir = '/path/to/campaigns'
6
6
  worker_processes (ENV['RACK_ENV'] == 'production' ? 6 : 2)
7
7
 
8
8
  # Restart any workers that haven't responded in 30 seconds
@@ -6,7 +6,7 @@ require 'yaml'
6
6
 
7
7
  module Rack
8
8
  module Zetetic
9
- class CampaignLink
9
+ class Campaign
10
10
 
11
11
  UTM_VARS = {
12
12
  'campaign' => 'utm_campaign',
metadata CHANGED
@@ -5,8 +5,8 @@ version: !ruby/object:Gem::Version
5
5
  segments:
6
6
  - 0
7
7
  - 0
8
- - 3
9
- version: 0.0.3
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/campaign_link.rb
45
+ - lib/rack/zetetic/campaign.rb
46
46
  - examples/campaigns.yml
47
47
  - examples/config.ru
48
48
  - examples/initscript