capistrano-rbenv 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,13 +35,13 @@ Following options are available to manage your rbenv.
35
35
  * `:rbenv_plugins` - rbenv plugins to install. install `ruby-build` by default.
36
36
  * `:rbenv_repository` - repository URL of rbenv.
37
37
  * `:rbenv_ruby_dependencies` - dependency packages.
38
- * `:rbenv_ruby_version` - the ruby version to install. install `1.9.3-p194` by default.
39
- * `:rbenv_use_bundler` - controls whether installing bundler or not. `true` by default.
40
- * `:rbenv_use_configure` - configure rbenv in your shell config or not. `true` by default. users who are using Chef/Puppet may prefer setting this value `false`.
38
+ * `:rbenv_ruby_version` - the ruby version to install. install `1.9.3-p392` by default.
39
+ * `:rbenv_install_bundler` - controls whether installing bundler or not. `true` by default.
40
+ * `:rbenv_install_dependencies` - controls whether installing dependencies or not. `true` if the required packages are missing.
41
+ * `:rbenv_setup_shell` - setup rbenv in your shell config or not. `true` by default. users who are using Chef/Puppet may prefer setting this value `false`.
42
+ * `:rbenv_setup_default_environment` - setup `RBENV_ROOT` and update `PATH` to use rbenv over capistrano. `true` by default.
41
43
  * `:rbenv_configure_files` - list of shell configuration files to be configured for rbenv. by default, guessing from user's `$SHELL` and `$HOME`.
42
44
  * `:rbenv_configure_basenames` - advanced option for `:rbenv_configure_files`. list of filename of your shell configuration files if you don't like the default value of `:rbenv_configure_files`.
43
- * `:rbenv_install_dependencies` - controls whether installing dependencies or not. `true` by default.
44
- * `:rbenv_define_default_environment` - define `RBENV_ROOT` and update `PATH` to use rbenv over capistrano. `true` by default.
45
45
 
46
46
  ## Contributing
47
47
 
@@ -16,4 +16,7 @@ Gem::Specification.new do |gem|
16
16
  gem.version = Capistrano::RbEnv::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
@@ -30,26 +30,45 @@ module Capistrano
30
30
  _cset(:rbenv_plugins_path) {
31
31
  File.join(rbenv_path, 'plugins')
32
32
  }
33
- _cset(:rbenv_ruby_version, "1.9.3-p327")
33
+ _cset(:rbenv_ruby_version, "1.9.3-p392")
34
34
 
35
- _cset(:rbenv_use_bundler, true)
35
+ _cset(:rbenv_install_bundler) {
36
+ if exists?(:rbenv_use_bundler)
37
+ logger.info(":rbenv_use_bundler has been deprecated. use :rbenv_install_bundler instead.")
38
+ fetch(:rbenv_use_bundler, true)
39
+ else
40
+ true
41
+ end
42
+ }
36
43
  set(:bundle_cmd) { # override bundle_cmd in "bundler/capistrano"
37
- rbenv_use_bundler ? "#{rbenv_cmd} exec bundle" : 'bundle'
44
+ rbenv_install_bundler ? "#{rbenv_cmd} exec bundle" : "bundle"
38
45
  }
39
46
 
40
- _cset(:rbenv_install_dependencies, true)
47
+ _cset(:rbenv_install_dependencies) {
48
+ if rbenv_ruby_dependencies.empty?
49
+ false
50
+ else
51
+ status = case rbenv_platform
52
+ when /(debian|ubuntu)/i
53
+ capture("dpkg-query -s #{rbenv_ruby_dependencies.map { |x| x.dump }.join(" ")} 1>/dev/null 2>&1 || echo required")
54
+ when /redhat/i
55
+ capture("rpm -qi #{rbenv_ruby_dependencies.map { |x| x.dump }.join(" ")} 1>/dev/null 2>&1 || echo required")
56
+ end
57
+ true and (/required/i =~ status)
58
+ end
59
+ }
41
60
 
42
61
  desc("Setup rbenv.")
43
62
  task(:setup, :except => { :no_release => true }) {
44
63
  dependencies if rbenv_install_dependencies
45
64
  update
46
- configure
65
+ configure if rbenv_setup_shell
47
66
  build
48
- setup_bundler if rbenv_use_bundler
67
+ setup_bundler if rbenv_install_bundler
49
68
  }
50
69
  after 'deploy:setup', 'rbenv:setup'
51
70
 
52
- def rbenv_update_repository(destination, options={})
71
+ def _update_repository(destination, options={})
53
72
  configuration = Capistrano::Configuration.new()
54
73
  options = {
55
74
  :source => proc { Capistrano::Deploy::SCM.new(configuration[:scm], configuration) },
@@ -82,27 +101,42 @@ module Capistrano
82
101
 
83
102
  desc("Update rbenv installation.")
84
103
  task(:update, :except => { :no_release => true }) {
85
- rbenv_update_repository(rbenv_path, :scm => :git, :repository => rbenv_repository, :branch => rbenv_branch)
104
+ _update_repository(rbenv_path, :scm => :git, :repository => rbenv_repository, :branch => rbenv_branch)
86
105
  plugins.update
87
106
  }
88
107
 
89
- def setup_default_environment
108
+ def _setup_default_environment
90
109
  env = fetch(:default_environment, {}).dup
91
110
  env["RBENV_ROOT"] = rbenv_path
92
111
  env["PATH"] = [ rbenv_shims_path, rbenv_bin_path, env.fetch("PATH", "$PATH") ].join(":")
93
112
  set(:default_environment, env)
94
113
  end
95
114
 
96
- _cset(:rbenv_define_default_environment, true)
97
- # workaround for `multistage` of capistrano-ext.
115
+ _cset(:rbenv_setup_default_environment) {
116
+ if exists?(:rbenv_define_default_environment)
117
+ logger.info(":rbenv_define_default_environment has been deprecated. use :rbenv_setup_default_environment instead.")
118
+ fetch(:rbenv_define_default_environment, true)
119
+ else
120
+ true
121
+ end
122
+ }
123
+ # workaround for loading `capistrano-rbenv` later than `capistrano/ext/multistage`.
98
124
  # https://github.com/yyuu/capistrano-rbenv/pull/5
99
125
  if top.namespaces.key?(:multistage)
100
126
  after "multistage:ensure" do
101
- setup_default_environment if rbenv_define_default_environment
127
+ _setup_default_environment if rbenv_setup_default_environment
102
128
  end
103
129
  else
104
130
  on :start do
105
- setup_default_environment if rbenv_define_default_environment
131
+ if top.namespaces.key?(:multistage)
132
+ # workaround for loading `capistrano-rbenv` earlier than `capistrano/ext/multistage`.
133
+ # https://github.com/yyuu/capistrano-rbenv/issues/7
134
+ after "multistage:ensure" do
135
+ _setup_default_environment if rbenv_setup_default_environment
136
+ end
137
+ else
138
+ _setup_default_environment if rbenv_setup_default_environment
139
+ end
106
140
  end
107
141
  end
108
142
 
@@ -118,7 +152,7 @@ module Capistrano
118
152
  # for backward compatibility, obtain plugin options from :rbenv_plugins_options first
119
153
  options = rbenv_plugins_options.fetch(name, {})
120
154
  options = options.merge(Hash === repository ? repository : {:repository => repository})
121
- rbenv_update_repository(File.join(rbenv_plugins_path, name), options.merge(:scm => :git))
155
+ _update_repository(File.join(rbenv_plugins_path, name), options.merge(:scm => :git))
122
156
  end
123
157
  }
124
158
  }
@@ -151,7 +185,7 @@ module Capistrano
151
185
  EOS
152
186
  }
153
187
 
154
- def _update_config(script_file, file, tempfile)
188
+ def _do_update_config(script_file, file, tempfile)
155
189
  execute = []
156
190
  ## (1) ensure copy source file exists
157
191
  execute << "( test -f #{file.dump} || touch #{file.dump} )"
@@ -169,27 +203,33 @@ module Capistrano
169
203
  run(execute.join(" && "))
170
204
  end
171
205
 
172
- def update_config(script_file, file)
206
+ def _update_config(script_file, file)
173
207
  begin
174
208
  tempfile = capture("mktemp /tmp/rbenv.XXXXXXXXXX").strip
175
- _update_config(script_file, file, tempfile)
209
+ _do_update_config(script_file, file, tempfile)
176
210
  ensure
177
211
  run("rm -f #{tempfile.dump}") rescue nil
178
212
  end
179
213
  end
180
214
 
215
+ _cset(:rbenv_setup_shell) {
216
+ if exists?(:rbenv_use_configure)
217
+ logger.info(":rbenv_use_configure has been deprecated. please use :rbenv_setup_shell instead.")
218
+ fetch(:rbenv_use_configure, true)
219
+ else
220
+ true
221
+ end
222
+ }
181
223
  _cset(:rbenv_configure_signature, '##rbenv:configure')
182
224
  task(:configure, :except => { :no_release => true }) {
183
- if fetch(:rbenv_use_configure, true)
184
- begin
185
- script_file = capture("mktemp /tmp/rbenv.XXXXXXXXXX").strip
186
- top.put(rbenv_configure_script, script_file)
187
- [ rbenv_configure_files ].flatten.each do |file|
188
- update_config(script_file, file)
189
- end
190
- ensure
191
- run("rm -f #{script_file.dump}") rescue nil
225
+ begin
226
+ script_file = capture("mktemp /tmp/rbenv.XXXXXXXXXX").strip
227
+ top.put(rbenv_configure_script, script_file)
228
+ [ rbenv_configure_files ].flatten.each do |file|
229
+ _update_config(script_file, file)
192
230
  end
231
+ ensure
232
+ run("rm -f #{script_file.dump}") rescue nil
193
233
  end
194
234
  }
195
235
 
@@ -222,30 +262,23 @@ module Capistrano
222
262
  unless rbenv_ruby_dependencies.empty?
223
263
  case rbenv_platform
224
264
  when /(debian|ubuntu)/i
225
- begin
226
- run("dpkg-query -s #{rbenv_ruby_dependencies.join(' ')} > /dev/null")
227
- rescue
228
- run("#{sudo} apt-get install -q -y #{rbenv_ruby_dependencies.join(' ')}")
229
- end
265
+ run("#{sudo} apt-get install -q -y #{rbenv_ruby_dependencies.map { |x| x.dump }.join(" ")}")
230
266
  when /redhat/i
231
- begin
232
- run("rpm -qi #{rbenv_ruby_dependencies.join(' ')} > /dev/null")
233
- rescue
234
- run("#{sudo} yum install -q -y #{rbenv_ruby_dependencies.join(' ')}")
235
- end
236
- else
237
- # nop
267
+ run("#{sudo} yum install -q -y #{rbenv_ruby_dependencies.map { |x| x.dump }.join(" ")}")
238
268
  end
239
269
  end
240
270
  }
241
271
 
272
+ _cset(:rbenv_ruby_versions) { rbenv.versions }
242
273
  desc("Build ruby within rbenv.")
243
274
  task(:build, :except => { :no_release => true }) {
244
- ruby = fetch(:rbenv_ruby_cmd, 'ruby')
245
- if rbenv_ruby_version != 'system'
246
- run("#{rbenv_bin} whence #{ruby} | fgrep -q #{rbenv_ruby_version} || #{rbenv_bin} install #{rbenv_ruby_version}")
275
+ reset!(:rbenv_ruby_versions)
276
+ ruby = fetch(:rbenv_ruby_cmd, "ruby")
277
+ if rbenv_ruby_version != "system" and not rbenv_ruby_versions.include?(rbenv_ruby_version)
278
+ rbenv.install(rbenv_ruby_version)
247
279
  end
248
- run("#{rbenv_cmd} exec #{ruby} --version && #{rbenv_cmd} global #{rbenv_ruby_version}")
280
+ rbenv.exec("#{ruby} --version") # check if ruby is executable
281
+ rbenv.global(rbenv_ruby_version)
249
282
  }
250
283
 
251
284
  _cset(:rbenv_bundler_gem, 'bundler')
@@ -261,12 +294,69 @@ module Capistrano
261
294
  i = "#{rbenv_bundler_gem}"
262
295
  end
263
296
  run("unset -v GEM_HOME; #{gem} query #{q} 2>/dev/null | #{f} || #{gem} install -q #{i}")
264
- run("#{rbenv_cmd} rehash && #{bundle_cmd} version")
297
+ rbenv.rehash
298
+ run("#{bundle_cmd} version")
265
299
  }
266
300
 
267
301
  # call `rbenv rehash` to update shims.
268
- def rehash()
269
- run("#{rbenv_cmd} rehash")
302
+ def rehash(options={})
303
+ run("#{rbenv_cmd} rehash", options)
304
+ end
305
+
306
+ def global(version, options={})
307
+ run("#{rbenv_cmd} global #{version.dump}", options)
308
+ end
309
+
310
+ def local(version, options={})
311
+ path = options.delete(:path)
312
+ if path
313
+ run("cd #{path.dump} && #{rbenv_cmd} local #{version.dump}", options)
314
+ else
315
+ run("#{rbenv_cmd} local #{version.dump}", options)
316
+ end
317
+ end
318
+
319
+ def which(command, options={})
320
+ path = options.delete(:path)
321
+ if path
322
+ capture("cd #{path.dump} && #{rbenv_cmd} which #{command.dump}", options).strip
323
+ else
324
+ capture("#{rbenv_cmd} which #{command.dump}", options).strip
325
+ end
326
+ end
327
+
328
+ def exec(command, options={})
329
+ # users of rbenv.exec must sanitize their command line.
330
+ path = options.delete(:path)
331
+ if path
332
+ run("cd #{path.dump} && #{rbenv_cmd} exec #{command}", options)
333
+ else
334
+ run("#{rbenv_cmd} exec #{command}", options)
335
+ end
336
+ end
337
+
338
+ def versions(options={})
339
+ capture("#{rbenv_cmd} versions --bare", options).split(/(?:\r?\n)+/)
340
+ end
341
+
342
+ def available_versions(options={})
343
+ capture("#{rbenv_cmd} install --complete", options).split(/(?:\r?\n)+/)
344
+ end
345
+
346
+ _cset(:rbenv_install_ruby_threads) {
347
+ capture("cat /proc/cpuinfo | cut -f1 | grep processor | wc -l").to_i rescue 1
348
+ }
349
+ # create build processes as many as processor count
350
+ _cset(:rbenv_make_options) { "-j #{rbenv_install_ruby_threads}" }
351
+ def install(version, options={})
352
+ execute = []
353
+ execute << "export MAKE_OPTS=#{rbenv_make_options.dump}" if rbenv_make_options
354
+ execute << "#{rbenv_cmd} install #{version.dump}"
355
+ run(execute.join(" && "), options)
356
+ end
357
+
358
+ def uninstall(version, options={})
359
+ run("#{rbenv_cmd} uninstall -f #{version.dump}", options)
270
360
  end
271
361
  }
272
362
  }
@@ -1,5 +1,5 @@
1
1
  module Capistrano
2
2
  module RbEnv
3
- VERSION = "0.0.11"
3
+ VERSION = "1.0.0rc1"
4
4
  end
5
5
  end
@@ -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,45 @@
1
+ set :application, "capistrano-rbenv"
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-rbenv"
22
+
23
+ namespace(:test_all) {
24
+ task(:default) {
25
+ find_and_execute_task("rbenv:setup")
26
+ methods.grep(/^test_/).each do |m|
27
+ send(m)
28
+ end
29
+ find_and_execute_task("rbenv:purge")
30
+ }
31
+
32
+ task(:test_rbenv_is_installed) {
33
+ run("rbenv --version")
34
+ }
35
+
36
+ task(:test_ruby_is_installed) {
37
+ run("rbenv exec ruby --version")
38
+ }
39
+
40
+ task(:test_bundler_is_installed) {
41
+ run("rbenv exec bundle version")
42
+ }
43
+ }
44
+
45
+ # 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-rbenv
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 rubies with rbenv.
31
79
  email:
32
80
  - yamashita@geishatokyo.com
@@ -42,6 +90,17 @@ files:
42
90
  - capistrano-rbenv.gemspec
43
91
  - lib/capistrano-rbenv.rb
44
92
  - lib/capistrano-rbenv/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-rbenv
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 rubies with rbenv.
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