capistrano-nvm-helper 0.1.0 → 0.2.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: c47e80a38392602cb78ab075dcc07095ca7f45420e322c0e08526cacad30ae04
4
- data.tar.gz: 15c526f08d15386418af4d82a8de69c40ed8fa06222a2198350b9aa7b31afe33
3
+ metadata.gz: 7fc3160290b3ce80167b0b3687fd192a86432e19d1f6dd492b36f7ea98bb327c
4
+ data.tar.gz: c9ec0233310bdd156c2203e5a0ca8bab05ae3c39381c5e89d5905a9a20935a50
5
5
  SHA512:
6
- metadata.gz: 59de74d2eb5d1d793de3e4a333e11819907a6a7c1ba1917608c0dd9af4e053fcb596d11870f83cb61f88d15e79b4a7b05a79e2ef379e17fdfd5d67380fe998f2
7
- data.tar.gz: 3a343355a3e76518b4ebcd8089782acb6870fc2da642899fca5d80dffa85445ec58b0a0c7f55fb93e2aa1a8058c24cbe3b496d28d6ccac96dcd8c1017dd075d2
6
+ metadata.gz: ff44c9127a203d2db144f2c0d9f4eafb41c8a59066d879ec959e6f74e1f5e0486636f3010aff8db663801cf3ed4a581aedc382f15a0f22a563e3dcdad388d1a9
7
+ data.tar.gz: fb8503245de44882c4c3253979c20f87f7a95ff33feba42148e22b01cdf822736859bcd07af911008911445a44754b063aa87ac52c64e9e2e69f930520a2c14b
data/CHANGELOG.md CHANGED
@@ -1,5 +1,5 @@
1
1
  ## [Released]
2
2
 
3
- ## [0.1.0] - 2023-10-26
3
+ ## [0.2.0] - 2023-10-28
4
4
 
5
5
  - add NVM setup to Capistrano 3.x
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- capistrano-nvm-helper (0.1.0)
4
+ capistrano-nvm-helper (0.2.0)
5
5
  capistrano (~> 3.1)
6
6
 
7
7
  GEM
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,14 +25,10 @@ require "capistrano/nvm-helper"
23
25
  Configurable options in `config/deploy.rb`:
24
26
 
25
27
  ```ruby
26
- set :nvm_type, :user # or :system
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
@@ -39,12 +37,8 @@ If you want to use nvm in your rails app deployment tasks (like `deploy:assets:p
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 are expected to adhere to the [code of conduct](https://github.com/ekohe/capistrano-nvm-helper/blob/main/CODE_OF_CONDUCT.md).
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).
@@ -3,7 +3,7 @@
3
3
  module Capistrano
4
4
  module Nvm
5
5
  module Helper
6
- VERSION = "0.1.0"
6
+ VERSION = "0.2.0"
7
7
  end
8
8
  end
9
9
  end
@@ -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, "#{fetch(:tmp_dir)}/nvm-exec-#{fetch(:application)}-#{fetch(:environment)}-#{fetch(:user)}.sh"
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.1.0
4
+ version: 0.2.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-27 00:00:00.000000000 Z
11
+ date: 2023-10-28 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: capistrano