rvm-capistrano 1.0.0 → 1.0.1

Sign up to get free protection for your applications and to get access to all the features.
data/History.md CHANGED
@@ -1,5 +1,11 @@
1
- === 1.0 / 2012-03-26
1
+ === 1.0.1 / 2012-03-26
2
+
3
+ * Updated to latest integration code for installing rvm/ruby
4
+ * Cleaning code, improving gemification
5
+ * Switch the default rvm installation type to user - as we discourage system installations
6
+ * Improved README.md
7
+
8
+ === 1.0.0 / 2012-03-26
2
9
 
3
10
  * Ported RVM /Capistrano Gem Library into it's own repository from the main RVM
4
11
  repostitory. ( https://github.com/wayneeseguin/rvm-capistrano )
5
-
@@ -2,5 +2,6 @@
2
2
  - Manifest.yml
3
3
  - README.md
4
4
  - Rakefile
5
+ - lib/rvm-capistrano.rb
5
6
  - lib/rvm/capistrano.rb
6
7
  - lib/rvm/capistrano/version.rb
data/README.md CHANGED
@@ -1,6 +1,6 @@
1
- # rvm
1
+ # rvm-capistrano
2
2
 
3
- https://rvm.beginrescueend.com/
3
+ https://rvm.beginrescueend.com/integration/capistrano
4
4
 
5
5
  ## Description
6
6
 
@@ -8,9 +8,25 @@ RVM / Capistrano Integration Gem
8
8
 
9
9
  ## Installation
10
10
 
11
- * gem install rvm-capistrano
11
+ RVM / Capistrano integration is now available as a separate gem
12
+
13
+ $ gem install rvm-capistrano
14
+
15
+ ## Example
16
+
17
+ The following code will:
18
+
19
+ - detect `ruby@gemset` used for deployment
20
+ - install RVM and Ruby on `cap deploy:detup`
21
+
22
+ set :rvm_ruby_string, ENV['GEM_HOME'].gsub(/.*\//,"")
23
+
24
+ before 'deploy:setup', 'rvm:install_rvm'
25
+ before 'deploy:setup', 'rvm:install_ruby'
26
+
27
+ require "rvm-capistrano"
28
+
12
29
 
13
30
  ## Development
14
31
 
15
32
  $ rake spec
16
-
@@ -0,0 +1 @@
1
+ require 'rvm/capistrano'
@@ -1,7 +1,4 @@
1
1
  # Recipes for using RVM on a server with capistrano.
2
- unless Capistrano::Configuration.respond_to?(:instance)
3
- abort "rvm/capistrano requires Capistrano >= 2."
4
- end
5
2
 
6
3
  Capistrano::Configuration.instance(true).load do
7
4
 
@@ -15,12 +12,16 @@ Capistrano::Configuration.instance(true).load do
15
12
  set :default_shell do
16
13
  shell = File.join(rvm_bin_path, "rvm-shell")
17
14
  ruby = rvm_ruby_string.to_s.strip
18
- shell = "rvm_path=#{rvm_path} #{shell} '#{ruby}'" unless ruby.empty?
15
+ if "#{ruby}" == "release_path"
16
+ shell = "rvm_path=#{rvm_path} #{shell} --path '#{release_path}'"
17
+ else
18
+ shell = "rvm_path=#{rvm_path} #{shell} '#{ruby}'" unless ruby.empty?
19
+ end
19
20
  shell
20
21
  end
21
22
 
22
23
  # Let users set the type of their rvm install.
23
- _cset(:rvm_type, :system)
24
+ _cset(:rvm_type, :user)
24
25
 
25
26
  # Define rvm_path
26
27
  # This is used in the default_shell command to pass the required variable to rvm-shell, allowing
@@ -51,12 +52,61 @@ Capistrano::Configuration.instance(true).load do
51
52
 
52
53
  # Use the default ruby on the server, by default :)
53
54
  _cset(:rvm_ruby_string, "default")
55
+
56
+ # Let users set the install type and shell of their choice.
57
+ _cset(:rvm_install_type, :stable)
58
+ _cset(:rvm_install_shell, :bash)
59
+
60
+ # Let users set the (re)install for ruby.
61
+ _cset(:rvm_install_ruby, :install)
62
+ _cset(:rvm_install_ruby_threads, "$(cat /proc/cpuinfo | grep vendor_id | wc -l)")
63
+
64
+ namespace :rvm do
65
+ desc <<-EOF
66
+ Install RVM of the given choice to the server.
67
+ By default RVM "stable" is installed, change with:
68
+
69
+ set :rvm_install_type, :head
70
+
71
+ By default BASH is used for installer, change with:
72
+
73
+ set :rvm_install_shell, :zsh
74
+ EOF
75
+ task :install_rvm do
76
+ run "#{rvm_install_shell} -s #{rvm_install_type} \
77
+ < <(curl -s https://raw.github.com/wayneeseguin/rvm/master/binscripts/rvm-installer)", :shell => "#{rvm_install_shell}"
78
+ end
79
+
80
+ desc <<-EOF
81
+ Install RVM ruby to the server, create gemset if needed.
82
+ By default ruby is installed, you can reinstall with:
83
+
84
+ set :rvm_install_ruby, :reinstall
85
+
86
+ By default ruby is compiled using all CPU cores, change with:
87
+
88
+ set :rvm_install_ruby_threads, :reinstall
89
+
90
+ By default BASH is used for installer, change with:
91
+
92
+ set :rvm_install_shell, :zsh
93
+ EOF
94
+ task :install_ruby do
95
+ ruby, gemset = rvm_ruby_string.to_s.strip.split /@/
96
+ if %w( release_path default ).include? "#{ruby}"
97
+ raise "ruby can not be installed when using :rvm_ruby_string => :#{ruby}"
98
+ else
99
+ run "#{File.join(rvm_bin_path, "rvm")} #{rvm_install_ruby} #{ruby} -j #{rvm_install_ruby_threads}", :shell => "#{rvm_install_shell}"
100
+ if gemset
101
+ run "#{File.join(rvm_bin_path, "rvm")} #{ruby} do rvm gemset create #{gemset}", :shell => "#{rvm_install_shell}"
102
+ end
103
+ end
104
+ end
105
+ end
54
106
  end
55
107
 
56
108
  # E.g, to use ree and rails 3:
57
109
  #
58
- # require 'rvm/capistrano'
110
+ # require 'rvm-capistrano'
59
111
  # set :rvm_ruby_string, "ree@rails3"
60
112
  #
61
-
62
-
@@ -1,5 +1,5 @@
1
1
  module RVM
2
- module Capistrano
3
- Version = "1.0.0"
2
+ class Capistrano
3
+ VERSION="1.0.1"
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,88 +1,118 @@
1
- --- !ruby/object:Gem::Specification
1
+ --- !ruby/object:Gem::Specification
2
2
  name: rvm-capistrano
3
- version: !ruby/object:Gem::Version
4
- version: 1.0.0
3
+ version: !ruby/object:Gem::Version
4
+ hash: 21
5
5
  prerelease:
6
+ segments:
7
+ - 1
8
+ - 0
9
+ - 1
10
+ version: 1.0.1
6
11
  platform: ruby
7
- authors:
12
+ authors:
8
13
  - Wayne E. Seguin
9
- - ! '"Michał Papis, '
14
+ - "Micha\xC5\x82 Papis"
10
15
  autorequire:
11
16
  bindir: bin
12
17
  cert_chain: []
13
- date: 2012-03-26 00:00:00.000000000 Z
14
- dependencies:
15
- - !ruby/object:Gem::Dependency
18
+
19
+ date: 2012-03-26 00:00:00 Z
20
+ dependencies:
21
+ - !ruby/object:Gem::Dependency
16
22
  name: capistrano
17
- requirement: &70319515786340 !ruby/object:Gem::Requirement
23
+ prerelease: false
24
+ requirement: &id001 !ruby/object:Gem::Requirement
18
25
  none: false
19
- requirements:
20
- - - ! '>='
21
- - !ruby/object:Gem::Version
22
- version: '0'
26
+ requirements:
27
+ - - ">="
28
+ - !ruby/object:Gem::Version
29
+ hash: 15
30
+ segments:
31
+ - 2
32
+ - 0
33
+ - 0
34
+ version: 2.0.0
23
35
  type: :runtime
24
- prerelease: false
25
- version_requirements: *70319515786340
26
- - !ruby/object:Gem::Dependency
36
+ version_requirements: *id001
37
+ - !ruby/object:Gem::Dependency
27
38
  name: rake
28
- requirement: &70319515785840 !ruby/object:Gem::Requirement
39
+ prerelease: false
40
+ requirement: &id002 !ruby/object:Gem::Requirement
29
41
  none: false
30
- requirements:
31
- - - ! '>='
32
- - !ruby/object:Gem::Version
33
- version: '0'
42
+ requirements:
43
+ - - ">="
44
+ - !ruby/object:Gem::Version
45
+ hash: 3
46
+ segments:
47
+ - 0
48
+ version: "0"
34
49
  type: :development
35
- prerelease: false
36
- version_requirements: *70319515785840
37
- - !ruby/object:Gem::Dependency
50
+ version_requirements: *id002
51
+ - !ruby/object:Gem::Dependency
38
52
  name: minitest
39
- requirement: &70319515785360 !ruby/object:Gem::Requirement
53
+ prerelease: false
54
+ requirement: &id003 !ruby/object:Gem::Requirement
40
55
  none: false
41
- requirements:
42
- - - ! '>='
43
- - !ruby/object:Gem::Version
44
- version: '0'
56
+ requirements:
57
+ - - ">="
58
+ - !ruby/object:Gem::Version
59
+ hash: 3
60
+ segments:
61
+ - 0
62
+ version: "0"
45
63
  type: :development
46
- prerelease: false
47
- version_requirements: *70319515785360
64
+ version_requirements: *id003
48
65
  description: RVM / Capistrano Integration Gem
49
- email:
66
+ email:
50
67
  - wayneeseguin@gmail.com
51
68
  - mpapis@gmail.com
52
69
  executables: []
70
+
53
71
  extensions: []
72
+
54
73
  extra_rdoc_files: []
55
- files:
74
+
75
+ files:
56
76
  - History.md
57
77
  - Manifest.yml
58
78
  - README.md
59
79
  - Rakefile
80
+ - lib/rvm-capistrano.rb
60
81
  - lib/rvm/capistrano.rb
61
82
  - lib/rvm/capistrano/version.rb
62
83
  - spec/spec_helper.rb
63
- homepage: https://rvm.beginrescueend.com/
84
+ homepage: https://rvm.beginrescueend.com/integration/capistrano
64
85
  licenses: []
86
+
65
87
  post_install_message:
66
88
  rdoc_options: []
67
- require_paths:
89
+
90
+ require_paths:
68
91
  - lib
69
- required_ruby_version: !ruby/object:Gem::Requirement
92
+ required_ruby_version: !ruby/object:Gem::Requirement
70
93
  none: false
71
- requirements:
72
- - - ! '>='
73
- - !ruby/object:Gem::Version
74
- version: '0'
75
- required_rubygems_version: !ruby/object:Gem::Requirement
94
+ requirements:
95
+ - - ">="
96
+ - !ruby/object:Gem::Version
97
+ hash: 3
98
+ segments:
99
+ - 0
100
+ version: "0"
101
+ required_rubygems_version: !ruby/object:Gem::Requirement
76
102
  none: false
77
- requirements:
78
- - - ! '>='
79
- - !ruby/object:Gem::Version
80
- version: '0'
103
+ requirements:
104
+ - - ">="
105
+ - !ruby/object:Gem::Version
106
+ hash: 3
107
+ segments:
108
+ - 0
109
+ version: "0"
81
110
  requirements: []
111
+
82
112
  rubyforge_project:
83
- rubygems_version: 1.8.15
113
+ rubygems_version: 1.8.21
84
114
  signing_key:
85
115
  specification_version: 3
86
116
  summary: RVM / Capistrano Integration Gem
87
- test_files:
117
+ test_files:
88
118
  - spec/spec_helper.rb