Skip to content
Browse files

Add basic recipes.

* add 'cap rubygems:update'
* add 'cap bundler:install'
* add 'cap bundle:install'
* add 'cap bundle:reset'

Proudly bump version to 0.0.1
  • Loading branch information...
1 parent 7064def commit d9d7003697d86dc6cb391b5a15a838ca22e7d0da @pr0d1r2 pr0d1r2 committed Nov 14, 2011
Showing with 83 additions and 0 deletions.
  1. +7 −0 CHANGELOG.rdoc
  2. +7 −0 Manifest
  3. +25 −0 Rakefile
  4. +31 −0 lib/capistrano/ext/rvm-bundler.rb
  5. +13 −0 lib/capistrano/ext/version.rb
View
7 CHANGELOG.rdoc
@@ -2,3 +2,10 @@
* add description in README
* add MIT license
+
+== 0.0.1 (November 14, 2011)
+
+* add 'cap rubygems:update'
+* add 'cap bundler:install'
+* add 'cap bundle:install'
+* add 'cap bundle:reset'
View
7 Manifest
@@ -0,0 +1,7 @@
+CHANGELOG.rdoc
+MIT-LICENSE
+README
+Rakefile
+lib/capistrano/ext/rvm-bundler.rb
+lib/capistrano/ext/version.rb
+Manifest
View
25 Rakefile
@@ -0,0 +1,25 @@
+begin
+ require 'echoe'
+rescue LoadError
+ abort "You'll need to have `echoe' installed to use capistrano-ext-rvm-bundler's Rakefile"
+end
+
+require "./lib/capistrano/ext/version"
+
+version = Capistrano::Ext::RvmBundler::Version::STRING.dup
+if ENV['SNAPSHOT'].to_i == 1
+ version << "." << Time.now.utc.strftime("%Y%m%d%H%M%S")
+end
+
+Echoe.new('capistrano-ext-rvm-bundler', version) do |p|
+ p.changelog = "CHANGELOG.rdoc"
+
+ p.author = "Marcin Nowicki"
+ p.email = "pr0d1r2@gmail.com"
+ p.summary = "Capistrano recipes to support RVM installations with bundler"
+ p.url = "https://github.com/doubledrones/capistrano-ext-rvm-bundler"
+
+ p.need_zip = true
+
+ p.dependencies = ["capistrano >=1.0.0", "capistrano-ext-rvm >=0.0.1"]
+end
View
31 lib/capistrano/ext/rvm-bundler.rb
@@ -0,0 +1,31 @@
+require 'capistrano/ext/rvm'
+
+Capistrano::Configuration.instance.load do
+
+ namespace :rubygems do
+ desc "update rubygems in RVM environment"
+ task :update do
+ run "rvm '#{rvm_ruby_string}' && gem update --system"
+ end
+ end
+
+ namespace :bundler do
+ desc "install bundler gem in RVM environment"
+ task :install do
+ run "rvm '#{rvm_ruby_string}' && gem install bundler"
+ end
+ end
+
+ namespace :bundle do
+ desc "install bundle in RVM environment"
+ task :install do
+ run "cd #{latest_release} && rvm '#{rvm_ruby_string}' && bundle install --gemfile #{latest_release}/Gemfile --quiet --without development test"
+ end
+
+ desc "reset bundle in RVM environment"
+ task :reset do
+ run "cd #{current_path} && rvm '#{rvm_ruby_string}' && rm -f Gemfile.lock && rm -rf `rvm gemdir` && gem install bundler && bundle install --gemfile #{current_path}/Gemfile --without development test"
+ end
+ end
+
+end
View
13 lib/capistrano/ext/version.rb
@@ -0,0 +1,13 @@
+module Capistrano
+ module Ext
+ module RvmBundler
+ module Version #:nodoc:
+ MAJOR = 0
+ MINOR = 0
+ TINY = 1
+
+ STRING = [MAJOR, MINOR, TINY].join(".")
+ end
+ end
+ end
+end

0 comments on commit d9d7003

Please sign in to comment.
Something went wrong with that request. Please try again.