capistrano-bun 1.0.3
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 +7 -0
- data/Gemfile +4 -0
- data/LICENSE +20 -0
- data/LICENSE.txt +22 -0
- data/README.md +59 -0
- data/Rakefile +1 -0
- data/capistrano-bun.gemspec +24 -0
- data/lib/capistrano/bun.rb +1 -0
- data/lib/capistrano/tasks/bun.rake +76 -0
- data/lib/capistrano-bun.rb +0 -0
- metadata +94 -0
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: f7a28c3958498f0db27c352a3ca9d1c5eef6a5026e46318bfa76f6cee1b6b08f
|
4
|
+
data.tar.gz: fe736103a693d1a25e4aca03005281e8531551dc00218d0caa66e2249b4a6578
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: a3a0816c55db3fb04bba4763650216535cefc4a101e5b96552360e605fd185da903027b6dc641434453fea804ba5e6e69aa643574fbb7093b7b241ffc10799b0
|
7
|
+
data.tar.gz: 6fd31c98d80a0757c78f5ba6e615bd3e0be1f4f62ee87e493452ababf34e80b5cd61b566fc174f6af840c6c47cb462b0104dbc5c6f9917f5183e38ba542de21d
|
data/Gemfile
ADDED
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,59 @@
|
|
1
|
+
# Capistrano::bun
|
2
|
+
|
3
|
+
bun 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-bun'
|
12
|
+
```
|
13
|
+
|
14
|
+
And then execute:
|
15
|
+
|
16
|
+
$ bundle
|
17
|
+
|
18
|
+
Or install it yourself as:
|
19
|
+
|
20
|
+
$ gem install capistrano-bun
|
21
|
+
|
22
|
+
## Usage
|
23
|
+
|
24
|
+
Require in `Capfile` to use the default task:
|
25
|
+
|
26
|
+
```ruby
|
27
|
+
require 'capistrano/bun'
|
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 bun:install`
|
32
|
+
|
33
|
+
Configurable options:
|
34
|
+
|
35
|
+
```ruby
|
36
|
+
set :bun_target_path, -> { release_path.join('subdir') } # default not set
|
37
|
+
set :bun_flags, '--production --silent --no-progress' # default
|
38
|
+
set :bun_roles, :all # default
|
39
|
+
set :bun_env_variables, {} # default
|
40
|
+
set :bun_method, 'install' # default
|
41
|
+
```
|
42
|
+
|
43
|
+
### bun Method
|
44
|
+
|
45
|
+
As of version 5.7.0 of bun, a new install method (`ci`) was introduced which utilises
|
46
|
+
the `package-lock.json` file. Change `bun_method` to `ci` in order to use make
|
47
|
+
use of the improved installation method.
|
48
|
+
|
49
|
+
### Dependencies
|
50
|
+
|
51
|
+
bun 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`.
|
52
|
+
|
53
|
+
## Contributing
|
54
|
+
|
55
|
+
1. Fork it
|
56
|
+
2. Create your feature branch (`git checkout -b my-new-feature`)
|
57
|
+
3. Commit your changes (`git commit -am 'Add some feature'`)
|
58
|
+
4. Push to the branch (`git push origin my-new-feature`)
|
59
|
+
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-bun'
|
7
|
+
spec.version = '1.0.3'
|
8
|
+
spec.authors = ['Ferhat Ziba']
|
9
|
+
spec.email = ['fero.ziba@gmail.com']
|
10
|
+
spec.description = %q{bun support for Capistrano 3.x}
|
11
|
+
spec.summary = %q{bun support for Capistrano 3.x}
|
12
|
+
spec.homepage = 'https://github.com/fero46/bun'
|
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/bun.rake', __FILE__)
|
@@ -0,0 +1,76 @@
|
|
1
|
+
namespace :bun do
|
2
|
+
desc <<-DESC
|
3
|
+
Install the project dependencies via bun. 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 :bun_target_path, nil
|
10
|
+
set :bun_flags, '--production --silent --no-spin'
|
11
|
+
set :bun_roles, :all
|
12
|
+
set :bun_env_variables, {}
|
13
|
+
set :bun_method, 'install'
|
14
|
+
DESC
|
15
|
+
task :install do
|
16
|
+
on roles fetch(:bun_roles) do
|
17
|
+
within fetch(:bun_target_path, release_path) do
|
18
|
+
with fetch(:bun_env_variables, {}) do
|
19
|
+
execute :bun, fetch(:bun_method), fetch(:bun_flags)
|
20
|
+
end
|
21
|
+
end
|
22
|
+
end
|
23
|
+
end
|
24
|
+
|
25
|
+
before 'deploy:updated', 'bun:install'
|
26
|
+
|
27
|
+
desc <<-DESC
|
28
|
+
Remove extraneous packages via bun. This command is executed within \
|
29
|
+
the same context as bun install using the bun_roles and bun_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 :bun_prune_flags, '--production'
|
36
|
+
|
37
|
+
This task is strictly opt-in. If you want to run it on every deployment \
|
38
|
+
before you run bun install, add the following to your deploy.rb.
|
39
|
+
|
40
|
+
before 'bun:install', 'bun:prune'
|
41
|
+
DESC
|
42
|
+
task :prune do
|
43
|
+
on roles fetch(:bun_roles) do
|
44
|
+
within fetch(:bun_target_path, release_path) do
|
45
|
+
execute :bun, 'prune', fetch(:bun_prune_flags)
|
46
|
+
end
|
47
|
+
end
|
48
|
+
end
|
49
|
+
|
50
|
+
desc <<-DESC
|
51
|
+
Rebuild via bun. This command is executed within the same context \
|
52
|
+
as bun install using the bun_roles and bun_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 bun versions on the server.
|
57
|
+
DESC
|
58
|
+
task :rebuild do
|
59
|
+
on roles fetch(:bun_roles) do
|
60
|
+
within fetch(:bun_target_path, release_path) do
|
61
|
+
with fetch(:bun_env_variables, {}) do
|
62
|
+
execute :bun, 'rebuild'
|
63
|
+
end
|
64
|
+
end
|
65
|
+
end
|
66
|
+
end
|
67
|
+
end
|
68
|
+
|
69
|
+
namespace :load do
|
70
|
+
task :defaults do
|
71
|
+
set :bun_flags, %w(--production --silent --no-progress)
|
72
|
+
set :bun_prune_flags, '--production'
|
73
|
+
set :bun_roles, :all
|
74
|
+
set :bun_method, 'install'
|
75
|
+
end
|
76
|
+
end
|
File without changes
|
metadata
ADDED
@@ -0,0 +1,94 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: capistrano-bun
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 1.0.3
|
5
|
+
platform: ruby
|
6
|
+
authors:
|
7
|
+
- Ferhat Ziba
|
8
|
+
autorequire:
|
9
|
+
bindir: bin
|
10
|
+
cert_chain: []
|
11
|
+
date: 2024-11-10 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: bun support for Capistrano 3.x
|
56
|
+
email:
|
57
|
+
- fero.ziba@gmail.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-bun.gemspec
|
68
|
+
- lib/capistrano-bun.rb
|
69
|
+
- lib/capistrano/bun.rb
|
70
|
+
- lib/capistrano/tasks/bun.rake
|
71
|
+
homepage: https://github.com/fero46/bun
|
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
|
+
rubygems_version: 3.5.3
|
91
|
+
signing_key:
|
92
|
+
specification_version: 4
|
93
|
+
summary: bun support for Capistrano 3.x
|
94
|
+
test_files: []
|