capistrano-rvm 0.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/.gitignore +18 -0
- data/Gemfile +4 -0
- data/LICENSE +22 -0
- data/README.md +41 -0
- data/Rakefile +2 -0
- data/capistrano-rvm.gemspec +19 -0
- data/lib/capistrano-rvm.rb +2 -0
- data/lib/capistrano-rvm/capistrano_integration.rb +60 -0
- data/lib/capistrano-rvm/version.rb +5 -0
- metadata +65 -0
data/.gitignore
ADDED
data/Gemfile
ADDED
data/LICENSE
ADDED
@@ -0,0 +1,22 @@
|
|
1
|
+
Copyright (c) 2012 Edwin Cruz
|
2
|
+
|
3
|
+
MIT License
|
4
|
+
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining
|
6
|
+
a copy of this software and associated documentation files (the
|
7
|
+
"Software"), to deal in the Software without restriction, including
|
8
|
+
without limitation the rights to use, copy, modify, merge, publish,
|
9
|
+
distribute, sublicense, and/or sell copies of the Software, and to
|
10
|
+
permit persons to whom the Software is furnished to do so, subject to
|
11
|
+
the following conditions:
|
12
|
+
|
13
|
+
The above copyright notice and this permission notice shall be
|
14
|
+
included in all copies or substantial portions of the Software.
|
15
|
+
|
16
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
17
|
+
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
18
|
+
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
19
|
+
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
20
|
+
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
21
|
+
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
22
|
+
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
data/README.md
ADDED
@@ -0,0 +1,41 @@
|
|
1
|
+
# Capistrano::Rvm
|
2
|
+
|
3
|
+
Capistrano tasks to work with RVM
|
4
|
+
|
5
|
+
## Installation
|
6
|
+
|
7
|
+
Add this line to your application's Gemfile:
|
8
|
+
|
9
|
+
gem 'capistrano-rvm'
|
10
|
+
|
11
|
+
And then execute:
|
12
|
+
|
13
|
+
$ bundle
|
14
|
+
|
15
|
+
Or install it yourself as:
|
16
|
+
|
17
|
+
$ gem install capistrano-rvm
|
18
|
+
|
19
|
+
## Usage
|
20
|
+
|
21
|
+
Add this after you define rvm_ruby_string:
|
22
|
+
|
23
|
+
require 'capistrano-rvm'
|
24
|
+
|
25
|
+
This gem includes the following tasks:
|
26
|
+
|
27
|
+
cap rvm # Installs rvm, ruby and bundler
|
28
|
+
cap rvm:create_gemset # Creates the gemset to use
|
29
|
+
cap rvm:default_ruby # sets as default current ruby version
|
30
|
+
cap rvm:install # Installs rvm
|
31
|
+
cap rvm:install_bundler # Install bundler gem
|
32
|
+
cap rvm:install_ruby # Installs ruby version specified in rvm_ruby_st...
|
33
|
+
|
34
|
+
|
35
|
+
## Contributing
|
36
|
+
|
37
|
+
1. Fork it
|
38
|
+
2. Create your feature branch (`git checkout -b my-new-feature`)
|
39
|
+
3. Commit your changes (`git commit -am 'Added some feature'`)
|
40
|
+
4. Push to the branch (`git push origin my-new-feature`)
|
41
|
+
5. Create new Pull Request
|
data/Rakefile
ADDED
@@ -0,0 +1,19 @@
|
|
1
|
+
# -*- encoding: utf-8 -*-
|
2
|
+
require File.expand_path('../lib/capistrano-rvm/version', __FILE__)
|
3
|
+
|
4
|
+
Gem::Specification.new do |gem|
|
5
|
+
gem.authors = ["Edwin Cruz"]
|
6
|
+
gem.email = ["softr8@gmail.com"]
|
7
|
+
gem.description = %q{Capistrano tasks to manage rvm commands}
|
8
|
+
gem.summary = %q{Some tasks to install rvm, ruby and bundler without pain}
|
9
|
+
gem.homepage = ""
|
10
|
+
|
11
|
+
gem.executables = `git ls-files -- bin/*`.split("\n").map{ |f| File.basename(f) }
|
12
|
+
gem.files = `git ls-files`.split("\n")
|
13
|
+
gem.test_files = `git ls-files -- {test,spec,features}/*`.split("\n")
|
14
|
+
gem.name = "capistrano-rvm"
|
15
|
+
gem.require_paths = ["lib"]
|
16
|
+
gem.version = Capistrano::Rvm::VERSION
|
17
|
+
|
18
|
+
gem.add_runtime_dependency "capistrano"
|
19
|
+
end
|
@@ -0,0 +1,60 @@
|
|
1
|
+
require "capistrano"
|
2
|
+
require "capistrano/version"
|
3
|
+
|
4
|
+
module CapistranoResque
|
5
|
+
class CapistranoIntegration
|
6
|
+
def self.load_into(capistrano_config)
|
7
|
+
capistrano_config.load do
|
8
|
+
|
9
|
+
namespace :rvm do
|
10
|
+
|
11
|
+
set :ruby_version, rvm_ruby_string.split('@').first
|
12
|
+
set :gemset_name, rvm_ruby_string.split('@')[1] || application
|
13
|
+
set :tmp_ruby_string, rvm_ruby_string
|
14
|
+
|
15
|
+
desc "Installs rvm, ruby and bundler"
|
16
|
+
task :default do
|
17
|
+
install
|
18
|
+
install_ruby
|
19
|
+
install_bundler
|
20
|
+
create_gemset
|
21
|
+
end
|
22
|
+
|
23
|
+
desc "Installs rvm"
|
24
|
+
task :install, :except => {:no_release => true} do
|
25
|
+
set :rvm_ruby_string, ''
|
26
|
+
run "RVM=`rvm | grep 'RVM'` ; if [ -z \"$RVM\" ] ; then bash -s stable < <(curl -s https://raw.github.com/wayneeseguin/rvm/master/binscripts/rvm-installer) ; fi", shell: 'bash -l'
|
27
|
+
set :rvm_ruby_string, tmp_ruby_string
|
28
|
+
end
|
29
|
+
|
30
|
+
desc "installs ruby version specified in rvm_ruby_string"
|
31
|
+
task :install_ruby, :except => {:no_release => true} do
|
32
|
+
set :rvm_ruby_string, ''
|
33
|
+
run "RUBY_INSTALLED=`rvm list | grep '#{ruby_version}'` ; if [ -z \"$RUBY_INSTALLED\" ]; then rvm install #{ruby_version} ; fi"
|
34
|
+
set :rvm_ruby_string, tmp_ruby_string
|
35
|
+
end
|
36
|
+
|
37
|
+
desc "sets as default current ruby version"
|
38
|
+
task :default_ruby, :except => {:no_release => true} do
|
39
|
+
run "rvm --default #{ruby_version}"
|
40
|
+
end
|
41
|
+
|
42
|
+
desc "install bundler gem"
|
43
|
+
task :install_bundler, :except => {:no_release => true} do
|
44
|
+
run "if [ -z \"`gem list | grep bundler`\" ] ; then gem install bundler --no-rdoc --no-ri ; fi "
|
45
|
+
end
|
46
|
+
|
47
|
+
task :create_gemset, :except => {:no_release => true} do
|
48
|
+
set :rvm_ruby_string, ruby_version
|
49
|
+
run "rvm gemset create #{gemset_name}"
|
50
|
+
set :rvm_ruby_string, tmp_ruby_string
|
51
|
+
end
|
52
|
+
end
|
53
|
+
end
|
54
|
+
end
|
55
|
+
end
|
56
|
+
end
|
57
|
+
|
58
|
+
if Capistrano::Configuration.instance
|
59
|
+
CapistranoResque::CapistranoIntegration.load_into(Capistrano::Configuration.instance)
|
60
|
+
end
|
metadata
ADDED
@@ -0,0 +1,65 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: capistrano-rvm
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.0.1
|
5
|
+
prerelease:
|
6
|
+
platform: ruby
|
7
|
+
authors:
|
8
|
+
- Edwin Cruz
|
9
|
+
autorequire:
|
10
|
+
bindir: bin
|
11
|
+
cert_chain: []
|
12
|
+
date: 2012-07-10 00:00:00.000000000 Z
|
13
|
+
dependencies:
|
14
|
+
- !ruby/object:Gem::Dependency
|
15
|
+
name: capistrano
|
16
|
+
requirement: &2172920960 !ruby/object:Gem::Requirement
|
17
|
+
none: false
|
18
|
+
requirements:
|
19
|
+
- - ! '>='
|
20
|
+
- !ruby/object:Gem::Version
|
21
|
+
version: '0'
|
22
|
+
type: :runtime
|
23
|
+
prerelease: false
|
24
|
+
version_requirements: *2172920960
|
25
|
+
description: Capistrano tasks to manage rvm commands
|
26
|
+
email:
|
27
|
+
- softr8@gmail.com
|
28
|
+
executables: []
|
29
|
+
extensions: []
|
30
|
+
extra_rdoc_files: []
|
31
|
+
files:
|
32
|
+
- .gitignore
|
33
|
+
- Gemfile
|
34
|
+
- LICENSE
|
35
|
+
- README.md
|
36
|
+
- Rakefile
|
37
|
+
- capistrano-rvm.gemspec
|
38
|
+
- lib/capistrano-rvm.rb
|
39
|
+
- lib/capistrano-rvm/capistrano_integration.rb
|
40
|
+
- lib/capistrano-rvm/version.rb
|
41
|
+
homepage: ''
|
42
|
+
licenses: []
|
43
|
+
post_install_message:
|
44
|
+
rdoc_options: []
|
45
|
+
require_paths:
|
46
|
+
- lib
|
47
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
48
|
+
none: false
|
49
|
+
requirements:
|
50
|
+
- - ! '>='
|
51
|
+
- !ruby/object:Gem::Version
|
52
|
+
version: '0'
|
53
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
54
|
+
none: false
|
55
|
+
requirements:
|
56
|
+
- - ! '>='
|
57
|
+
- !ruby/object:Gem::Version
|
58
|
+
version: '0'
|
59
|
+
requirements: []
|
60
|
+
rubyforge_project:
|
61
|
+
rubygems_version: 1.8.10
|
62
|
+
signing_key:
|
63
|
+
specification_version: 3
|
64
|
+
summary: Some tasks to install rvm, ruby and bundler without pain
|
65
|
+
test_files: []
|