capistrano-pyenv 0.0.7 → 0.0.8
Sign up to get free protection for your applications and to get access to all the features.
- data/README.md +0 -1
- data/lib/capistrano-pyenv/deploy.rb +17 -18
- data/lib/capistrano-pyenv/version.rb +1 -1
- metadata +2 -2
data/README.md
CHANGED
@@ -30,7 +30,6 @@ Following options are available to manage your pyenv.
|
|
30
30
|
* `:pyenv_branch` - the git branch to install `pyenv` from. use `master` by default.
|
31
31
|
* `:pyenv_cmd` - the `pyenv` command.
|
32
32
|
* `:pyenv_path` - the path where `pyenv` will be installed. use `$HOME/.pyenv` by default.
|
33
|
-
* `:pyenv_plugins_options` - install options for pyenv plugins.
|
34
33
|
* `:pyenv_plugins` - pyenv plugins to install. do nothing by default.
|
35
34
|
* `:pyenv_repository` - repository URL of pyenv.
|
36
35
|
* `:pyenv_python_dependencies` - depedency packages.
|
@@ -19,12 +19,10 @@ module Capistrano
|
|
19
19
|
_cset(:pyenv_repository, 'git://github.com/yyuu/pyenv.git')
|
20
20
|
_cset(:pyenv_branch, 'master')
|
21
21
|
|
22
|
-
_cset(:pyenv_plugins
|
23
|
-
|
24
|
-
}
|
25
|
-
_cset(:pyenv_plugins_options, {
|
26
|
-
'python-virtualenv' => {:branch => 'master'},
|
27
|
-
})
|
22
|
+
_cset(:pyenv_plugins) {{
|
23
|
+
"python-virtualenv" => { :repository => "git://github.com/yyuu/python-virtualenv.git", :branch => "master" },
|
24
|
+
}}
|
25
|
+
_cset(:pyenv_plugins_options, {}) # for backward compatibility. plugin options can be configured from :pyenv_plugins.
|
28
26
|
_cset(:pyenv_plugins_path) {
|
29
27
|
File.join(pyenv_path, 'plugins')
|
30
28
|
}
|
@@ -45,16 +43,16 @@ module Capistrano
|
|
45
43
|
|
46
44
|
def pyenv_update_repository(destination, options={})
|
47
45
|
configuration = Capistrano::Configuration.new()
|
46
|
+
options = {
|
47
|
+
:source => proc { Capistrano::Deploy::SCM.new(configuration[:scm], configuration) },
|
48
|
+
:revision => proc { configuration[:source].head },
|
49
|
+
:real_revision => proc {
|
50
|
+
configuration[:source].local.query_revision(configuration[:revision]) { |cmd| with_env("LC_ALL", "C") { run_locally(cmd) } }
|
51
|
+
},
|
52
|
+
}.merge(options)
|
48
53
|
variables.merge(options).each do |key, val|
|
49
54
|
configuration.set(key, val)
|
50
55
|
end
|
51
|
-
configuration.set(:source) { Capistrano::Deploy::SCM.new(configuration[:scm], configuration) }
|
52
|
-
configuration.set(:revision) { configuration[:source].head }
|
53
|
-
configuration.set(:real_revision) {
|
54
|
-
configuration[:source].local.query_revision(configuration[:revision]) { |cmd|
|
55
|
-
with_env("LC_ALL", "C") { run_locally(cmd) }
|
56
|
-
}
|
57
|
-
}
|
58
56
|
source = configuration[:source]
|
59
57
|
revision = configuration[:real_revision]
|
60
58
|
#
|
@@ -88,11 +86,12 @@ module Capistrano
|
|
88
86
|
namespace(:plugins) {
|
89
87
|
desc("Update pyenv plugins.")
|
90
88
|
task(:update, :except => { :no_release => true }) {
|
91
|
-
pyenv_plugins.each
|
92
|
-
options
|
93
|
-
|
94
|
-
|
95
|
-
|
89
|
+
pyenv_plugins.each do |name, repository|
|
90
|
+
# for backward compatibility, obtain plugin options from :pyenv_plugins_options first
|
91
|
+
options = pyenv_plugins_options.fetch(name, {})
|
92
|
+
options = options.merge(Hash === repository ? repository : {:repository => repository})
|
93
|
+
pyenv_update_repository(File.join(pyenv_plugins_path, name), options.merge(:scm => :git))
|
94
|
+
end
|
96
95
|
}
|
97
96
|
}
|
98
97
|
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: capistrano-pyenv
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.8
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2012-12-
|
12
|
+
date: 2012-12-18 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: capistrano
|