capistrano-virtualenv 0.1.0 → 0.1.1

Sign up to get free protection for your applications and to get access to all the features.
@@ -16,6 +16,8 @@ Gem::Specification.new do |gem|
16
16
  gem.version = Capistrano::Virtualenv::VERSION
17
17
 
18
18
  gem.add_dependency("capistrano")
19
+ gem.add_dependency("capistrano-platform-resources", ">= 0.1.1")
20
+ gem.add_development_dependency("capistrano-pyenv", ">= 1.0.0")
19
21
  gem.add_development_dependency("net-scp", "~> 1.0.4")
20
22
  gem.add_development_dependency("net-ssh", "~> 2.2.2")
21
23
  gem.add_development_dependency("vagrant", "~> 1.0.6")
@@ -1,4 +1,5 @@
1
1
  require "capistrano-virtualenv/version"
2
+ require "capistrano/configuration/resources/platform_resources"
2
3
  require "uri"
3
4
 
4
5
  module Capistrano
@@ -130,12 +131,10 @@ module Capistrano
130
131
  ].flatten.join(" ")
131
132
  }
132
133
 
133
- _cset(:virtualenv_install_packages, []) # apt packages
134
- _cset(:virtualenv_setup_dependencies) { not(virtualenv_install_packages.empty?) }
135
134
  desc("Setup virtualenv.")
136
135
  task(:setup, :except => { :no_release => true }) {
137
136
  transaction {
138
- dependencies if virtualenv_setup_dependencies
137
+ dependencies if fetch(:virtualenv_setup_dependencies, true)
139
138
  install
140
139
  create_shared
141
140
  }
@@ -148,8 +147,9 @@ module Capistrano
148
147
  run("test -f #{virtualenv_script_file.dump} || wget --no-verbose -O #{virtualenv_script_file.dump} #{virtualenv_script_url.dump}")
149
148
  }
150
149
 
150
+ _cset(:virtualenv_install_packages, %w(python rsync))
151
151
  task(:dependencies, :except => { :no_release => true }) {
152
- run("#{sudo} apt-get install #{virtualenv_install_packages.map { |x| x.dump }.join(" ")}")
152
+ platform.packages.install(virtualenv_install_packages)
153
153
  }
154
154
 
155
155
  desc("Uninstall virtualenv.")
@@ -1,5 +1,5 @@
1
1
  module Capistrano
2
2
  module Virtualenv
3
- VERSION = "0.1.0"
3
+ VERSION = "0.1.1"
4
4
  end
5
5
  end
@@ -10,6 +10,10 @@ set :user, "vagrant"
10
10
  set :password, "vagrant"
11
11
  set :ssh_options, {:user_known_hosts_file => "/dev/null"}
12
12
 
13
+ ## pyenv ##
14
+ require "capistrano-pyenv"
15
+ set(:pyenv_python_version, "2.7.3")
16
+
13
17
  role :web, "192.168.33.10"
14
18
  role :app, "192.168.33.10"
15
19
  role :db, "192.168.33.10", :primary => true
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: capistrano-virtualenv
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.1.1
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: 2013-03-25 00:00:00.000000000 Z
12
+ date: 2013-03-26 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: capistrano
@@ -27,6 +27,38 @@ dependencies:
27
27
  - - ! '>='
28
28
  - !ruby/object:Gem::Version
29
29
  version: '0'
30
+ - !ruby/object:Gem::Dependency
31
+ name: capistrano-platform-resources
32
+ requirement: !ruby/object:Gem::Requirement
33
+ none: false
34
+ requirements:
35
+ - - ! '>='
36
+ - !ruby/object:Gem::Version
37
+ version: 0.1.1
38
+ type: :runtime
39
+ prerelease: false
40
+ version_requirements: !ruby/object:Gem::Requirement
41
+ none: false
42
+ requirements:
43
+ - - ! '>='
44
+ - !ruby/object:Gem::Version
45
+ version: 0.1.1
46
+ - !ruby/object:Gem::Dependency
47
+ name: capistrano-pyenv
48
+ requirement: !ruby/object:Gem::Requirement
49
+ none: false
50
+ requirements:
51
+ - - ! '>='
52
+ - !ruby/object:Gem::Version
53
+ version: 1.0.0
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: 1.0.0
30
62
  - !ruby/object:Gem::Dependency
31
63
  name: net-scp
32
64
  requirement: !ruby/object:Gem::Requirement