Sha256: 491d65a257817e130474c0f702ede30d8dad5381bcf2914c1950197095980bf1

Contents?: true

Size: 566 Bytes

Versions: 1

Compression:

Stored size: 566 Bytes

Contents

module Fulmar
  module Domain
    module Service
      module Helper
        # Provides access helper to the database service from within a task
        module VhostHelper
          def vhost_name
            branch = git.current_branch
            match = branch.match(/f\d+_([a-zA-Z0-9]+)/)
            if match
              match[1]
            else
              error "Cannot deploy branch '#{branch}'"
              fail 'Branch must match specification for feature branches (f1234_name)'
            end
          end
        end
      end
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
fulmar-1.5.1 lib/fulmar/domain/service/helper/vhost_helper.rb