rvm-capistrano 1.3.4 → 1.4.0.rc1

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
  SHA1:
3
- metadata.gz: 84cf4a96a89541fa0459934b8800757ec420c098
4
- data.tar.gz: 36eb5328e15b877fa0c95d5cb00acea09640a06a
3
+ metadata.gz: 67171efbb1be95f398a8e0d60b0f75b64e53d983
4
+ data.tar.gz: f86de38a275c25f83ca86b1b701545d53d5da392
5
5
  SHA512:
6
- metadata.gz: 8a39f3b8e1c56227438dba8220d84bb63e104a500e80f6818ff7360a63cd255ffbb6fc3e861ace698e00c89d6b53b4c6947c7a66e785f5cb5b136dad4cf05250
7
- data.tar.gz: 76f3d6847586cdb21499e5eac86e7c24e8dccc775255e068c1f5550bc79d4cef1e70121a3dce752ba55589e62194bec97768f7075f82dd61c3b61a78507a7ed0
6
+ metadata.gz: 6abd4c7ac08bdf41280248502dce2d406cc55a57c6b70062a3cd5a1ab97371d787b42895856d65a08dab8684b3bb741f08305a20648d3fcc8151eedb4db93df5
7
+ data.tar.gz: c1b5f9c83a83949c98d1a4bb0348307ec7f63bb5600f5731e93e713b97a7f8789d1c9c3cdafb8236c2448c978bc318fc6dea441a4f60dcfd0697eae2b9fe5524
data/Manifest.yml CHANGED
@@ -5,3 +5,4 @@
5
5
  - LICENSE
6
6
  - lib/rvm/capistrano.rb
7
7
  - lib/rvm/capistrano/version.rb
8
+ - lib/rvm/capistrano/selector.rb
@@ -1,5 +1,7 @@
1
1
  # Recipes for using RVM on a server with capistrano.
2
2
 
3
+ require 'rvm/capistrano/selector'
4
+
3
5
  module Capistrano
4
6
  Configuration.instance(true).load do
5
7
 
@@ -47,28 +49,9 @@ module Capistrano
47
49
  end
48
50
 
49
51
  on :load do
50
- _cset :rvm_shell do
51
- shell = File.join(rvm_bin_path, "rvm-shell")
52
- ruby = fetch(:rvm_ruby_string_evaluated).strip
53
- case ruby
54
- when "release_path"
55
- shell = "rvm_path=#{rvm_path} #{shell} --path '#{release_path}'"
56
- when "local"
57
- ruby = (ENV['GEM_HOME'] || "").gsub(/.*\//, "")
58
- raise "Failed to get ruby version from GEM_HOME. Please make sure rvm is loaded!" if ruby.empty?
59
- shell = "rvm_path=#{rvm_path} #{shell} '#{ruby}'"
60
- else
61
- shell = "rvm_path=#{rvm_path} #{shell} '#{ruby}'" unless ruby.empty?
62
- end
63
- shell
64
- end
65
52
 
66
53
  # this is part of check, search for :rvm_require_role
67
- if fetch(:rvm_require_role,nil).nil?
68
- set :default_shell do
69
- fetch(:rvm_shell)
70
- end
71
- elsif fetch(:rvm_require_role_was_set_before_require, nil).nil?
54
+ if ! fetch(:rvm_require_role,nil).nil? and fetch(:rvm_require_role_was_set_before_require, nil).nil?
72
55
  raise "
73
56
 
74
57
  ERROR: detected 'set :rvm_require_role, \"#{fetch(:rvm_require_role,nil)}\"' after 'require \"rvm/capistrano\"', please move it above for proper functioning.
@@ -76,50 +59,9 @@ ERROR: detected 'set :rvm_require_role, \"#{fetch(:rvm_require_role,nil)}\"' aft
76
59
  "
77
60
  end
78
61
 
79
- # Let users set the type of their rvm install.
80
- _cset(:rvm_type, :user)
81
-
82
- # Define rvm_path
83
- # This is used in the default_shell command to pass the required variable to rvm-shell, allowing
84
- # rvm to boostrap using the proper path. This is being lost in Capistrano due to the lack of a
85
- # full environment.
86
- _cset(:rvm_path) do
87
- case rvm_type
88
- when :root, :system
89
- "/usr/local/rvm"
90
- when :local, :user, :default
91
- "$HOME/.rvm/"
92
- else
93
- rvm_type.to_s.empty? ? "$HOME/.rvm" : rvm_type.to_s
94
- end
95
- end
96
-
97
- # Let users override the rvm_bin_path
98
- _cset(:rvm_bin_path) do
99
- case rvm_type
100
- when :root, :system
101
- "/usr/local/rvm/bin"
102
- when :local, :user, :default
103
- "$HOME/.rvm/bin"
104
- else
105
- rvm_type.to_s.empty? ? "#{rvm_path}/bin" : rvm_type.to_s
106
- end
107
- end
108
-
109
- set :rvm_ruby_string_evaluated do
110
- value = fetch(:rvm_ruby_string, :default)
111
- if value.to_sym == :local
112
- value = ENV['GEM_HOME'].gsub(/.*\//,"")
113
- end
114
- value.to_s
115
- end
116
-
117
62
  # Let users configure a path to export/import gemsets
118
63
  _cset(:rvm_gemset_path, "#{rvm_path}/gemsets")
119
64
 
120
- # Use the default ruby on the server, by default :)
121
- _cset(:rvm_ruby_string, :default)
122
-
123
65
  # Default sudo state
124
66
  _cset(:rvm_install_with_sudo, false)
125
67
 
@@ -0,0 +1,71 @@
1
+ module Capistrano
2
+ Configuration.instance(true).load do
3
+ on :load do
4
+ _cset :rvm_shell do
5
+ shell = File.join(rvm_bin_path, "rvm-shell")
6
+ ruby = fetch(:rvm_ruby_string_evaluated).strip
7
+ case ruby
8
+ when "release_path"
9
+ shell = "rvm_path=#{rvm_path} #{shell} --path '#{release_path}'"
10
+ when "local"
11
+ ruby = (ENV['GEM_HOME'] || "").gsub(/.*\//, "")
12
+ raise "Failed to get ruby version from GEM_HOME. Please make sure rvm is loaded!" if ruby.empty?
13
+ shell = "rvm_path=#{rvm_path} #{shell} '#{ruby}'"
14
+ else
15
+ shell = "rvm_path=#{rvm_path} #{shell} '#{ruby}'" unless ruby.empty?
16
+ end
17
+ shell
18
+ end
19
+
20
+ # this is part of check, search for :rvm_require_role
21
+ if fetch(:rvm_require_role,nil).nil?
22
+ set :default_shell do
23
+ fetch(:rvm_shell)
24
+ end
25
+ end
26
+
27
+ # Let users set the type of their rvm install.
28
+ _cset(:rvm_type, :user)
29
+
30
+ # Define rvm_path
31
+ # This is used in the default_shell command to pass the required variable to rvm-shell, allowing
32
+ # rvm to boostrap using the proper path. This is being lost in Capistrano due to the lack of a
33
+ # full environment.
34
+ _cset(:rvm_path) do
35
+ case rvm_type
36
+ when :root, :system
37
+ "/usr/local/rvm"
38
+ when :local, :user, :default
39
+ "$HOME/.rvm/"
40
+ else
41
+ rvm_type.to_s.empty? ? "$HOME/.rvm" : rvm_type.to_s
42
+ end
43
+ end
44
+
45
+ # Let users override the rvm_bin_path
46
+ _cset(:rvm_bin_path) do
47
+ case rvm_type
48
+ when :root, :system
49
+ "/usr/local/rvm/bin"
50
+ when :local, :user, :default
51
+ "$HOME/.rvm/bin"
52
+ else
53
+ rvm_type.to_s.empty? ? "#{rvm_path}/bin" : rvm_type.to_s
54
+ end
55
+ end
56
+
57
+ # evaluate :rvm_ruby_string => :local
58
+ set :rvm_ruby_string_evaluated do
59
+ value = fetch(:rvm_ruby_string, :default)
60
+ if value.to_sym == :local
61
+ value = ENV['GEM_HOME'].gsub(/.*\//,"")
62
+ end
63
+ value.to_s
64
+ end
65
+
66
+ # Use the default ruby on the server, by default :)
67
+ _cset(:rvm_ruby_string, :default)
68
+
69
+ end
70
+ end
71
+ end
@@ -1,5 +1,5 @@
1
1
  module RVM
2
2
  class Capistrano
3
- VERSION="1.3.4"
3
+ VERSION="1.4.0.rc1"
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rvm-capistrano
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.3.4
4
+ version: 1.4.0.rc1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Wayne E. Seguin
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2013-06-28 00:00:00.000000000 Z
12
+ date: 2013-06-29 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: capistrano
@@ -68,6 +68,7 @@ files:
68
68
  - LICENSE
69
69
  - lib/rvm/capistrano.rb
70
70
  - lib/rvm/capistrano/version.rb
71
+ - lib/rvm/capistrano/selector.rb
71
72
  - spec/spec_helper.rb
72
73
  homepage: https://github.com/wayneeseguin/rvm-capistrano
73
74
  licenses:
@@ -84,9 +85,9 @@ required_ruby_version: !ruby/object:Gem::Requirement
84
85
  version: '0'
85
86
  required_rubygems_version: !ruby/object:Gem::Requirement
86
87
  requirements:
87
- - - '>='
88
+ - - '>'
88
89
  - !ruby/object:Gem::Version
89
- version: '0'
90
+ version: 1.3.1
90
91
  requirements: []
91
92
  rubyforge_project:
92
93
  rubygems_version: 2.0.3