Sha256: acf8009025a199e6397fa7bdee9da262db910bafc97d9ce37d6e15f8ae7493c1

Contents?: true

Size: 641 Bytes

Versions: 9

Compression:

Stored size: 641 Bytes

Contents

module CrossroadsCapistrano
  if defined?(Capistrano)
    @@cap_config = Capistrano::Configuration.instance(:must_exist)
    class << self
      def load_recipes(recipes)
        @@cap_config.load do
          if recipes == :all
            # Load all available recipes.
            Dir.glob(File.join(File.dirname(__FILE__), 'crossroads_capistrano', '*.rb')).each{|f| load f}
          else
            # Load each specified recipe.
            recipes.each {|r| load File.join(File.dirname(__FILE__),'crossroads_capistrano',"#{r}.rb")}
          end
        end
      end
    end
  else
    puts "Capistrano gem is not loaded."
  end
end

Version data entries

9 entries across 9 versions & 1 rubygems

Version Path
crossroads_capistrano-1.2.8 lib/crossroads_capistrano.rb
crossroads_capistrano-1.2.7 lib/crossroads_capistrano.rb
crossroads_capistrano-1.2.6 lib/crossroads_capistrano.rb
crossroads_capistrano-1.2.5 lib/crossroads_capistrano.rb
crossroads_capistrano-1.2.4 lib/crossroads_capistrano.rb
crossroads_capistrano-1.2.3 lib/crossroads_capistrano.rb
crossroads_capistrano-1.2.2 lib/crossroads_capistrano.rb
crossroads_capistrano-1.2.1 lib/crossroads_capistrano.rb
crossroads_capistrano-1.2.0 lib/crossroads_capistrano.rb