rails_pwnerer 0.6.1 → 0.6.2

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/CHANGELOG CHANGED
@@ -1,3 +1,5 @@
1
+ v0.6.2. Added port-based filterning, so there's no need for a CNAME for every app.
2
+
1
3
  v0.6.1. Added build-essential back into scaffolding, so gem installs work.
2
4
 
3
5
  v0.6.0. Replaced mongrel with thin, for better performance.
@@ -31,6 +31,8 @@ class RailsPwnage::App::Config
31
31
  app_db[:db_pass] = (0...16).map { |i| "abcdefghijklmnopqrstuvwxyz"[rand(26),1]}.join
32
32
  # a DNS name for server-based filtering (multiple apps on the same box)
33
33
  app_db[:dns_name] = ''
34
+ # a port for server-based filtering (multiple apps on the same box)
35
+ app_db[:port] = 80
34
36
  # the maximum request size (megabytes) to be accepted by an application
35
37
  app_db[:max_request_mb] = 48
36
38
  # comma-separated directories that should be writable by the application user
@@ -8,6 +8,7 @@ class RailsPwnage::App::NginxConfig
8
8
  app_config = RailsPwnage::Config[app_name, instance_name]
9
9
  first_port = app_config[:port0]
10
10
  dns_name = app_config[:dns_name]
11
+ app_port = app_config[:port] || 80
11
12
 
12
13
  nginx_config = File.join(RailsPwnage::Config.path_to(:nginx_configs), app_name + '.' + instance_name)
13
14
  File.open(nginx_config, 'w') do |f|
@@ -21,7 +22,7 @@ class RailsPwnage::App::NginxConfig
21
22
  # server configuration -- big and ugly
22
23
  f << <<NGINX_CONFIG
23
24
  server {
24
- listen 80;
25
+ listen #{app_port};
25
26
  #{(dns_name.empty? ? '' : "server_name " + dns_name + ";")}
26
27
  root #{app_config[:app_path]}/public;
27
28
  client_max_body_size #{app_config[:max_request_mb]}M;
@@ -1,18 +1,18 @@
1
1
 
2
- # Gem::Specification for Rails_pwnerer-0.6.1
2
+ # Gem::Specification for Rails_pwnerer-0.6.2
3
3
  # Originally generated by Echoe
4
4
 
5
5
  --- !ruby/object:Gem::Specification
6
6
  name: rails_pwnerer
7
7
  version: !ruby/object:Gem::Version
8
- version: 0.6.1
8
+ version: 0.6.2
9
9
  platform: ruby
10
10
  authors:
11
11
  - Victor Costan
12
12
  autorequire:
13
13
  bindir: bin
14
14
 
15
- date: 2008-09-02 00:00:00 -04:00
15
+ date: 2008-09-03 00:00:00 -04:00
16
16
  default_executable:
17
17
  dependencies:
18
18
  - !ruby/object:Gem::Dependency
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rails_pwnerer
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.6.1
4
+ version: 0.6.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Victor Costan
@@ -9,7 +9,7 @@ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
11
 
12
- date: 2008-09-02 00:00:00 -04:00
12
+ date: 2008-09-03 00:00:00 -04:00
13
13
  default_executable:
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency