capistrano3-pipenv 0.1.4 → 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: 639d28e123f319791f0b5cc81650a162d6bda71adca6ea93b7637dd8ccc530c4
4
- data.tar.gz: bb70763d6bcbda62f4ea59b607a0ccb65a4a7c0a7c2b192c8ff148d0204fa44e
3
+ metadata.gz: 866ee21161b239103cb66e750306e7b7200d4f38fed3d48d5ffb6103a9b61008
4
+ data.tar.gz: 73735f53a22ffbae6e9b94a0777d9977f7973b28ad20d95b4240679cbaa16e29
5
5
  SHA512:
6
- metadata.gz: 5abd541d05ef46d094c63e28cbb9b9b4caab99ed40aa48ef4c43467f9d816c8cb9c641249a892352af0bbfa4989bdecfabe49691473271435db6355f0917790a
7
- data.tar.gz: 43c7efdd16c1c3cea335a8a4f727b7c185999656c9a8bc2b78ca7d49fb6e37387da2f696b046c1f48bcaacd586ee442a412d9927ae19ec51832e283c360d3cad
6
+ metadata.gz: 388b5d2c4b4371adad581eaba0e814b7b951d2eda537e03678970b4c647c60af81d7a3e6bf5a5760663fe54e233f3fb8f9e0bd6be02adaf0fce216eec19634d8
7
+ data.tar.gz: 9111b4e1922b4b3f997d10d565f9bc05407c68aa38f05b2174ee89071fa132d46192afcbc1a00be94f917a3a1bb3ac9ebea8fe146a390ff5d40781dcfaa3c4a9
data/README.md CHANGED
@@ -1,35 +1,70 @@
1
1
  # Capistrano3::Pipenv
2
2
 
3
- Welcome to your new gem! In this directory, you'll find the files you need to be able to package up your Ruby library into a gem. Put your Ruby code in the file `lib/capistrano3/pipenv`. To experiment with that code, run `bin/console` for an interactive prompt.
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
- gem 'capistrano3-pipenv'
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
- Or install it yourself as:
19
+ ## Usage
20
20
 
21
- $ gem install capistrano3-pipenv
21
+ Require in `Capfile` to use the default task:
22
22
 
23
- ## Usage
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
- TODO: Write usage instructions here
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
- After checking out the repo, run `bin/setup` to install dependencies. You can also run `bin/console` for an interactive prompt that will allow you to experiment.
61
+ In your project which uses capistrano (and this gem),
62
+ you'd probably want to try something like
30
63
 
31
- To install this gem onto your local machine, run `bundle exec rake install`. To release a new version, update the version number in `version.rb`, and then run `bundle exec rake release`, which will create a git tag for the version, push git commits and tags, and push the `.gem` file to [rubygems.org](https://rubygems.org).
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/[USERNAME]/capistrano3-pipenv.
70
+ Bug reports and pull requests are welcome on GitHub at https://github.com/Yuki-Inoue/capistrano3-pipenv .
@@ -1,2 +1,4 @@
1
+ # -*- mode: ruby; -*-
2
+
1
3
  before 'deploy:updated', 'pipenv:install'
2
4
  before 'deploy:reverted', 'pipenv:install'
@@ -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, '--deploy'
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 << "#{fetch(:pipenv_flags)}" if fetch(:pipenv_flags)
20
- execute :pipenv, :install, *options
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, '--deploy'
44
+ set :pipenv_flags, []
43
45
  set :pipenv_env_variables, {}
44
46
  set :pipenv_clean_options, "--all"
45
47
  end
@@ -1,5 +1,5 @@
1
1
  module Capistrano3
2
2
  module Pipenv
3
- VERSION = "0.1.4"
3
+ VERSION = "0.2.0"
4
4
  end
5
5
  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.1.4
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-04-04 00:00:00.000000000 Z
11
+ date: 2019-06-20 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: capistrano