Permalink
Browse files

initial commit

  • Loading branch information...
1 parent 879a743 commit b8a67d3238e59887eeb676a7ff0ac67b3335b536 @seenmyfate seenmyfate committed Aug 9, 2013
Showing with 121 additions and 3 deletions.
  1. +4 −0 Gemfile
  2. +22 −0 LICENSE.txt
  3. +28 −3 README.md
  4. +1 −0 Rakefile
  5. +24 −0 capistrano-bundler.gemspec
  6. +1 −0 lib/capistrano/bundler.rb
  7. +41 −0 lib/capistrano/tasks/bundler.cap
View
@@ -0,0 +1,4 @@
+source 'https://rubygems.org'
+
+# Specify your gem's dependencies in capistrano-bundler.gemspec
+gemspec
View
@@ -0,0 +1,22 @@
+Copyright (c) 2013 seenmyfate
+
+MIT License
+
+Permission is hereby granted, free of charge, to any person obtaining
+a copy of this software and associated documentation files (the
+"Software"), to deal in the Software without restriction, including
+without limitation the rights to use, copy, modify, merge, publish,
+distribute, sublicense, and/or sell copies of the Software, and to
+permit persons to whom the Software is furnished to do so, subject to
+the following conditions:
+
+The above copyright notice and this permission notice shall be
+included in all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
View
@@ -1,4 +1,29 @@
-bundler
-=======
+# Capistrano::Bundler
-Bundler support for Capistrano 3.x
+TODO: Write a gem description
+
+## Installation
+
+Add this line to your application's Gemfile:
+
+ gem 'capistrano-bundler'
+
+And then execute:
+
+ $ bundle
+
+Or install it yourself as:
+
+ $ gem install capistrano-bundler
+
+## Usage
+
+TODO: Write usage instructions here
+
+## Contributing
+
+1. Fork it
+2. Create your feature branch (`git checkout -b my-new-feature`)
+3. Commit your changes (`git commit -am 'Add some feature'`)
+4. Push to the branch (`git push origin my-new-feature`)
+5. Create new Pull Request
View
@@ -0,0 +1 @@
+require "bundler/gem_tasks"
@@ -0,0 +1,24 @@
+# coding: utf-8
+lib = File.expand_path('../lib', __FILE__)
+$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
+
+Gem::Specification.new do |spec|
+ spec.name = 'capistrano-bundler'
+ spec.version = '0.0.1'
+ spec.authors = ['Tom Clements', 'Lee Hambley']
+ spec.email = ['seenmyfate@gmail.com', 'lee.hambley@gmail.com']
+ spec.description = %q{Bundler support for Capistrano 3.x}
+ spec.summary = %q{Bundler support for Capistrano 3.x}
+ spec.homepage = 'https://github.com/capistrano/bundler'
+ spec.license = 'MIT'
+
+ spec.files = `git ls-files`.split($/)
+ spec.executables = spec.files.grep(%r{^bin/}) { |f| File.basename(f) }
+ spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
+ spec.require_paths = ['lib']
+
+ spec.add_dependency 'capistrano', '>= 3.0.0.pre'
+
+ spec.add_development_dependency 'bundler', '~> 1.3'
+ spec.add_development_dependency 'rake'
+end
@@ -0,0 +1 @@
+load File.expand_path('../tasks/bundler.cap', __FILE__)
@@ -0,0 +1,41 @@
+namespace :bundler do
+ desc <<-DESC
+ Install the current Bundler environment. By default, gems will be \
+ installed to the shared/bundle path. Gems in the development and \
+ test group will not be installed. The install command is executed \
+ with the --deployment and --quiet flags.
+
+ You can override any of these defaults by setting the variables shown below.
+
+ set :bundle_gemfile, -> { release_path.join('Gemfile') }
+ set :bundle_dir, -> { shared_path.join('bundle') }
+ set :bundle_flags, '--deployment --quiet'
+ set :bundle_without, %w{development test}.join(' ')
+ set :bundle_binstubs, -> { shared_path.join('bin') }
+ set :bundle_roles, :all
+ DESC
+ task :install do
+ on roles fetch(:bundle_roles) do
+ within release_path do
+ execute :bundle, "--gemfile #{fetch(:bundle_gemfile)}",
+ "--path #{fetch(:bundle_dir)}",
+ fetch(:bundle_flags),
+ "--binstubs #{fetch(:bundle_binstubs)}",
+ "--without #{fetch(:bundle_without)}"
+ end
+ end
+ end
+
+ before 'deploy:updated', 'bundler:install'
+end
+
+namespace :load do
+ task :defaults do
+ set :bundle_gemfile, release_path.join('Gemfile')
+ set :bundle_dir, shared_path.join('vendor/bundle')
+ set :bundle_flags, '--deployment'
+ set :bundle_without, %w{development test}.join(' ')
+ set :bundle_binstubs, shared_path.join('bin')
+ set :bundle_roles, :all
+ end
+end

0 comments on commit b8a67d3

Please sign in to comment.