rails_pwnerer 0.7.3 → 0.7.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.
checksums.yaml ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: 48e2fd47d6b0a976967e28a58e567fe145d9fc2c
4
+ data.tar.gz: e09011554ea409c80efa78a1561f456b4f8ff475
5
+ SHA512:
6
+ metadata.gz: af6158dce5914d11bc5974f7901cd5c725708368bad77b10003d676f0a50b8be41c010286d9a390c6c93d36e8b472aa0ad4e7aa87b94964e323060390c647567
7
+ data.tar.gz: e040ef0ac85f31a5a6bd1df53f39136ae5c2678508fb070ac6fa8346ee0d2d781f6992b8bda76a792fbdeed847ba852e54cd804c7a84aee22b288138b80d778f
data/CHANGELOG CHANGED
@@ -1,3 +1,5 @@
1
+ v0.7.4. Better nginx configuration.
2
+
1
3
  v0.7.3. Another bugfix for HTTP / HTTPS mixed configurations.
2
4
 
3
5
  v0.7.2. Bugfix in the HTTP / HTTPS mixed support.
@@ -30,51 +30,41 @@ class RailsPwnerer::App::NginxConfig
30
30
 
31
31
  # server configuration -- big and ugly
32
32
  f << <<NGINX_CONFIG
33
- server {
34
- listen #{app_port}#{app_config[:ssl_key] ? ' ssl' : ''};
35
- #{(app_config[:ssl_key] && app_config[:non_ssl_port] != 0) ? "listen #{app_config[:non_ssl_port]};" : "" }
36
- charset utf-8;
37
- #{app_config[:ssl_key] ? "ssl_certificate #{app_config[:ssl_cert]};" : ''}
38
- #{app_config[:ssl_key] ? "ssl_certificate_key #{app_config[:ssl_key]};" : ''}
39
- #{(dns_names.empty? ? '' : "server_name " + dns_names.join(' ') + ";")}
40
- root #{app_config[:app_path]}/public;
41
- client_max_body_size #{app_config[:max_request_mb]}M;
42
- location ~* ^/assets/ {
43
- gzip_static on;
44
- expires max;
45
- add_header Cache-Control public;
46
- break;
47
- }
48
- error_page 404 /404.html;
49
- error_page 500 502 503 504 /500.html;
50
- location / {
51
- if (-f $request_filename) {
52
- expires max;
53
- break;
54
- }
33
+ server {
34
+ listen #{app_port}#{app_config[:ssl_key] ? ' ssl' : ''};
35
+ #{(app_config[:ssl_key] && app_config[:non_ssl_port] != 0) ? "listen #{app_config[:non_ssl_port]};" : "" }
36
+ charset utf-8;
37
+ #{app_config[:ssl_key] ? "ssl_certificate #{app_config[:ssl_cert]};" : ''}
38
+ #{app_config[:ssl_key] ? "ssl_certificate_key #{app_config[:ssl_key]};" : ''}
39
+ #{(dns_names.empty? ? '' : "server_name " + dns_names.join(' ') + ";")}
40
+ root #{app_config[:app_path]}/public;
41
+ client_max_body_size #{app_config[:max_request_mb]}M;
42
+ error_page 404 /404.html;
43
+ error_page 500 502 503 504 /500.html;
44
+ try_files $uri @rails;
55
45
 
56
- if (-f $request_filename/index.html) {
57
- expires max;
58
- rewrite (.*) $1/index.html break;
59
- }
60
- if (-f $request_filename.html) {
61
- expires max;
62
- rewrite (.*) $1.html break;
63
- }
46
+ location ~ ^/assets/ {
47
+ try_files $uri @rails;
48
+ gzip_static on;
49
+ expires max;
50
+ add_header Cache-Control public;
64
51
 
65
- proxy_set_header X-Real-IP $remote_addr;
66
- proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
67
- proxy_set_header X-Forwarded-Proto $scheme;
68
- proxy_set_header Host $host;
69
- proxy_redirect off;
70
- proxy_connect_timeout 2;
71
- proxy_read_timeout 86400;
72
- if (!-f $request_filename) {
73
- proxy_pass http://#{app_name}_#{instance_name};
74
- break;
75
- }
76
- }
52
+ open_file_cache max=1000 inactive=500s;
53
+ open_file_cache_valid 600s;
54
+ open_file_cache_errors on;
77
55
  }
56
+
57
+ location @rails {
58
+ proxy_set_header X-Real-IP $remote_addr;
59
+ proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
60
+ proxy_set_header X-Forwarded-Proto $scheme;
61
+ proxy_set_header Host $host;
62
+ proxy_redirect off;
63
+ proxy_connect_timeout 2;
64
+ proxy_read_timeout 86400;
65
+ proxy_pass http://#{app_name}_#{instance_name};
66
+ }
67
+ }
78
68
  NGINX_CONFIG
79
69
  end
80
70
  end
@@ -2,11 +2,11 @@
2
2
 
3
3
  Gem::Specification.new do |s|
4
4
  s.name = "rails_pwnerer"
5
- s.version = "0.7.3"
5
+ s.version = "0.7.4"
6
6
 
7
7
  s.required_rubygems_version = Gem::Requirement.new(">= 1.2") if s.respond_to? :required_rubygems_version=
8
8
  s.authors = ["Victor Costan"]
9
- s.date = "2012-12-17"
9
+ s.date = "2013-04-11"
10
10
  s.description = "Rails deployment hack."
11
11
  s.email = "victor@costan.us"
12
12
  s.executables = ["rpwn", "rpwnctl", "rpwndev"]
@@ -17,12 +17,12 @@ Gem::Specification.new do |s|
17
17
  s.rdoc_options = ["--line-numbers", "--inline-source", "--title", "Rails_pwnerer", "--main", "README"]
18
18
  s.require_paths = ["lib", "ext"]
19
19
  s.rubyforge_project = "rails-pwnage"
20
- s.rubygems_version = "1.8.24"
20
+ s.rubygems_version = "2.0.3"
21
21
  s.summary = "Rails deployment hack."
22
22
  s.test_files = ["test/base_package_test.rb"]
23
23
 
24
24
  if s.respond_to? :specification_version then
25
- s.specification_version = 3
25
+ s.specification_version = 4
26
26
 
27
27
  if Gem::Version.new(Gem::VERSION) >= Gem::Version.new('1.2.0') then
28
28
  s.add_runtime_dependency(%q<zerg_support>, [">= 0"])
metadata CHANGED
@@ -1,78 +1,69 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rails_pwnerer
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.7.3
5
- prerelease:
4
+ version: 0.7.4
6
5
  platform: ruby
7
6
  authors:
8
7
  - Victor Costan
9
8
  autorequire:
10
9
  bindir: bin
11
10
  cert_chain: []
12
- date: 2012-12-17 00:00:00.000000000 Z
11
+ date: 2013-04-11 00:00:00.000000000 Z
13
12
  dependencies:
14
13
  - !ruby/object:Gem::Dependency
15
14
  name: zerg_support
16
15
  requirement: !ruby/object:Gem::Requirement
17
- none: false
18
16
  requirements:
19
- - - ! '>='
17
+ - - '>='
20
18
  - !ruby/object:Gem::Version
21
19
  version: '0'
22
20
  type: :runtime
23
21
  prerelease: false
24
22
  version_requirements: !ruby/object:Gem::Requirement
25
- none: false
26
23
  requirements:
27
- - - ! '>='
24
+ - - '>='
28
25
  - !ruby/object:Gem::Version
29
26
  version: '0'
30
27
  - !ruby/object:Gem::Dependency
31
28
  name: echoe
32
29
  requirement: !ruby/object:Gem::Requirement
33
- none: false
34
30
  requirements:
35
- - - ! '>='
31
+ - - '>='
36
32
  - !ruby/object:Gem::Version
37
33
  version: '0'
38
34
  type: :development
39
35
  prerelease: false
40
36
  version_requirements: !ruby/object:Gem::Requirement
41
- none: false
42
37
  requirements:
43
- - - ! '>='
38
+ - - '>='
44
39
  - !ruby/object:Gem::Version
45
40
  version: '0'
46
41
  - !ruby/object:Gem::Dependency
47
42
  name: fakefs
48
43
  requirement: !ruby/object:Gem::Requirement
49
- none: false
50
44
  requirements:
51
- - - ! '>='
45
+ - - '>='
52
46
  - !ruby/object:Gem::Version
53
47
  version: '0'
54
48
  type: :development
55
49
  prerelease: false
56
50
  version_requirements: !ruby/object:Gem::Requirement
57
- none: false
58
51
  requirements:
59
- - - ! '>='
52
+ - - '>='
60
53
  - !ruby/object:Gem::Version
61
54
  version: '0'
62
55
  - !ruby/object:Gem::Dependency
63
56
  name: flexmock
64
57
  requirement: !ruby/object:Gem::Requirement
65
- none: false
66
58
  requirements:
67
- - - ! '>='
59
+ - - '>='
68
60
  - !ruby/object:Gem::Version
69
61
  version: '0'
70
62
  type: :development
71
63
  prerelease: false
72
64
  version_requirements: !ruby/object:Gem::Requirement
73
- none: false
74
65
  requirements:
75
- - - ! '>='
66
+ - - '>='
76
67
  - !ruby/object:Gem::Version
77
68
  version: '0'
78
69
  description: Rails deployment hack.
@@ -196,6 +187,7 @@ files:
196
187
  - rails_pwnerer.gemspec
197
188
  homepage: http://www.costan.us/rails_pwnage
198
189
  licenses: []
190
+ metadata: {}
199
191
  post_install_message:
200
192
  rdoc_options:
201
193
  - --line-numbers
@@ -208,22 +200,20 @@ require_paths:
208
200
  - lib
209
201
  - ext
210
202
  required_ruby_version: !ruby/object:Gem::Requirement
211
- none: false
212
203
  requirements:
213
- - - ! '>='
204
+ - - '>='
214
205
  - !ruby/object:Gem::Version
215
206
  version: '0'
216
207
  required_rubygems_version: !ruby/object:Gem::Requirement
217
- none: false
218
208
  requirements:
219
- - - ! '>='
209
+ - - '>='
220
210
  - !ruby/object:Gem::Version
221
211
  version: '1.2'
222
212
  requirements: []
223
213
  rubyforge_project: rails-pwnage
224
- rubygems_version: 1.8.24
214
+ rubygems_version: 2.0.3
225
215
  signing_key:
226
- specification_version: 3
216
+ specification_version: 4
227
217
  summary: Rails deployment hack.
228
218
  test_files:
229
219
  - test/base_package_test.rb