capistrano-nvm202x 2.2.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA256:
3
+ metadata.gz: 13c325f42d7ced860c5e47fee9b6e028baea8fc9351ae67e0bd6e212d97241d9
4
+ data.tar.gz: d5c68e1b6ba89d3bf351776413b9fea80ca82ab90b05d39d22130e740a7a924b
5
+ SHA512:
6
+ metadata.gz: c0a22c118a19f2ea6c91350801cab7a8a574aee2b4edd02c2c86f8b9408eca6f8a47be47936994215b5516bfc5cdcee436de11ccd67db853a9d4a74d7a39a2f0
7
+ data.tar.gz: f4e178712de30116c5b228459f5b11c628f32b7c1a9615a8477f2b4f2b6254ab21adb826ba497962194b455aa4043c4127524cf2994f6f3015b03b15f64927d2
@@ -0,0 +1,17 @@
1
+ name-template: "$NEXT_PATCH_VERSION"
2
+ tag-template: "v$NEXT_PATCH_VERSION"
3
+ categories:
4
+ - title: "⚠️ Breaking Changes"
5
+ label: "⚠️ Breaking"
6
+ - title: "✨ New Features"
7
+ label: "✨ Feature"
8
+ - title: "🐛 Bug Fixes"
9
+ label: "🐛 Bug Fix"
10
+ - title: "📚 Documentation"
11
+ label: "📚 Docs"
12
+ - title: "🏠 Housekeeping"
13
+ label: "🏠 Housekeeping"
14
+ change-template: "- $TITLE (#$NUMBER) @$AUTHOR"
15
+ no-changes-template: "- No changes"
16
+ template: |
17
+ $CHANGES
@@ -0,0 +1,14 @@
1
+ name: Release Drafter
2
+
3
+ on:
4
+ push:
5
+ branches:
6
+ - master
7
+
8
+ jobs:
9
+ update_release_draft:
10
+ runs-on: ubuntu-latest
11
+ steps:
12
+ - uses: release-drafter/release-drafter@v5
13
+ env:
14
+ GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
@@ -0,0 +1,2 @@
1
+ *.gem
2
+ Gemfile.lock
@@ -0,0 +1,6 @@
1
+ sudo: false
2
+ language: ruby
3
+ rvm:
4
+ - 2.3.3
5
+ before_install: gem install bundler -v '~> 1.14' --conservative
6
+ before_script: bundle exec danger
@@ -0,0 +1 @@
1
+ Release notes for this project are kept here: https://github.com/istana/capistrano-nvm202x/releases
@@ -0,0 +1 @@
1
+ danger.import_dangerfile(github: "capistrano/danger", branch: "no-changelog")
data/Gemfile ADDED
@@ -0,0 +1,4 @@
1
+ source 'https://rubygems.org'
2
+
3
+ # Specify your gem's dependencies in capistrano-rbenv.gemspec
4
+ gemspec
@@ -0,0 +1,22 @@
1
+ MIT License (MIT)
2
+
3
+ Copyright (c) 2013-2014 Kir Shatrov
4
+ Copyright (c) 2020 Ivan Stana
5
+
6
+ Permission is hereby granted, free of charge, to any person obtaining a copy
7
+ of this software and associated documentation files (the "Software"), to deal
8
+ in the Software without restriction, including without limitation the rights
9
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
10
+ copies of the Software, and to permit persons to whom the Software is
11
+ furnished to do so, subject to the following conditions:
12
+
13
+ The above copyright notice and this permission notice shall be included in
14
+ all copies or substantial portions of the Software.
15
+
16
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
21
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
22
+ THE SOFTWARE.
@@ -0,0 +1,58 @@
1
+ # Capistrano::nvm202x
2
+
3
+ This gem provides idiomatic nvm support for Capistrano 3.x (and 3.x
4
+ *only*).
5
+
6
+ ## Please Note
7
+
8
+ (By original maintainer) Thanks a lot to [@yyuu](https://github.com/yyuu) for merging his gem with official one.
9
+ And also thanks a lot to [capistrano-rbenv](https://github.com/capistrano/rbenv) for the code this repo originates from.
10
+
11
+ Note: this gem is different from [capistrano-nvm](https://github.com/koenpunt/capistrano-nvm). This one doesn't play with `capistrano-rbenv` which was the reason to create `capistrano-nvm202x`.
12
+
13
+ ## Installation
14
+
15
+ Add this line to your application's Gemfile:
16
+
17
+ gem 'capistrano', '~> 3.9'
18
+ gem 'capistrano-nvm202x', '~> 2.2'
19
+
20
+ And then execute:
21
+
22
+ $ bundle install
23
+
24
+ ## Usage
25
+
26
+ # Capfile
27
+ require 'capistrano/nvm'
28
+
29
+
30
+ # config/deploy.rb
31
+ set :nvm_type, :user # or :system, or :fullstaq (for Fullstaq Ruby), depends on your nvm setup
32
+ set :nvm_node, 'v14.15.1'
33
+
34
+ # in case you want to set nvm version from the file:
35
+ # set :nvm_node, File.read('.nvmrc').strip
36
+
37
+ set :nvm_prefix, "source #{fetch(:nvm_path)}/nvm.sh; "
38
+ set :nvm_map_bins, %w{rake gem bundle yarn rails}
39
+ set :nvm_roles, :all # default value
40
+
41
+ If your nvm is located in some custom path, you can use `nvm_custom_path` to set it.
42
+
43
+ ### Defining the ruby version
44
+
45
+ To set the Ruby version explicitly, add `:nvm_ruby` to your Capistrano configuration:
46
+
47
+ # config/deploy.rb
48
+ set :nvm_node, 'v14.15.1'
49
+
50
+ Alternatively, allow the remote host's `nvm` to determine the appropriate Node version](https://github.com/nvm-sh/nvm#usage) by omitting `:nvm_node`. This approach is useful if you have a `.nvmrc` file in your project.
51
+
52
+ ## Contributing
53
+
54
+ 1. Fork it
55
+ 2. Create your feature branch (`git checkout -b my-new-feature`)
56
+ 3. Commit your changes (`git commit -am 'Add some feature'`)
57
+ 4. Push to the branch (`git push origin my-new-feature`)
58
+ 5. Create new Pull Request
@@ -0,0 +1,9 @@
1
+ require "bundler/gem_tasks"
2
+
3
+ # Do nothing by default
4
+ task :default
5
+
6
+ Rake::Task["release"].enhance do
7
+ puts "Don't forget to publish the release on GitHub!"
8
+ system "open https://github.com/istana/capistrano-nvm202x/releases"
9
+ end
@@ -0,0 +1,27 @@
1
+ # -*- encoding: utf-8 -*-
2
+ lib = File.expand_path('../lib', __FILE__)
3
+ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
4
+
5
+ Gem::Specification.new do |gem|
6
+ gem.name = "capistrano-nvm202x"
7
+ gem.version = '2.2.0'
8
+ gem.authors = ["Ivan Stana", "Kir Shatrov", "Yamashita Yuu"]
9
+ gem.email = ["^_^@myrtana.sk", "shatrov@me.com", "yamashita@geishatokyo.com"]
10
+ gem.description = %q{nvm integration for Capistrano}
11
+ gem.summary = %q{nvm integration for Capistrano}
12
+ gem.homepage = "https://github.com/istana/capistrano-nvm202x/"
13
+ gem.metadata = {
14
+ "changelog_uri" => "https://github.com/istana/capistrano-nvm202x/releases"
15
+ }
16
+
17
+ gem.files = `git ls-files`.split($/)
18
+ gem.test_files = gem.files.grep(%r{^(test|spec|features)/})
19
+ gem.require_paths = ["lib"]
20
+
21
+ gem.licenses = ["MIT"]
22
+
23
+ gem.add_dependency 'capistrano', '~> 3.1'
24
+ gem.add_dependency 'sshkit', '~> 1.3'
25
+
26
+ gem.add_development_dependency 'danger'
27
+ end
File without changes
@@ -0,0 +1 @@
1
+ load File.expand_path("../tasks/nvm.rake", __FILE__)
@@ -0,0 +1,52 @@
1
+ namespace :nvm do
2
+ task :validate do
3
+ on release_roles(fetch(:nvm_roles)) do |host|
4
+ nvm_node = fetch(:nvm_node)
5
+ if nvm_node.nil?
6
+ info 'nvm: nvm_node is not set; node version will be defined by the remote hosts via nvm'
7
+ end
8
+
9
+ # don't check the nvm_node_dir if :nvm_node is not set (it will always fail)
10
+ unless nvm_node.nil? || (test "[ -d #{fetch(:nvm_node_dir)} ]")
11
+ warn "nvm: #{nvm_node} is not installed or not found in #{fetch(:nvm_node_dir)} on #{host}"
12
+ exit 1
13
+ end
14
+ end
15
+ end
16
+
17
+ task :map_bins do
18
+ SSHKit.config.default_env.merge!({ nvm_root: fetch(:nvm_path), node_version: fetch(:nvm_node) })
19
+ nvm_prefix = fetch(:nvm_prefix, proc { "source #{fetch(:nvm_path)}/nvm.sh; " })
20
+ SSHKit.config.command_map[:nvm] = "#{fetch(:nvm_path)}/nvm.sh"
21
+
22
+ fetch(:nvm_map_bins).uniq.each do |command|
23
+ SSHKit.config.command_map.prefix[command.to_sym].unshift(nvm_prefix)
24
+ end
25
+ end
26
+ end
27
+
28
+ Capistrano::DSL.stages.each do |stage|
29
+ after stage, 'nvm:validate'
30
+ after stage, 'nvm:map_bins'
31
+ end
32
+
33
+ namespace :load do
34
+ task :defaults do
35
+ set :nvm_path, -> {
36
+ nvm_path = fetch(:nvm_custom_path)
37
+ nvm_path ||= case fetch(:nvm_type, :user)
38
+ when :system
39
+ '/usr/local/opt/nvm'
40
+ when :fullstaq
41
+ '/usr/lib/nvm'
42
+ else
43
+ '$HOME/.nvm'
44
+ end
45
+ }
46
+
47
+ set :nvm_roles, fetch(:nvm_roles, :all)
48
+
49
+ set :nvm_node_dir, -> { "#{fetch(:nvm_path)}/versions/node/#{fetch(:nvm_node)}" }
50
+ set :nvm_map_bins, %w{rake gem bundle yarn rails}
51
+ end
52
+ end
metadata ADDED
@@ -0,0 +1,104 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: capistrano-nvm202x
3
+ version: !ruby/object:Gem::Version
4
+ version: 2.2.0
5
+ platform: ruby
6
+ authors:
7
+ - Ivan Stana
8
+ - Kir Shatrov
9
+ - Yamashita Yuu
10
+ autorequire:
11
+ bindir: bin
12
+ cert_chain: []
13
+ date: 2020-12-16 00:00:00.000000000 Z
14
+ dependencies:
15
+ - !ruby/object:Gem::Dependency
16
+ name: capistrano
17
+ requirement: !ruby/object:Gem::Requirement
18
+ requirements:
19
+ - - "~>"
20
+ - !ruby/object:Gem::Version
21
+ version: '3.1'
22
+ type: :runtime
23
+ prerelease: false
24
+ version_requirements: !ruby/object:Gem::Requirement
25
+ requirements:
26
+ - - "~>"
27
+ - !ruby/object:Gem::Version
28
+ version: '3.1'
29
+ - !ruby/object:Gem::Dependency
30
+ name: sshkit
31
+ requirement: !ruby/object:Gem::Requirement
32
+ requirements:
33
+ - - "~>"
34
+ - !ruby/object:Gem::Version
35
+ version: '1.3'
36
+ type: :runtime
37
+ prerelease: false
38
+ version_requirements: !ruby/object:Gem::Requirement
39
+ requirements:
40
+ - - "~>"
41
+ - !ruby/object:Gem::Version
42
+ version: '1.3'
43
+ - !ruby/object:Gem::Dependency
44
+ name: danger
45
+ requirement: !ruby/object:Gem::Requirement
46
+ requirements:
47
+ - - ">="
48
+ - !ruby/object:Gem::Version
49
+ version: '0'
50
+ type: :development
51
+ prerelease: false
52
+ version_requirements: !ruby/object:Gem::Requirement
53
+ requirements:
54
+ - - ">="
55
+ - !ruby/object:Gem::Version
56
+ version: '0'
57
+ description: nvm integration for Capistrano
58
+ email:
59
+ - "^_^@myrtana.sk"
60
+ - shatrov@me.com
61
+ - yamashita@geishatokyo.com
62
+ executables: []
63
+ extensions: []
64
+ extra_rdoc_files: []
65
+ files:
66
+ - ".github/release-drafter.yml"
67
+ - ".github/workflows/push.yml"
68
+ - ".gitignore"
69
+ - ".travis.yml"
70
+ - CHANGELOG.md
71
+ - Dangerfile
72
+ - Gemfile
73
+ - LICENSE.txt
74
+ - README.md
75
+ - Rakefile
76
+ - capistrano-nvm202x.gemspec
77
+ - lib/capistrano-nvm.rb
78
+ - lib/capistrano/nvm.rb
79
+ - lib/capistrano/tasks/nvm.rake
80
+ homepage: https://github.com/istana/capistrano-nvm202x/
81
+ licenses:
82
+ - MIT
83
+ metadata:
84
+ changelog_uri: https://github.com/istana/capistrano-nvm202x/releases
85
+ post_install_message:
86
+ rdoc_options: []
87
+ require_paths:
88
+ - lib
89
+ required_ruby_version: !ruby/object:Gem::Requirement
90
+ requirements:
91
+ - - ">="
92
+ - !ruby/object:Gem::Version
93
+ version: '0'
94
+ required_rubygems_version: !ruby/object:Gem::Requirement
95
+ requirements:
96
+ - - ">="
97
+ - !ruby/object:Gem::Version
98
+ version: '0'
99
+ requirements: []
100
+ rubygems_version: 3.1.2
101
+ signing_key:
102
+ specification_version: 4
103
+ summary: nvm integration for Capistrano
104
+ test_files: []