rvm-capistrano 1.0.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,5 @@
1
+ === 1.0 / 2012-03-26
2
+
3
+ * Ported RVM /Capistrano Gem Library into it's own repository from the main RVM
4
+ repostitory. ( https://github.com/wayneeseguin/rvm-capistrano )
5
+
@@ -0,0 +1,6 @@
1
+ - History.md
2
+ - Manifest.yml
3
+ - README.md
4
+ - Rakefile
5
+ - lib/rvm/capistrano.rb
6
+ - lib/rvm/capistrano/version.rb
@@ -0,0 +1,16 @@
1
+ # rvm
2
+
3
+ https://rvm.beginrescueend.com/
4
+
5
+ ## Description
6
+
7
+ RVM / Capistrano Integration Gem
8
+
9
+ ## Installation
10
+
11
+ * gem install rvm-capistrano
12
+
13
+ ## Development
14
+
15
+ $ rake spec
16
+
@@ -0,0 +1,9 @@
1
+ task :default => "spec:run"
2
+
3
+ namespace :spec do
4
+ desc "Run the tests."
5
+ task :run do
6
+ # TODO: Port over the tests.
7
+ end
8
+ end
9
+
@@ -0,0 +1,62 @@
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
+
6
+ Capistrano::Configuration.instance(true).load do
7
+
8
+ # Taken from the capistrano code.
9
+ def _cset(name, *args, &block)
10
+ unless exists?(name)
11
+ set(name, *args, &block)
12
+ end
13
+ end
14
+
15
+ set :default_shell do
16
+ shell = File.join(rvm_bin_path, "rvm-shell")
17
+ ruby = rvm_ruby_string.to_s.strip
18
+ shell = "rvm_path=#{rvm_path} #{shell} '#{ruby}'" unless ruby.empty?
19
+ shell
20
+ end
21
+
22
+ # Let users set the type of their rvm install.
23
+ _cset(:rvm_type, :system)
24
+
25
+ # Define rvm_path
26
+ # This is used in the default_shell command to pass the required variable to rvm-shell, allowing
27
+ # rvm to boostrap using the proper path. This is being lost in Capistrano due to the lack of a
28
+ # full environment.
29
+ _cset(:rvm_path) do
30
+ case rvm_type
31
+ when :root, :system
32
+ "/usr/local/rvm"
33
+ when :local, :user, :default
34
+ "$HOME/.rvm/"
35
+ else
36
+ rvm_type.to_s.empty? ? "$HOME/.rvm" : rvm_type.to_s
37
+ end
38
+ end
39
+
40
+ # Let users override the rvm_bin_path
41
+ _cset(:rvm_bin_path) do
42
+ case rvm_type
43
+ when :root, :system
44
+ "/usr/local/rvm/bin"
45
+ when :local, :user, :default
46
+ "$HOME/.rvm/bin"
47
+ else
48
+ rvm_type.to_s.empty? ? "#{rvm_path}/bin" : rvm_type.to_s
49
+ end
50
+ end
51
+
52
+ # Use the default ruby on the server, by default :)
53
+ _cset(:rvm_ruby_string, "default")
54
+ end
55
+
56
+ # E.g, to use ree and rails 3:
57
+ #
58
+ # require 'rvm/capistrano'
59
+ # set :rvm_ruby_string, "ree@rails3"
60
+ #
61
+
62
+
@@ -0,0 +1,5 @@
1
+ module RVM
2
+ module Capistrano
3
+ Version = "1.0.0"
4
+ end
5
+ end
@@ -0,0 +1,2 @@
1
+ require 'minitest'
2
+ require 'minitest/spec'
metadata ADDED
@@ -0,0 +1,88 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: rvm-capistrano
3
+ version: !ruby/object:Gem::Version
4
+ version: 1.0.0
5
+ prerelease:
6
+ platform: ruby
7
+ authors:
8
+ - Wayne E. Seguin
9
+ - ! '"Michał Papis, '
10
+ autorequire:
11
+ bindir: bin
12
+ cert_chain: []
13
+ date: 2012-03-26 00:00:00.000000000 Z
14
+ dependencies:
15
+ - !ruby/object:Gem::Dependency
16
+ name: capistrano
17
+ requirement: &70319515786340 !ruby/object:Gem::Requirement
18
+ none: false
19
+ requirements:
20
+ - - ! '>='
21
+ - !ruby/object:Gem::Version
22
+ version: '0'
23
+ type: :runtime
24
+ prerelease: false
25
+ version_requirements: *70319515786340
26
+ - !ruby/object:Gem::Dependency
27
+ name: rake
28
+ requirement: &70319515785840 !ruby/object:Gem::Requirement
29
+ none: false
30
+ requirements:
31
+ - - ! '>='
32
+ - !ruby/object:Gem::Version
33
+ version: '0'
34
+ type: :development
35
+ prerelease: false
36
+ version_requirements: *70319515785840
37
+ - !ruby/object:Gem::Dependency
38
+ name: minitest
39
+ requirement: &70319515785360 !ruby/object:Gem::Requirement
40
+ none: false
41
+ requirements:
42
+ - - ! '>='
43
+ - !ruby/object:Gem::Version
44
+ version: '0'
45
+ type: :development
46
+ prerelease: false
47
+ version_requirements: *70319515785360
48
+ description: RVM / Capistrano Integration Gem
49
+ email:
50
+ - wayneeseguin@gmail.com
51
+ - mpapis@gmail.com
52
+ executables: []
53
+ extensions: []
54
+ extra_rdoc_files: []
55
+ files:
56
+ - History.md
57
+ - Manifest.yml
58
+ - README.md
59
+ - Rakefile
60
+ - lib/rvm/capistrano.rb
61
+ - lib/rvm/capistrano/version.rb
62
+ - spec/spec_helper.rb
63
+ homepage: https://rvm.beginrescueend.com/
64
+ licenses: []
65
+ post_install_message:
66
+ rdoc_options: []
67
+ require_paths:
68
+ - lib
69
+ required_ruby_version: !ruby/object:Gem::Requirement
70
+ none: false
71
+ requirements:
72
+ - - ! '>='
73
+ - !ruby/object:Gem::Version
74
+ version: '0'
75
+ required_rubygems_version: !ruby/object:Gem::Requirement
76
+ none: false
77
+ requirements:
78
+ - - ! '>='
79
+ - !ruby/object:Gem::Version
80
+ version: '0'
81
+ requirements: []
82
+ rubyforge_project:
83
+ rubygems_version: 1.8.15
84
+ signing_key:
85
+ specification_version: 3
86
+ summary: RVM / Capistrano Integration Gem
87
+ test_files:
88
+ - spec/spec_helper.rb