capistrano-nvm-helper 0.1.0 → 0.3.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +5 -1
- data/Gemfile.lock +1 -1
- data/README.md +7 -13
- data/lib/capistrano/nvm/helper/version.rb +1 -1
- data/lib/capistrano/tasks/nvm-helper.rake +6 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 0afe54b6c1b6b4a95580ab37a040391ee49782bc20931c57e9a40f48e32d140f
|
4
|
+
data.tar.gz: ecdf1613ccca88a197271995da458b001dfa8c3f7356ae5a6ab20f3cd77e89eb
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 3cd937635b0478b42c69103b9b8d9326b07f651d98ea4194c28782f70fa0808f75b38883277951b94a2e51d9de27e3bf606e6f68b54eab262a6653283036aa98
|
7
|
+
data.tar.gz: 90462da5216073b51473b8146d90feea14b4eaa21304ad0fa624a3d8ab6dcc5e170782ee66702d01a34e84cedab7f82d70d1a92aed366605d1f984b586c66754
|
data/CHANGELOG.md
CHANGED
data/Gemfile.lock
CHANGED
data/README.md
CHANGED
@@ -2,6 +2,8 @@
|
|
2
2
|
|
3
3
|
This gem provides idiomatic nvm support for Capistrano 3.x (and 3.x *only*).
|
4
4
|
|
5
|
+
difference between `capistrano-nvm`: avoid permission issues when multiple users deploy the same application by using different file names in the same directory for each deployer and stage.
|
6
|
+
|
5
7
|
## Installation
|
6
8
|
|
7
9
|
Install the gem and add to the application's Gemfile by executing:
|
@@ -23,28 +25,20 @@ require "capistrano/nvm-helper"
|
|
23
25
|
Configurable options in `config/deploy.rb`:
|
24
26
|
|
25
27
|
```ruby
|
26
|
-
set :nvm_type, :user
|
28
|
+
set :nvm_type, :user
|
29
|
+
set :nvm_custom_path, "/opt/nvm"
|
27
30
|
set :nvm_node, 'v14.16.1'
|
28
|
-
|
29
|
-
# in case you want to set nvm version from the file:
|
30
|
-
# set :nvm_node, File.read('.nvmrc').strip
|
31
|
-
|
32
|
-
set :nvm_prefix, "source #{fetch(:nvm_path)}/nvm.sh; "
|
33
|
-
set :nvm_map_bins, %w{rake gem bundle yarn rails}
|
31
|
+
set :nvm_map_bins, %w{node npm yarn webpack}
|
34
32
|
```
|
35
33
|
|
36
34
|
## Rails
|
37
35
|
|
38
|
-
If you want to use nvm in your rails app deployment tasks (like `deploy:assets:precompile`),
|
36
|
+
If you want to use nvm in your rails app deployment tasks (like `deploy:assets:precompile`), pls adding `rake` to `nvm_map_bins`.
|
39
37
|
|
40
38
|
## Contributing
|
41
39
|
|
42
|
-
Bug reports and pull requests are welcome on GitHub at https://github.com/ekohe/capistrano-nvm-helper. This project is intended to be a safe, welcoming space for collaboration, and contributors
|
40
|
+
Bug reports and pull requests are welcome on GitHub at https://github.com/ekohe/capistrano-nvm-helper. This project is intended to be a safe, welcoming space for collaboration, and contributors.
|
43
41
|
|
44
42
|
## License
|
45
43
|
|
46
44
|
The gem is available as open source under the terms of the [MIT License](https://opensource.org/licenses/MIT).
|
47
|
-
|
48
|
-
## Code of Conduct
|
49
|
-
|
50
|
-
Everyone interacting in the Capistrano::Nvm::Helper project's codebases, issue trackers, chat rooms and mailing lists is expected to follow the [code of conduct](https://github.com/ekohe/capistrano-nvm-helper/blob/main/CODE_OF_CONDUCT.md).
|
@@ -63,6 +63,11 @@ namespace :load do
|
|
63
63
|
]
|
64
64
|
}
|
65
65
|
set :nvm_map_bins, %w{node npm yarn}
|
66
|
-
set :nvm_exec_path,
|
66
|
+
set :nvm_exec_path, -> {
|
67
|
+
# Try to avoid permissions issues when multiple users deploy the same app
|
68
|
+
# by using different file names in the same dir for each deployer and stage.
|
69
|
+
suffix = %i(application stage local_user).map { |key| fetch(key).to_s }.join("-")
|
70
|
+
"#{fetch(:tmp_dir)}/nvm-exec-#{suffix}.sh"
|
71
|
+
}
|
67
72
|
end
|
68
73
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: capistrano-nvm-helper
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.3.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Encore Shao
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2023-10-
|
11
|
+
date: 2023-10-29 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: capistrano
|