From 447e4ce9506f9de32a3399ef0c78403b7d2281f0 Mon Sep 17 00:00:00 2001 From: seenmyfate Date: Fri, 13 Sep 2013 09:32:27 +0100 Subject: [PATCH] Move requires to `capistrano/all` This removes the need to set `require: false` in your Gemfile. Should prevent the issues described in #582 reoccurring. (also https://github.com/capistrano/rails/pull/15) --- bin/cap | 2 +- lib/capistrano.rb | 15 --------------- lib/capistrano/all.rb | 16 ++++++++++++++++ spec/spec_helper.rb | 2 +- 4 files changed, 18 insertions(+), 17 deletions(-) create mode 100644 lib/capistrano/all.rb diff --git a/bin/cap b/bin/cap index b8385128..5f4773b2 100755 --- a/bin/cap +++ b/bin/cap @@ -1,3 +1,3 @@ #!/usr/bin/env ruby -require 'capistrano' +require 'capistrano/all' Capistrano::Application.new.run diff --git a/lib/capistrano.rb b/lib/capistrano.rb index 88e5f631..e69de29b 100644 --- a/lib/capistrano.rb +++ b/lib/capistrano.rb @@ -1,15 +0,0 @@ -require 'rake' -require 'sshkit' -require 'sshkit/dsl' - -Rake.application.options.trace = true - -require 'capistrano/version' -require 'capistrano/version_validator' -require 'capistrano/i18n' -require 'capistrano/dsl' -require 'capistrano/application' -require 'capistrano/configuration' - -module Capistrano -end diff --git a/lib/capistrano/all.rb b/lib/capistrano/all.rb new file mode 100644 index 00000000..87dbc75b --- /dev/null +++ b/lib/capistrano/all.rb @@ -0,0 +1,16 @@ +require 'rake' +require 'sshkit' +require 'sshkit/dsl' + +Rake.application.options.trace = true + +require 'capistrano/version' +require 'capistrano/version_validator' +require 'capistrano/i18n' +require 'capistrano/dsl' +require 'capistrano/application' +require 'capistrano/configuration' + +module Capistrano + +end diff --git a/spec/spec_helper.rb b/spec/spec_helper.rb index 5adacbfc..609686a7 100644 --- a/spec/spec_helper.rb +++ b/spec/spec_helper.rb @@ -1,7 +1,7 @@ $LOAD_PATH.unshift(File.join(File.dirname(__FILE__), '..', 'lib')) $LOAD_PATH.unshift(File.dirname(__FILE__)) +require 'capistrano/all' require 'rspec' -require 'capistrano' require 'mocha/api' # Requires supporting files with custom matchers and macros, etc,