Sha256: 4d2a3b3cc7c5e2107181d7420572b6fb5063ecbd934dd521c1c2e3b87632b48a

Contents?: true

Size: 1.56 KB

Versions: 4

Compression:

Stored size: 1.56 KB

Contents

require 'capistrano'
  module Capistrano
    module Fakerecipe
      def self.load_into(configuration)
        configuration.load do
          before "fake:before_this_execute_thing", "fake:thing"
          before "fake:before_this_also_execute_thing", "fake:thing"
          before "outside:undefined_task", "fake:thing"

          after "fake:after_this_execute_thing", "fake:thing"
          after "fake:after_this_also_execute_thing", "fake:thing"
          after "outside:undefined_task", "fake:thing"

          namespace :fake do
            desc "thing and run fake manifests"
            task :thing do
              set :bar, "baz"
              run('do some stuff')
              upload("foo", "/tmp/foo")
              download("/tmp/foo", "foo")
              get('/tmp/baz', 'baz')
              put('fake content', '/tmp/put')
            end
            desc "More fake tasks!"
            task :before_this_execute_thing do
              #
            end
            desc "You get the picture..."
            task :before_this_also_execute_thing do
              #
            end
            task :before_this_dont_execute_thing do
              #
            end
            task :after_this_execute_thing do
              #
            end
            task :after_this_also_execute_thing do
              #
            end
            task :after_this_dont_execute_thing do
              #
            end
          end
        end
      end
    end
  end

  if Capistrano::Configuration.instance
    Capistrano::FakeRecipe.load_into(Capistrano::Configuration.instance)
  end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
capistrano-spec-0.6.3 spec/recipe/fakerecipe.rb
capistrano-spec-0.6.2 spec/recipe/fakerecipe.rb
capistrano-spec-0.6.1 spec/recipe/fakerecipe.rb
capistrano-spec-0.6.0 spec/recipe/fakerecipe.rb