capistrano3-pipenv 0.1.4 → 0.2.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 +4 -4
- data/README.md +47 -12
- data/lib/capistrano3/pipenv/tasks/hooks.cap +2 -0
- data/lib/capistrano3/pipenv/tasks/pipenv.cap +6 -4
- data/lib/capistrano3/pipenv/version.rb +1 -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: 866ee21161b239103cb66e750306e7b7200d4f38fed3d48d5ffb6103a9b61008
|
4
|
+
data.tar.gz: 73735f53a22ffbae6e9b94a0777d9977f7973b28ad20d95b4240679cbaa16e29
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 388b5d2c4b4371adad581eaba0e814b7b951d2eda537e03678970b4c647c60af81d7a3e6bf5a5760663fe54e233f3fb8f9e0bd6be02adaf0fce216eec19634d8
|
7
|
+
data.tar.gz: 9111b4e1922b4b3f997d10d565f9bc05407c68aa38f05b2174ee89071fa132d46192afcbc1a00be94f917a3a1bb3ac9ebea8fe146a390ff5d40781dcfaa3c4a9
|
data/README.md
CHANGED
@@ -1,35 +1,70 @@
|
|
1
1
|
# Capistrano3::Pipenv
|
2
2
|
|
3
|
-
|
4
|
-
|
5
|
-
TODO: Delete this and the text above, and describe your gem
|
3
|
+
Pipenv tasks for capistrano3.
|
6
4
|
|
7
5
|
## Installation
|
8
6
|
|
9
7
|
Add this line to your application's Gemfile:
|
10
8
|
|
11
9
|
```ruby
|
12
|
-
|
10
|
+
group :development do
|
11
|
+
gem 'capistrano3-pipenv', require: false
|
12
|
+
end
|
13
13
|
```
|
14
14
|
|
15
15
|
And then execute:
|
16
16
|
|
17
|
-
$ bundle
|
17
|
+
$ bundle install
|
18
18
|
|
19
|
-
|
19
|
+
## Usage
|
20
20
|
|
21
|
-
|
21
|
+
Require in `Capfile` to use the default task:
|
22
22
|
|
23
|
-
|
23
|
+
```ruby
|
24
|
+
require 'capistrano3/pipenv'
|
25
|
+
# If you are using pyenv
|
26
|
+
require 'capistrano3/pyenv'
|
27
|
+
```
|
28
|
+
|
29
|
+
The task will run before `deploy:updated` as part of Capistrano's default deploy, or can be run in isolation with `cap production pipenv:install`.
|
24
30
|
|
25
|
-
|
31
|
+
When you require the `capistrano3/pyenv`, the `pipenv` commands will be prefixed by `pyenv exec`.
|
32
|
+
|
33
|
+
Following are the default settings configurable in this gem.
|
34
|
+
|
35
|
+
```ruby
|
36
|
+
# for capistrano3/pipenv
|
37
|
+
|
38
|
+
set :pipenv_roles, :all
|
39
|
+
set :pipenv_servers, -> { release_roles(fetch(:pipenv_roles)) }
|
40
|
+
set :pipenv_flags, []
|
41
|
+
set :pipenv_env_variables, {}
|
42
|
+
set :pipenv_clean_options, '--all'
|
43
|
+
|
44
|
+
# for capistrano3/pyenv
|
45
|
+
set :pyenv_path, -> {
|
46
|
+
pyenv_path = fetch(:pyenv_custom_path)
|
47
|
+
pyenv_path ||
|
48
|
+
if fetch(:pyenv_type, :user) == :system
|
49
|
+
'/usr/local/pyenv'
|
50
|
+
else
|
51
|
+
'$HOME/.pyenv'
|
52
|
+
end
|
53
|
+
}
|
54
|
+
set :pyenv_roles, fetch(:pyenv_roles, :all)
|
55
|
+
set :pyenv_python_dir, -> { "#{fetch(:pyenv_path)}/versions/#{fetch(:pyenv_python)}" }
|
56
|
+
set :pyenv_map_bins, %w{pipenv}
|
57
|
+
```
|
26
58
|
|
27
59
|
## Development
|
28
60
|
|
29
|
-
|
61
|
+
In your project which uses capistrano (and this gem),
|
62
|
+
you'd probably want to try something like
|
30
63
|
|
31
|
-
|
64
|
+
```
|
65
|
+
gem 'capistrano3-pipenv', path: '/path/to/local/copy/of/this/repo'
|
66
|
+
```
|
32
67
|
|
33
68
|
## Contributing
|
34
69
|
|
35
|
-
Bug reports and pull requests are welcome on GitHub at https://github.com/
|
70
|
+
Bug reports and pull requests are welcome on GitHub at https://github.com/Yuki-Inoue/capistrano3-pipenv .
|
@@ -1,3 +1,5 @@
|
|
1
|
+
# -*- mode: ruby; -*-
|
2
|
+
|
1
3
|
namespace :pipenv do
|
2
4
|
desc <<-DESC
|
3
5
|
Install the current Pipenv environment.
|
@@ -7,7 +9,7 @@ namespace :pipenv do
|
|
7
9
|
set :pipenv_roles, :all
|
8
10
|
|
9
11
|
set :pipenv_servers, -> { release_roles(fetch(:pipenv_roles)) }
|
10
|
-
set :pipenv_flags,
|
12
|
+
set :pipenv_flags, []
|
11
13
|
set :pipenv_env_variables, {}
|
12
14
|
set :pipenv_clean_options, '--all'
|
13
15
|
DESC
|
@@ -16,8 +18,8 @@ namespace :pipenv do
|
|
16
18
|
within release_path do
|
17
19
|
with fetch(:pipenv_env_variables) do
|
18
20
|
options = []
|
19
|
-
options <<
|
20
|
-
execute :pipenv, :
|
21
|
+
options << fetch(:pipenv_flags) unless fetch(:pipenv_flags).empty?
|
22
|
+
execute :pipenv, :sync, *options
|
21
23
|
end
|
22
24
|
end
|
23
25
|
end
|
@@ -39,7 +41,7 @@ namespace :load do
|
|
39
41
|
task :defaults do
|
40
42
|
set :pipenv_roles, :all
|
41
43
|
set :pipenv_servers, -> { release_roles(fetch(:pipenv_roles)) }
|
42
|
-
set :pipenv_flags,
|
44
|
+
set :pipenv_flags, []
|
43
45
|
set :pipenv_env_variables, {}
|
44
46
|
set :pipenv_clean_options, "--all"
|
45
47
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: capistrano3-pipenv
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.2.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Yuki INOUE
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2019-
|
11
|
+
date: 2019-06-20 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: capistrano
|