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: 42ce4596e928ab543ea45cbf4d474bb240cd31d1
4
- data.tar.gz: 21f0bce5b2b15e31ea7b168e12d418ffa3b89f4f
3
+ metadata.gz: e6cc834f968cf4318442fb6e962ab0a57751da78
4
+ data.tar.gz: 7c5ee6d964ee90802fc568e7201e7895f30576be
5
5
  SHA512:
6
- metadata.gz: 20b43ea9449a2f9fc45bbb663e18ca6a6c0938498694aebf597b453fe84f8686b64430a85dc1496b4739406210f9851a4e944e7c9037bc51361782a47eb49e22
7
- data.tar.gz: c16949e2c3a8f012b6273037443c4906e23cdbf8dc812026554e51f43bd4405a95a83c3c3adc04dbf13e1c1de8a3bfcc03181535bde56f1163e7acc60fdd1ce8
6
+ metadata.gz: 2d6c717339be2b0c6fd6629200d1a2f3eca872366539c4307559085438a3b1828b6ac1b8390965e4539fc549147a57e5dc24f3a612db950a6d7978c58b80f52b
7
+ data.tar.gz: bca7a36e46266bc1c54ae82401681dbf012cae1cfaded987544cc19f79ed32181cc337432fa85981e19103dec24c1545437f82dc585dad947b74af67171e75a9
@@ -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
@@ -1,5 +1,5 @@
1
1
  module Mina
2
2
  module Extras
3
- VERSION = "0.2.1"
3
+ VERSION = "0.2.2"
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: mina-rails-tools
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.1
4
+ version: 0.2.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Joey Lin