capistrano-pnpm 1.0.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 ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA256:
3
+ metadata.gz: 62f36177b99727fd8e1eda7909d667a0a294e4dc2aa0050e3224d2e42431c804
4
+ data.tar.gz: b6dc5a4ee246a94ac19e0c549f9bddcdb94d7628f2dda8189045da1e3168d0fa
5
+ SHA512:
6
+ metadata.gz: 8210e90cee5a7859fce446aa8277e62efabb04a50894c531602e71b84b49a116bc5286e09871b59fc4875788a97fae9fe5b733b7e71d4853be233288579a26b5
7
+ data.tar.gz: 6f4897c373fa28f7ff08f7e167020110c449625e9d4685e562d3ea791fed7e3a84c7197106fdd9cc502b66551f118d28462daddd1ee900e26e57f29b9423b730
data/Gemfile ADDED
@@ -0,0 +1,4 @@
1
+ source 'https://rubygems.org'
2
+
3
+ # Specify your gem's dependencies in capistrano-bundler.gemspec
4
+ gemspec
data/LICENSE ADDED
@@ -0,0 +1,20 @@
1
+ The MIT License (MIT)
2
+
3
+ Copyright (c) 2013 Capistrano, your one stop deployment shop.
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy of
6
+ this software and associated documentation files (the "Software"), to deal in
7
+ the Software without restriction, including without limitation the rights to
8
+ use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
9
+ the Software, and to permit persons to whom the Software is furnished to do so,
10
+ subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
17
+ FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
18
+ COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
19
+ IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
20
+ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
data/LICENSE.txt ADDED
@@ -0,0 +1,22 @@
1
+ Copyright (c) 2013 swalkinshaw
2
+
3
+ MIT License
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining
6
+ a copy of this software and associated documentation files (the
7
+ "Software"), to deal in the Software without restriction, including
8
+ without limitation the rights to use, copy, modify, merge, publish,
9
+ distribute, sublicense, and/or sell copies of the Software, and to
10
+ permit persons to whom the Software is furnished to do so, subject to
11
+ the following conditions:
12
+
13
+ The above copyright notice and this permission notice shall be
14
+ included in all copies or substantial portions of the Software.
15
+
16
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
17
+ EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
18
+ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
19
+ NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
20
+ LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
21
+ OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
22
+ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
data/README.md ADDED
@@ -0,0 +1,53 @@
1
+ # Capistrano::pnpm
2
+
3
+ pnpm support for Capistrano 3.x
4
+
5
+ ## Installation
6
+
7
+ Add this line to your application's Gemfile:
8
+
9
+ ```ruby
10
+ gem 'capistrano', '~> 3.1.0'
11
+ gem 'capistrano-pnpm'
12
+ ```
13
+
14
+ And then execute:
15
+
16
+ $ bundle
17
+
18
+ Or install it yourself as:
19
+
20
+ $ gem install capistrano-pnpm
21
+
22
+ ## Usage
23
+
24
+ Require in `Capfile` to use the default task:
25
+
26
+ ```ruby
27
+ require 'capistrano/pnpm'
28
+ ```
29
+
30
+ The task will run before `deploy:updated` as part of Capistrano's default deploy,
31
+ or can be run in isolation with `cap production pnpm:install`
32
+
33
+ Configurable options:
34
+
35
+ ```ruby
36
+ set :npm_target_path, -> { release_path.join('subdir') } # default not set
37
+ set :npm_flags, '--production --silent --no-progress' # default
38
+ set :npm_roles, :all # default
39
+ set :npm_env_variables, {} # default
40
+ set :npm_method, 'install' # default
41
+ ```
42
+
43
+ ### Dependencies
44
+
45
+ npm allows for normal `dependencies` and `devDependencies`. By default this gem uses `'--production --silent --no-progress'` as the install flags which will **only** install `dependencies` and skip `devDependencies`. If you want your `devDependencies` installed as well, then remove `--production`.
46
+
47
+ ## Contributing
48
+
49
+ 1. Fork it
50
+ 2. Create your feature branch (`git checkout -b my-new-feature`)
51
+ 3. Commit your changes (`git commit -am 'Add some feature'`)
52
+ 4. Push to the branch (`git push origin my-new-feature`)
53
+ 5. Create new Pull Request
data/Rakefile ADDED
@@ -0,0 +1 @@
1
+ require 'bundler/gem_tasks'
@@ -0,0 +1,24 @@
1
+ # coding: 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 |spec|
6
+ spec.name = 'capistrano-pnpm'
7
+ spec.version = '1.0.0'
8
+ spec.authors = ['Alex Butler']
9
+ spec.email = ['alex@alex-j-butler.com']
10
+ spec.description = %q{pnpm support for Capistrano 3.x}
11
+ spec.summary = %q{pnpm support for Capistrano 3.x}
12
+ spec.homepage = 'https://github.com/Qixalite/pnpm'
13
+ spec.license = 'MIT'
14
+
15
+ spec.files = `git ls-files`.split($/)
16
+ spec.executables = spec.files.grep(%r{^bin/}) { |f| File.basename(f) }
17
+ spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
18
+ spec.require_paths = ['lib']
19
+
20
+ spec.add_dependency 'capistrano', '>= 3.0.0'
21
+
22
+ spec.add_development_dependency 'bundler', '~> 1.3'
23
+ spec.add_development_dependency 'rake'
24
+ end
@@ -0,0 +1 @@
1
+ load File.expand_path('../tasks/npm.rake', __FILE__)
@@ -0,0 +1,76 @@
1
+ namespace :pnpm do
2
+ desc <<-DESC
3
+ Install the project dependencies via pnpm. By default, devDependencies \
4
+ will not be installed. The install command is executed \
5
+ with the --production, --silent and --no-spin flags.
6
+
7
+ You can override any of these defaults by setting the variables shown below.
8
+
9
+ set :pnpm_target_path, nil
10
+ set :pnpm_flags, '--production --silent --no-spin'
11
+ set :pnpm_roles, :all
12
+ set :pnpm_env_variables, {}
13
+ set :pnpm_method, 'install'
14
+ DESC
15
+ task :install do
16
+ on roles fetch(:pnpm_roles) do
17
+ within fetch(:pnpm_target_path, release_path) do
18
+ with fetch(:pnpm_env_variables, {}) do
19
+ execute :pnpm, fetch(:pnpm_method), fetch(:pnpm_flags)
20
+ end
21
+ end
22
+ end
23
+ end
24
+
25
+ before 'deploy:updated', 'pnpm:install'
26
+
27
+ desc <<-DESC
28
+ Remove extraneous packages via pnpm. This command is executed within \
29
+ the same context as npm install using the npm_roles and npm_target_path \
30
+ variables.
31
+
32
+ By default prune will be executed with the --production flag. You can \
33
+ override this default by setting the variable shown below.
34
+
35
+ set :pnpm_prune_flags, '--production'
36
+
37
+ This task is strictly opt-in. If you want to run it on every deployment \
38
+ before you run npm install, add the following to your deploy.rb.
39
+
40
+ before 'pnpm:install', 'pnpm:prune'
41
+ DESC
42
+ task :prune do
43
+ on roles fetch(:pnpm_roles) do
44
+ within fetch(:pnpm_target_path, release_path) do
45
+ execute :pnpm, 'prune', fetch(:pnpm_prune_flags)
46
+ end
47
+ end
48
+ end
49
+
50
+ desc <<-DESC
51
+ Rebuild via pnpm. This command is executed within the same context \
52
+ as pnpm install using the pnpm_roles and pnpm_target_path \
53
+ variables.
54
+
55
+ This task is strictly opt-in. The main reason you'll want to run this \
56
+ would be after changing npm versions on the server.
57
+ DESC
58
+ task :rebuild do
59
+ on roles fetch(:pnpm_roles) do
60
+ within fetch(:pnpm_target_path, release_path) do
61
+ with fetch(:pnpm_env_variables, {}) do
62
+ execute :pnpm, 'rebuild'
63
+ end
64
+ end
65
+ end
66
+ end
67
+ end
68
+
69
+ namespace :load do
70
+ task :defaults do
71
+ set :pnpm_flags, %w(--production --silent --no-progress)
72
+ set :pnpm_prune_flags, '--production'
73
+ set :pnpm_roles, :all
74
+ set :pnpm_method, 'install'
75
+ end
76
+ end
File without changes
metadata ADDED
@@ -0,0 +1,95 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: capistrano-pnpm
3
+ version: !ruby/object:Gem::Version
4
+ version: 1.0.0
5
+ platform: ruby
6
+ authors:
7
+ - Alex Butler
8
+ autorequire:
9
+ bindir: bin
10
+ cert_chain: []
11
+ date: 2019-03-12 00:00:00.000000000 Z
12
+ dependencies:
13
+ - !ruby/object:Gem::Dependency
14
+ name: capistrano
15
+ requirement: !ruby/object:Gem::Requirement
16
+ requirements:
17
+ - - ">="
18
+ - !ruby/object:Gem::Version
19
+ version: 3.0.0
20
+ type: :runtime
21
+ prerelease: false
22
+ version_requirements: !ruby/object:Gem::Requirement
23
+ requirements:
24
+ - - ">="
25
+ - !ruby/object:Gem::Version
26
+ version: 3.0.0
27
+ - !ruby/object:Gem::Dependency
28
+ name: bundler
29
+ requirement: !ruby/object:Gem::Requirement
30
+ requirements:
31
+ - - "~>"
32
+ - !ruby/object:Gem::Version
33
+ version: '1.3'
34
+ type: :development
35
+ prerelease: false
36
+ version_requirements: !ruby/object:Gem::Requirement
37
+ requirements:
38
+ - - "~>"
39
+ - !ruby/object:Gem::Version
40
+ version: '1.3'
41
+ - !ruby/object:Gem::Dependency
42
+ name: rake
43
+ requirement: !ruby/object:Gem::Requirement
44
+ requirements:
45
+ - - ">="
46
+ - !ruby/object:Gem::Version
47
+ version: '0'
48
+ type: :development
49
+ prerelease: false
50
+ version_requirements: !ruby/object:Gem::Requirement
51
+ requirements:
52
+ - - ">="
53
+ - !ruby/object:Gem::Version
54
+ version: '0'
55
+ description: pnpm support for Capistrano 3.x
56
+ email:
57
+ - alex@alex-j-butler.com
58
+ executables: []
59
+ extensions: []
60
+ extra_rdoc_files: []
61
+ files:
62
+ - Gemfile
63
+ - LICENSE
64
+ - LICENSE.txt
65
+ - README.md
66
+ - Rakefile
67
+ - capistrano-pnpm.gemspec
68
+ - lib/capistrano-pnpm.rb
69
+ - lib/capistrano/pnpm.rb
70
+ - lib/capistrano/tasks/pnpm.rake
71
+ homepage: https://github.com/Qixalite/pnpm
72
+ licenses:
73
+ - MIT
74
+ metadata: {}
75
+ post_install_message:
76
+ rdoc_options: []
77
+ require_paths:
78
+ - lib
79
+ required_ruby_version: !ruby/object:Gem::Requirement
80
+ requirements:
81
+ - - ">="
82
+ - !ruby/object:Gem::Version
83
+ version: '0'
84
+ required_rubygems_version: !ruby/object:Gem::Requirement
85
+ requirements:
86
+ - - ">="
87
+ - !ruby/object:Gem::Version
88
+ version: '0'
89
+ requirements: []
90
+ rubyforge_project:
91
+ rubygems_version: 2.7.6
92
+ signing_key:
93
+ specification_version: 4
94
+ summary: pnpm support for Capistrano 3.x
95
+ test_files: []