mina-rails-tools 0.2.1 → 0.2.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.
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: e6cc834f968cf4318442fb6e962ab0a57751da78
|
4
|
+
data.tar.gz: 7c5ee6d964ee90802fc568e7201e7895f30576be
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 2d6c717339be2b0c6fd6629200d1a2f3eca872366539c4307559085438a3b1828b6ac1b8390965e4539fc549147a57e5dc24f3a612db950a6d7978c58b80f52b
|
7
|
+
data.tar.gz: bca7a36e46266bc1c54ae82401681dbf012cae1cfaded987544cc19f79ed32181cc337432fa85981e19103dec24c1545437f82dc585dad947b74af67171e75a9
|
data/lib/mina/extras/nginx.rb
CHANGED
@@ -5,34 +5,34 @@ set :nginx_port, 80
|
|
5
5
|
set :nginx_default, false
|
6
6
|
|
7
7
|
namespace :nginx do
|
8
|
-
|
8
|
+
|
9
9
|
# desc "Nginx: Setup config files"
|
10
10
|
# task :setup => [:upload, :link]
|
11
|
-
|
11
|
+
|
12
12
|
desc "Nginx: Parses config file and uploads it to server"
|
13
13
|
task :upload do
|
14
14
|
upload_shared_file("nginx.conf")
|
15
15
|
end
|
16
|
-
|
16
|
+
|
17
17
|
desc "Nginx: Symlink config file"
|
18
18
|
task :link do
|
19
19
|
invoke :sudo
|
20
20
|
extra_echo("Nginx: Symlink config file")
|
21
|
-
|
22
|
-
command %{sudo ln -fs "#{fetch(:deploy_to)}/shared/nginx.conf" "#{nginx_conf_path}/#{fetch(:app)}.conf"}
|
21
|
+
|
22
|
+
command %{sudo ln -fs "#{fetch(:deploy_to)}/shared/nginx.conf" "#{fetch(:nginx_conf_path)}/#{fetch(:app)}.conf"}
|
23
23
|
# command check_symlink nginx_conf_path
|
24
24
|
end
|
25
|
-
|
25
|
+
|
26
26
|
desc "Current nginx config"
|
27
27
|
task :config do
|
28
28
|
invoke :sudo
|
29
|
-
|
29
|
+
|
30
30
|
command_echo("#"*80)
|
31
|
-
command_echo("# File: #{nginx_conf_path}/#{fetch(:app)}.conf")
|
32
|
-
command %{sudo cat "#{nginx_conf_path}/#{fetch(:app)}.conf"}
|
31
|
+
command_echo("# File: #{fetch(:nginx_conf_path)}/#{fetch(:app)}.conf")
|
32
|
+
command %{sudo cat "#{fetch(:nginx_conf_path)}/#{fetch(:app)}.conf"}
|
33
33
|
command_echo("#"*80)
|
34
34
|
end
|
35
|
-
|
35
|
+
|
36
36
|
%w(stop start restart reload status).each do |action|
|
37
37
|
desc "#{action.capitalize} Nginx"
|
38
38
|
task action.to_sym do
|
@@ -4,11 +4,11 @@ upstream unicorn-<%= app %> {
|
|
4
4
|
|
5
5
|
# <%= app %> Server
|
6
6
|
server {
|
7
|
-
listen <%= nginx_port %><%= ' default' if nginx_default %>;
|
8
|
-
server_name <%= domain %>;
|
7
|
+
listen <%= fetch(:nginx_port) %><%= ' default' if fetch(:nginx_default) %>;
|
8
|
+
server_name <%= fetch(:domain) %>;
|
9
|
+
|
10
|
+
root <%= fetch(:deploy_to) %>/<%= fetch(:current_path) %>/public;
|
9
11
|
|
10
|
-
root <%= fetch(:deploy_to) %>/<%= current_path %>/public;
|
11
|
-
|
12
12
|
gzip on;
|
13
13
|
gzip_types text/plain text/xml application/xml application/xml+rss
|
14
14
|
text/css text/javascript application/javascript application/json;
|
@@ -6,7 +6,7 @@ TIMEOUT=60
|
|
6
6
|
APP_ROOT="<%= "#{fetch(:deploy_to)}" %>"
|
7
7
|
PID_PATH="<%= "#{fetch(:deploy_to)}/#{shared_path!}/pids" %>"
|
8
8
|
PID="$PID_PATH/unicorn.pid"
|
9
|
-
ENVIRONMENT="<%= rails_env || "production" %>"
|
9
|
+
ENVIRONMENT="<%= fetch(:rails_env) || "production" %>"
|
10
10
|
CONFIG="$APP_ROOT/<%= "#{shared_path!}/unicorn.rb" %>"
|
11
11
|
UARGS="-D -c $CONFIG -E $ENVIRONMENT"
|
12
12
|
CMD="cd $APP_ROOT/<%= current_path! %> && bundle exec unicorn_rails $UARGS"
|
@@ -63,4 +63,4 @@ reopen-logs)
|
|
63
63
|
echo >&2 "Usage: $0 <start|stop|restart|upgrade|force-stop|reopen-logs>"
|
64
64
|
exit 1
|
65
65
|
;;
|
66
|
-
esac
|
66
|
+
esac
|
data/lib/mina/extras/version.rb
CHANGED