capistrano-pyenv 0.0.11 → 1.0.0rc1

Sign up to get free protection for your applications and to get access to all the features.
data/README.md CHANGED
@@ -35,10 +35,13 @@ Following options are available to manage your pyenv.
35
35
  * `:pyenv_python_dependencies` - depedency packages.
36
36
  * `:pyenv_python_version` - the python version to install. install `2.7.3` by default.
37
37
  * `:pyenv_use_virtualenv` - create new virtualenv from `:pyenv_virtualenv_python_version`. `false` by default. `:pyenv_python_version` will be treated as the name of the virtualenv if this is turned `true`.
38
+ * `:pyenv_install_dependencies` - controls whether installing dependencies or not. `true` if the required packages are missing.
39
+ * `:pyenv_setup_shell` - setup pyenv in your shell config or not. `true` by default. users who are using Chef/Puppet may prefer setting this value `false`.
40
+ * `:pyenv_setup_default_environment` - setup `PYENV_ROOT` and update `PATH` to use pyenv over capistrano. `true` by default.
41
+ * `:pyenv_configure_files` - list of shell configuration files to be configured for pyenv. by default, guessing from user's `$SHELL` and `$HOME`.
42
+ * `:pyenv_configure_basenames` - advanced option for `:pyenv_configure_files`. list of filename of your shell configuration files if you don't like the default value of `:pyenv_configure_files`.
38
43
  * `:pyenv_virtualenv_python_version` - the python version to create virtualenv. `2.7.3` by default.
39
44
  * `:pyenv_virtualenv_options` - command-line options for virtualenv.
40
- * `:pyenv_install_dependencies` - controls whether installing dependencies or not. `true` by default.
41
- * `:pyenv_define_default_environment` - define `PYENV_ROOT` and update `PATH` to use pyenv over capistrano. `true` by default.
42
45
 
43
46
  ## Contributing
44
47
 
@@ -16,4 +16,7 @@ Gem::Specification.new do |gem|
16
16
  gem.version = Capistrano::PyEnv::VERSION
17
17
 
18
18
  gem.add_dependency("capistrano")
19
+ gem.add_development_dependency("net-scp", "~> 1.0.4")
20
+ gem.add_development_dependency("net-ssh", "~> 2.2.2")
21
+ gem.add_development_dependency("vagrant", "~> 1.0.6")
19
22
  end
@@ -1,5 +1,5 @@
1
1
  module Capistrano
2
2
  module PyEnv
3
- VERSION = "0.0.11"
3
+ VERSION = "1.0.0rc1"
4
4
  end
5
5
  end
@@ -33,21 +33,33 @@ module Capistrano
33
33
  _cset(:pyenv_python_version, "2.7.3")
34
34
 
35
35
  _cset(:pyenv_use_virtualenv, false)
36
- _cset(:pyenv_virtualenv_python_version, '2.7.3')
36
+ _cset(:pyenv_virtualenv_python_version, "2.7.3")
37
37
  _cset(:pyenv_virtualenv_options, %w(--distribute --quiet --system-site-packages))
38
38
 
39
- _cset(:pyenv_install_dependencies, true)
39
+ _cset(:pyenv_install_dependencies) {
40
+ if pyenv_python_dependencies.empty?
41
+ false
42
+ else
43
+ status = case pyenv_platform
44
+ when /(debian|ubuntu)/i
45
+ capture("dpkg-query -s #{pyenv_python_dependencies.map { |x| x.dump }.join(" ")} 1>/dev/null 2>&1 || echo required")
46
+ when /redhat/i
47
+ capture("rpm -qi #{pyenv_python_dependencies.map { |x| x.dump }.join(" ")} 1>/dev/null 2>&1 || echo required")
48
+ end
49
+ true and (/required/i =~ status)
50
+ end
51
+ }
40
52
 
41
53
  desc("Setup pyenv.")
42
54
  task(:setup, :except => { :no_release => true }) {
43
55
  dependencies if pyenv_install_dependencies
44
56
  update
45
- configure
57
+ configure if pyenv_setup_shell
46
58
  build
47
59
  }
48
60
  after 'deploy:setup', 'pyenv:setup'
49
61
 
50
- def pyenv_update_repository(destination, options={})
62
+ def _update_repository(destination, options={})
51
63
  configuration = Capistrano::Configuration.new()
52
64
  options = {
53
65
  :source => proc { Capistrano::Deploy::SCM.new(configuration[:scm], configuration) },
@@ -80,27 +92,34 @@ module Capistrano
80
92
 
81
93
  desc("Update pyenv installation.")
82
94
  task(:update, :except => { :no_release => true }) {
83
- pyenv_update_repository(pyenv_path, :scm => :git, :repository => pyenv_repository, :branch => pyenv_branch)
95
+ _update_repository(pyenv_path, :scm => :git, :repository => pyenv_repository, :branch => pyenv_branch)
84
96
  plugins.update
85
97
  }
86
98
 
87
- def setup_default_environment
99
+ def _setup_default_environment
88
100
  env = fetch(:default_environment, {}).dup
89
101
  env["PYENV_ROOT"] = pyenv_path
90
102
  env["PATH"] = [ pyenv_shims_path, pyenv_bin_path, env.fetch("PATH", "$PATH") ].join(":")
91
103
  set(:default_environment, env)
92
104
  end
93
105
 
94
- _cset(:pyenv_define_default_environment, true)
106
+ _cset(:pyenv_setup_default_environment) {
107
+ if exists?(:pyenv_define_default_environment)
108
+ logger.info(":pyenv_define_default_environment has been deprecated. use :pyenv_setup_default_environment instead.")
109
+ fetch(:pyenv_define_default_environment, true)
110
+ else
111
+ true
112
+ end
113
+ }
95
114
  # workaround for `multistage` of capistrano-ext.
96
115
  # https://github.com/yyuu/capistrano-rbenv/pull/5
97
116
  if top.namespaces.key?(:multistage)
98
117
  after "multistage:ensure" do
99
- setup_default_environment if pyenv_define_default_environment
118
+ _setup_default_environment if pyenv_setup_default_environment
100
119
  end
101
120
  else
102
121
  on :start do
103
- setup_default_environment if pyenv_define_default_environment
122
+ _setup_default_environment if pyenv_setup_default_environment
104
123
  end
105
124
  end
106
125
 
@@ -116,7 +135,7 @@ module Capistrano
116
135
  # for backward compatibility, obtain plugin options from :pyenv_plugins_options first
117
136
  options = pyenv_plugins_options.fetch(name, {})
118
137
  options = options.merge(Hash === repository ? repository : {:repository => repository})
119
- pyenv_update_repository(File.join(pyenv_plugins_path, name), options.merge(:scm => :git))
138
+ _update_repository(File.join(pyenv_plugins_path, name), options.merge(:scm => :git))
120
139
  end
121
140
  }
122
141
  }
@@ -149,7 +168,7 @@ module Capistrano
149
168
  EOS
150
169
  }
151
170
 
152
- def _update_config(script_file, file, tempfile)
171
+ def _do_update_config(script_file, file, tempfile)
153
172
  execute = []
154
173
  ## (1) ensure copy source file exists
155
174
  execute << "( test -f #{file.dump} || touch #{file.dump} )"
@@ -167,27 +186,33 @@ module Capistrano
167
186
  run(execute.join(" && "))
168
187
  end
169
188
 
170
- def update_config(script_file, file)
189
+ def _update_config(script_file, file)
171
190
  begin
172
191
  tempfile = capture("mktemp /tmp/pyenv.XXXXXXXXXX").strip
173
- _update_config(script_file, file, tempfile)
192
+ _do_update_config(script_file, file, tempfile)
174
193
  ensure
175
194
  run("rm -f #{tempfile.dump}") rescue nil
176
195
  end
177
196
  end
178
197
 
198
+ _cset(:pyenv_setup_shell) {
199
+ if exists?(:pyenv_use_configure)
200
+ logger.info(":pyenv_use_configure has been deprecated. please use :pyenv_setup_shell instead.")
201
+ fetch(:pyenv_use_configure, true)
202
+ else
203
+ true
204
+ end
205
+ }
179
206
  _cset(:pyenv_configure_signature, '##pyenv:configure')
180
207
  task(:configure, :except => { :no_release => true }) {
181
- if fetch(:pyenv_use_configure, true)
182
- begin
183
- script_file = capture("mktemp /tmp/pyenv.XXXXXXXXXX").strip
184
- top.put(pyenv_configure_script, script_file)
185
- [ pyenv_configure_files ].flatten.each do |file|
186
- update_config(script_file, file)
187
- end
188
- ensure
189
- run("rm -f #{script_file.dump}") rescue nil
208
+ begin
209
+ script_file = capture("mktemp /tmp/pyenv.XXXXXXXXXX").strip
210
+ top.put(pyenv_configure_script, script_file)
211
+ [ pyenv_configure_files ].flatten.each do |file|
212
+ _update_config(script_file, file)
190
213
  end
214
+ ensure
215
+ run("rm -f #{script_file.dump}") rescue nil
191
216
  end
192
217
  }
193
218
 
@@ -220,49 +245,97 @@ module Capistrano
220
245
  unless pyenv_python_dependencies.empty?
221
246
  case pyenv_platform
222
247
  when /(debian|ubuntu)/i
223
- begin
224
- run("dpkg-query -s #{pyenv_python_dependencies.join(' ')} > /dev/null")
225
- rescue
226
- run("#{sudo} apt-get install -q -y #{pyenv_python_dependencies.join(' ')}")
227
- end
248
+ run("#{sudo} apt-get install -q -y #{pyenv_python_dependencies.map { |x| x.dump }.join(" ")}")
228
249
  when /redhat/i
229
- begin
230
- run("rpm -qi #{pyenv_python_dependencies.join(' ')} > /dev/null")
231
- rescue
232
- run("#{sudo} yum install -q -y #{pyenv_python_dependencies.join(' ')}")
233
- end
234
- else
235
- # nop
250
+ run("#{sudo} yum install -q -y #{pyenv_python_dependencies.map { |x| x.dump }.join(" ")}")
236
251
  end
237
252
  end
238
253
  }
239
254
 
255
+ _cset(:pyenv_python_versions) { pyenv.versions }
240
256
  desc("Build python within pyenv.")
241
257
  task(:build, :except => { :no_release => true }) {
242
- python = fetch(:pyenv_python_cmd, 'python')
258
+ reset!(:pyenv_python_versions)
259
+ python = fetch(:pyenv_python_cmd, "python")
243
260
  if pyenv_use_virtualenv
244
- if pyenv_virtualenv_python_version != 'system'
245
- # build python for virtualenv
246
- run("#{pyenv_bin} whence #{python} | fgrep -q #{pyenv_virtualenv_python_version} || " +
247
- "#{pyenv_bin} install #{pyenv_virtualenv_python_version}")
261
+ if pyenv_virtualenv_python_version != "system" and not pyenv_python_versions.include?(pyenv_virtualenv_python_version)
262
+ pyenv.install(pyenv_virtualenv_python_version)
248
263
  end
249
- if pyenv_python_version != 'system'
250
- # create virtualenv
251
- run("#{pyenv_bin} whence #{python} | fgrep -q #{pyenv_python_version} || " +
252
- "#{pyenv_bin} virtualenv #{pyenv_virtualenv_options.join(' ')} #{pyenv_virtualenv_python_version} #{pyenv_python_version}")
264
+ if pyenv_python_version != "system" and not pyenv_python_versions.include?(pyenv_python_version)
265
+ pyenv.virtualenv(pyenv_virtualenv_python_version, pyenv_python_version)
253
266
  end
254
267
  else
255
- if pyenv_python_version != 'system'
256
- run("#{pyenv_bin} whence #{python} | fgrep -q #{pyenv_python_version} || #{pyenv_bin} install #{pyenv_python_version}")
268
+ if pyenv_python_version != "system" and not pyenv_python_versions.include?(pyenv_python_version)
269
+ pyenv.install(pyenv_python_version)
257
270
  end
258
271
  end
259
-
260
- run("#{pyenv_cmd} exec #{python} --version && #{pyenv_cmd} global #{pyenv_python_version}")
272
+ pyenv.exec("#{python} --version") # chck if python is executable
273
+ pyenv.global(pyenv_python_version)
261
274
  }
262
275
 
263
276
  # call `pyenv rehash` to update shims.
264
- def rehash()
265
- run("#{pyenv_cmd} rehash")
277
+ def rehash(options={})
278
+ run("#{pyenv_cmd} rehash", options)
279
+ end
280
+
281
+ def global(version, options={})
282
+ run("#{pyenv_cmd} global #{version.dump}", options)
283
+ end
284
+
285
+ def local(version, options={})
286
+ path = options.delete(:path)
287
+ if path
288
+ run("cd #{path.dump} && #{pyenv_cmd} local #{version.dump}", options)
289
+ else
290
+ run("#{pyenv_cmd} local #{version.dump}", options)
291
+ end
292
+ end
293
+
294
+ def which(command, options={})
295
+ path = options.delete(:path)
296
+ if path
297
+ capture("cd #{path.dump} && #{pyenv_cmd} which #{command.dump}", options).strip
298
+ else
299
+ capture("#{pyenv_cmd} which #{command.dump}", options).strip
300
+ end
301
+ end
302
+
303
+ def exec(command, options={})
304
+ # users of pyenv.exec must sanitize their command line.
305
+ path = options.delete(:path)
306
+ if path
307
+ run("cd #{path.dump} && #{pyenv_cmd} exec #{command}", options)
308
+ else
309
+ run("#{pyenv_cmd} exec #{command}", options)
310
+ end
311
+ end
312
+
313
+ def versions(options={})
314
+ capture("#{pyenv_cmd} versions --bare", options).split(/(?:\r?\n)+/)
315
+ end
316
+
317
+ def available_versions(options={})
318
+ capture("#{pyenv_cmd} install --complete", options).split(/(?:\r?\n)+/)
319
+ end
320
+
321
+ _cset(:pyenv_install_python_threads) {
322
+ capture("cat /proc/cpuinfo | cut -f1 | grep processor | wc -l").to_i rescue 1
323
+ }
324
+ # create build processes as many as processor count
325
+ _cset(:pyenv_make_options) { "-j #{pyenv_install_python_threads}" }
326
+ def install(version, options={})
327
+ execute = []
328
+ execute << "export MAKE_OPTS=#{pyenv_make_options.dump}" if pyenv_make_options
329
+ execute << "#{pyenv_cmd} install #{version.dump}"
330
+ run(execute.join(" && "), options)
331
+ end
332
+
333
+ def uninstall(version, options={})
334
+ run("#{pyenv_cmd} uninstall -f #{version.dump}", options)
335
+ end
336
+
337
+ def virtualenv(version, venv, options={})
338
+ run("#{pyenv_cmd} virtualenv #{pyenv_virtualenv_options.join(" ")} #{version.dump} #{venv.dump}", options)
266
339
  end
267
340
  }
268
341
  }
@@ -0,0 +1,5 @@
1
+ /.bundle
2
+ /.vagrant
3
+ /known_hosts
4
+ /tmp
5
+ /vendor
@@ -0,0 +1,2 @@
1
+ load "deploy"
2
+ load "../config/deploy"
@@ -0,0 +1,2 @@
1
+ source "https://rubygems.org"
2
+ gemspec(:path => "../..")
@@ -0,0 +1,99 @@
1
+ # -*- mode: ruby -*-
2
+ # vi: set ft=ruby :
3
+
4
+ Vagrant::Config.run do |config|
5
+ # All Vagrant configuration is done here. The most common configuration
6
+ # options are documented and commented below. For a complete reference,
7
+ # please see the online documentation at vagrantup.com.
8
+
9
+ # Every Vagrant virtual environment requires a box to build off of.
10
+ config.vm.box = "centos6-64"
11
+
12
+ # The url from where the 'config.vm.box' box will be fetched if it
13
+ # doesn't already exist on the user's system.
14
+ config.vm.box_url = "http://developer.nrel.gov/downloads/vagrant-boxes/CentOS-6.3-x86_64-v20130101.box"
15
+
16
+ # Boot with a GUI so you can see the screen. (Default is headless)
17
+ # config.vm.boot_mode = :gui
18
+
19
+ # Assign this VM to a host-only network IP, allowing you to access it
20
+ # via the IP. Host-only networks can talk to the host machine as well as
21
+ # any other machines on the same network, but cannot be accessed (through this
22
+ # network interface) by any external networks.
23
+ config.vm.network :hostonly, "192.168.33.10"
24
+
25
+ # Assign this VM to a bridged network, allowing you to connect directly to a
26
+ # network using the host's network device. This makes the VM appear as another
27
+ # physical device on your network.
28
+ # config.vm.network :bridged
29
+
30
+ # Forward a port from the guest to the host, which allows for outside
31
+ # computers to access the VM, whereas host only networking does not.
32
+ # config.vm.forward_port 80, 8080
33
+
34
+ # Share an additional folder to the guest VM. The first argument is
35
+ # an identifier, the second is the path on the guest to mount the
36
+ # folder, and the third is the path on the host to the actual folder.
37
+ # config.vm.share_folder "v-data", "/vagrant_data", "../data"
38
+
39
+ # Enable provisioning with Puppet stand alone. Puppet manifests
40
+ # are contained in a directory path relative to this Vagrantfile.
41
+ # You will need to create the manifests directory and a manifest in
42
+ # the file precise-amd64.pp in the manifests_path directory.
43
+ #
44
+ # An example Puppet manifest to provision the message of the day:
45
+ #
46
+ # # group { "puppet":
47
+ # # ensure => "present",
48
+ # # }
49
+ # #
50
+ # # File { owner => 0, group => 0, mode => 0644 }
51
+ # #
52
+ # # file { '/etc/motd':
53
+ # # content => "Welcome to your Vagrant-built virtual machine!
54
+ # # Managed by Puppet.\n"
55
+ # # }
56
+ #
57
+ # config.vm.provision :puppet do |puppet|
58
+ # puppet.manifests_path = "manifests"
59
+ # puppet.manifest_file = "precise-amd64.pp"
60
+ # end
61
+
62
+ # Enable provisioning with chef solo, specifying a cookbooks path, roles
63
+ # path, and data_bags path (all relative to this Vagrantfile), and adding
64
+ # some recipes and/or roles.
65
+ #
66
+ # config.vm.provision :chef_solo do |chef|
67
+ # chef.cookbooks_path = "../my-recipes/cookbooks"
68
+ # chef.roles_path = "../my-recipes/roles"
69
+ # chef.data_bags_path = "../my-recipes/data_bags"
70
+ # chef.add_recipe "mysql"
71
+ # chef.add_role "web"
72
+ #
73
+ # # You may also specify custom JSON attributes:
74
+ # chef.json = { :mysql_password => "foo" }
75
+ # end
76
+
77
+ # Enable provisioning with chef server, specifying the chef server URL,
78
+ # and the path to the validation key (relative to this Vagrantfile).
79
+ #
80
+ # The Opscode Platform uses HTTPS. Substitute your organization for
81
+ # ORGNAME in the URL and validation key.
82
+ #
83
+ # If you have your own Chef Server, use the appropriate URL, which may be
84
+ # HTTP instead of HTTPS depending on your configuration. Also change the
85
+ # validation key to validation.pem.
86
+ #
87
+ # config.vm.provision :chef_client do |chef|
88
+ # chef.chef_server_url = "https://api.opscode.com/organizations/ORGNAME"
89
+ # chef.validation_key_path = "ORGNAME-validator.pem"
90
+ # end
91
+ #
92
+ # If you're using the Opscode platform, your validator client is
93
+ # ORGNAME-validator, replacing ORGNAME with your organization name.
94
+ #
95
+ # IF you have your own Chef Server, the default validation client name is
96
+ # chef-validator, unless you changed the configuration.
97
+ #
98
+ # chef.validation_client_name = "ORGNAME-validator"
99
+ end
@@ -0,0 +1,7 @@
1
+ #!/bin/sh -e
2
+
3
+ bundle exec vagrant up
4
+ bundle exec cap test_all
5
+ bundle exec vagrant destroy -f
6
+
7
+ # vim:set ft=sh :
@@ -0,0 +1,59 @@
1
+ set :application, "capistrano-pyenv"
2
+ set :repository, "."
3
+ set :deploy_to do
4
+ File.join("/home", user, application)
5
+ end
6
+ set :deploy_via, :copy
7
+ set :scm, :none
8
+ set :use_sudo, false
9
+ set :user, "vagrant"
10
+ set :password, "vagrant"
11
+ set :ssh_options do
12
+ run_locally("rm -f known_hosts")
13
+ {:user_known_hosts_file => "known_hosts"}
14
+ end
15
+
16
+ role :web, "192.168.33.10"
17
+ role :app, "192.168.33.10"
18
+ role :db, "192.168.33.10", :primary => true
19
+
20
+ $LOAD_PATH.push(File.expand_path("../../lib", File.dirname(__FILE__)))
21
+ require "capistrano-pyenv"
22
+
23
+ namespace(:test_all) {
24
+ task(:default) {
25
+ find_and_execute_task("pyenv:setup")
26
+ methods.grep(/^test_/).each do |m|
27
+ send(m)
28
+ end
29
+ find_and_execute_task("pyenv:purge")
30
+ }
31
+
32
+ task(:test_pyenv_is_installed) {
33
+ run("pyenv --version")
34
+ }
35
+
36
+ task(:test_python_is_installed) {
37
+ run("pyenv exec python --version")
38
+ }
39
+
40
+ task(:test_pip_is_installed) {
41
+ run("pyenv exec pip --version")
42
+ }
43
+
44
+ task(:test_virtualenv) {
45
+ python_version = pyenv_python_version
46
+ set(:pyenv_use_virtualenv, true)
47
+ set(:pyenv_python_version, "venv")
48
+ set(:pyenv_virtualenv_python_version, python_version)
49
+
50
+ find_and_execute_task("pyenv:setup")
51
+ run("pyenv exec python --version")
52
+
53
+ set(:pyenv_use_virtualenv, false)
54
+ set(:pyenv_python_version, python_version)
55
+ set(:pyenv_virtualenv_python_version, nil)
56
+ }
57
+ }
58
+
59
+ # vim:set ft=ruby sw=2 ts=2 :
@@ -0,0 +1,5 @@
1
+ /.bundle
2
+ /.vagrant
3
+ /known_hosts
4
+ /tmp
5
+ /vendor
@@ -0,0 +1,2 @@
1
+ load "deploy"
2
+ load "../config/deploy"
@@ -0,0 +1,2 @@
1
+ source "https://rubygems.org"
2
+ gemspec(:path => "../..")
@@ -0,0 +1,99 @@
1
+ # -*- mode: ruby -*-
2
+ # vi: set ft=ruby :
3
+
4
+ Vagrant::Config.run do |config|
5
+ # All Vagrant configuration is done here. The most common configuration
6
+ # options are documented and commented below. For a complete reference,
7
+ # please see the online documentation at vagrantup.com.
8
+
9
+ # Every Vagrant virtual environment requires a box to build off of.
10
+ config.vm.box = "precise64"
11
+
12
+ # The url from where the 'config.vm.box' box will be fetched if it
13
+ # doesn't already exist on the user's system.
14
+ config.vm.box_url = "http://files.vagrantup.com/precise64.box"
15
+
16
+ # Boot with a GUI so you can see the screen. (Default is headless)
17
+ # config.vm.boot_mode = :gui
18
+
19
+ # Assign this VM to a host-only network IP, allowing you to access it
20
+ # via the IP. Host-only networks can talk to the host machine as well as
21
+ # any other machines on the same network, but cannot be accessed (through this
22
+ # network interface) by any external networks.
23
+ config.vm.network :hostonly, "192.168.33.10"
24
+
25
+ # Assign this VM to a bridged network, allowing you to connect directly to a
26
+ # network using the host's network device. This makes the VM appear as another
27
+ # physical device on your network.
28
+ # config.vm.network :bridged
29
+
30
+ # Forward a port from the guest to the host, which allows for outside
31
+ # computers to access the VM, whereas host only networking does not.
32
+ # config.vm.forward_port 80, 8080
33
+
34
+ # Share an additional folder to the guest VM. The first argument is
35
+ # an identifier, the second is the path on the guest to mount the
36
+ # folder, and the third is the path on the host to the actual folder.
37
+ # config.vm.share_folder "v-data", "/vagrant_data", "../data"
38
+
39
+ # Enable provisioning with Puppet stand alone. Puppet manifests
40
+ # are contained in a directory path relative to this Vagrantfile.
41
+ # You will need to create the manifests directory and a manifest in
42
+ # the file precise-amd64.pp in the manifests_path directory.
43
+ #
44
+ # An example Puppet manifest to provision the message of the day:
45
+ #
46
+ # # group { "puppet":
47
+ # # ensure => "present",
48
+ # # }
49
+ # #
50
+ # # File { owner => 0, group => 0, mode => 0644 }
51
+ # #
52
+ # # file { '/etc/motd':
53
+ # # content => "Welcome to your Vagrant-built virtual machine!
54
+ # # Managed by Puppet.\n"
55
+ # # }
56
+ #
57
+ # config.vm.provision :puppet do |puppet|
58
+ # puppet.manifests_path = "manifests"
59
+ # puppet.manifest_file = "precise-amd64.pp"
60
+ # end
61
+
62
+ # Enable provisioning with chef solo, specifying a cookbooks path, roles
63
+ # path, and data_bags path (all relative to this Vagrantfile), and adding
64
+ # some recipes and/or roles.
65
+ #
66
+ # config.vm.provision :chef_solo do |chef|
67
+ # chef.cookbooks_path = "../my-recipes/cookbooks"
68
+ # chef.roles_path = "../my-recipes/roles"
69
+ # chef.data_bags_path = "../my-recipes/data_bags"
70
+ # chef.add_recipe "mysql"
71
+ # chef.add_role "web"
72
+ #
73
+ # # You may also specify custom JSON attributes:
74
+ # chef.json = { :mysql_password => "foo" }
75
+ # end
76
+
77
+ # Enable provisioning with chef server, specifying the chef server URL,
78
+ # and the path to the validation key (relative to this Vagrantfile).
79
+ #
80
+ # The Opscode Platform uses HTTPS. Substitute your organization for
81
+ # ORGNAME in the URL and validation key.
82
+ #
83
+ # If you have your own Chef Server, use the appropriate URL, which may be
84
+ # HTTP instead of HTTPS depending on your configuration. Also change the
85
+ # validation key to validation.pem.
86
+ #
87
+ # config.vm.provision :chef_client do |chef|
88
+ # chef.chef_server_url = "https://api.opscode.com/organizations/ORGNAME"
89
+ # chef.validation_key_path = "ORGNAME-validator.pem"
90
+ # end
91
+ #
92
+ # If you're using the Opscode platform, your validator client is
93
+ # ORGNAME-validator, replacing ORGNAME with your organization name.
94
+ #
95
+ # IF you have your own Chef Server, the default validation client name is
96
+ # chef-validator, unless you changed the configuration.
97
+ #
98
+ # chef.validation_client_name = "ORGNAME-validator"
99
+ end
@@ -0,0 +1,7 @@
1
+ #!/bin/sh -e
2
+
3
+ bundle exec vagrant up
4
+ bundle exec cap test_all
5
+ bundle exec vagrant destroy -f
6
+
7
+ # vim:set ft=sh :
metadata CHANGED
@@ -1,15 +1,15 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: capistrano-pyenv
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.11
5
- prerelease:
4
+ version: 1.0.0rc1
5
+ prerelease: 5
6
6
  platform: ruby
7
7
  authors:
8
8
  - Yamashita Yuu
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2013-03-07 00:00:00.000000000 Z
12
+ date: 2013-03-11 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: capistrano
@@ -27,6 +27,54 @@ dependencies:
27
27
  - - ! '>='
28
28
  - !ruby/object:Gem::Version
29
29
  version: '0'
30
+ - !ruby/object:Gem::Dependency
31
+ name: net-scp
32
+ requirement: !ruby/object:Gem::Requirement
33
+ none: false
34
+ requirements:
35
+ - - ~>
36
+ - !ruby/object:Gem::Version
37
+ version: 1.0.4
38
+ type: :development
39
+ prerelease: false
40
+ version_requirements: !ruby/object:Gem::Requirement
41
+ none: false
42
+ requirements:
43
+ - - ~>
44
+ - !ruby/object:Gem::Version
45
+ version: 1.0.4
46
+ - !ruby/object:Gem::Dependency
47
+ name: net-ssh
48
+ requirement: !ruby/object:Gem::Requirement
49
+ none: false
50
+ requirements:
51
+ - - ~>
52
+ - !ruby/object:Gem::Version
53
+ version: 2.2.2
54
+ type: :development
55
+ prerelease: false
56
+ version_requirements: !ruby/object:Gem::Requirement
57
+ none: false
58
+ requirements:
59
+ - - ~>
60
+ - !ruby/object:Gem::Version
61
+ version: 2.2.2
62
+ - !ruby/object:Gem::Dependency
63
+ name: vagrant
64
+ requirement: !ruby/object:Gem::Requirement
65
+ none: false
66
+ requirements:
67
+ - - ~>
68
+ - !ruby/object:Gem::Version
69
+ version: 1.0.6
70
+ type: :development
71
+ prerelease: false
72
+ version_requirements: !ruby/object:Gem::Requirement
73
+ none: false
74
+ requirements:
75
+ - - ~>
76
+ - !ruby/object:Gem::Version
77
+ version: 1.0.6
30
78
  description: a capistrano recipe to manage pythons with pyenv.
31
79
  email:
32
80
  - yamashita@geishatokyo.com
@@ -42,6 +90,17 @@ files:
42
90
  - capistrano-pyenv.gemspec
43
91
  - lib/capistrano-pyenv.rb
44
92
  - lib/capistrano-pyenv/version.rb
93
+ - test/centos6-64/.gitignore
94
+ - test/centos6-64/Capfile
95
+ - test/centos6-64/Gemfile
96
+ - test/centos6-64/Vagrantfile
97
+ - test/centos6-64/run.sh
98
+ - test/config/deploy.rb
99
+ - test/precise64/.gitignore
100
+ - test/precise64/Capfile
101
+ - test/precise64/Gemfile
102
+ - test/precise64/Vagrantfile
103
+ - test/precise64/run.sh
45
104
  homepage: https://github.com/yyuu/capistrano-pyenv
46
105
  licenses: []
47
106
  post_install_message:
@@ -57,13 +116,24 @@ required_ruby_version: !ruby/object:Gem::Requirement
57
116
  required_rubygems_version: !ruby/object:Gem::Requirement
58
117
  none: false
59
118
  requirements:
60
- - - ! '>='
119
+ - - ! '>'
61
120
  - !ruby/object:Gem::Version
62
- version: '0'
121
+ version: 1.3.1
63
122
  requirements: []
64
123
  rubyforge_project:
65
124
  rubygems_version: 1.8.23
66
125
  signing_key:
67
126
  specification_version: 3
68
127
  summary: a capistrano recipe to manage pythons with pyenv.
69
- test_files: []
128
+ test_files:
129
+ - test/centos6-64/.gitignore
130
+ - test/centos6-64/Capfile
131
+ - test/centos6-64/Gemfile
132
+ - test/centos6-64/Vagrantfile
133
+ - test/centos6-64/run.sh
134
+ - test/config/deploy.rb
135
+ - test/precise64/.gitignore
136
+ - test/precise64/Capfile
137
+ - test/precise64/Gemfile
138
+ - test/precise64/Vagrantfile
139
+ - test/precise64/run.sh