capistrano-nginx-unit 0.6.2 → 0.7.0

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
  SHA256:
3
- metadata.gz: eb09166c80267705fa73dc00316e5bd4591fde55e6ff80f0273d7a0dfbe0a717
4
- data.tar.gz: d1e4de844c4dde9d95f4603ebbcd34f52b80d36eb7401301035e9ae22410ed9e
3
+ metadata.gz: 595ea89b86d43a78faf4be7c213835c16451ce8ca5c031949a12467492188846
4
+ data.tar.gz: 792f38f3ecc5516d551122eb8577e3b6a7076749e6f6e89701b6730d04a16a19
5
5
  SHA512:
6
- metadata.gz: adeb2d194f6ac4839ebcc4732afa46c09576029a5499b5f80534c9de489fb4714d1135303d81ffb865cd73037d86a49964f6b1063a929b478849331b0ebac686
7
- data.tar.gz: 95c146b691b59b1915414eafe9023b07ac5f578ec083923ab02bd5d37559bda4409576e6bc4702446e4f7dafb6a5fb5348901e9ecb61fca3697da11ffb5f44fe
6
+ metadata.gz: 99e52a2378d3ddc83f59d54448a75c1b3010f8acf744357e0542ff0e5f38297428c5510fd96270eae9b310475e4b79c84a565c3a313be666891078ebcdb40f12
7
+ data.tar.gz: 805909c4063a23011f132c7d62acb125ffaffdb440dce0c8759c7ff938c48e6b65d0f1de3b9d0309cd8cddde102c2ce5a0c6210c3c1a8226225369a828f5146c
data/README.md CHANGED
@@ -51,6 +51,7 @@ set :nginx_unit_user, -> { nil }
51
51
  set :nginx_unit_group, -> { nil }
52
52
  set :nginx_unit_working_dir, -> { nil }
53
53
  set :nginx_unit_script, -> { "config.ru" }
54
+ set :nginx_unit_environment, -> { {} }
54
55
  ```
55
56
 
56
57
  - `:nginx_unit_roles`
@@ -91,4 +92,9 @@ set :nginx_unit_script, -> { "config.ru" }
91
92
 
92
93
  Rack application script path. Default: `RELEASE_PATH/config.ru`
93
94
  See [Ruby application configuration](https://unit.nginx.org/configuration/#ruby-application)
95
+
96
+ - `:nginx_unit_environment` (NGINX Unit >= 1.2)
97
+
98
+ Environment variable setting. Default value is empty.
99
+ This variable accepts `Hash`. e.g., `{ "RAILS_ENV" => "production" }`.
94
100
 
@@ -1,3 +1,3 @@
1
1
  module Capistrano
2
- NGINX_UNIT_VERSION = "0.6.2"
2
+ NGINX_UNIT_VERSION = "0.7.0"
3
3
  end
@@ -9,6 +9,7 @@ namespace :load do
9
9
  set :nginx_unit_group, -> { nil }
10
10
  set :nginx_unit_working_dir, -> { nil }
11
11
  set :nginx_unit_script, -> { "config.ru" }
12
+ set :nginx_unit_environment, -> { {} }
12
13
  end
13
14
  end
14
15
 
@@ -56,8 +57,9 @@ namespace :nginx_unit do
56
57
  user: fetch(:nginx_unit_user),
57
58
  group: fetch(:nginx_unit_group),
58
59
  working_directory: fetch(:nginx_unit_working_dir) || released_dir,
59
- script: File.join(released_dir, fetch(:nginx_unit_script))
60
- }.reject { |_, v| v.nil? })
60
+ script: File.join(released_dir, fetch(:nginx_unit_script)),
61
+ environment: fetch(:nginx_unit_environment)
62
+ }.reject { |_, v| v.respond_to?(:empty?) ? v.empty? : v.nil? })
61
63
 
62
64
  control_nginx_unit(:put, path: "/applications/#{fetch(:nginx_unit_app_name)}", json: app_json)
63
65
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: capistrano-nginx-unit
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.6.2
4
+ version: 0.7.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - murakmii
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2018-07-11 00:00:00.000000000 Z
11
+ date: 2018-07-15 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: capistrano