Sha256: 0e806d0ff11bb04677b45497650388a41379a13ee6605e975a7c361b55fc34bb

Contents?: true

Size: 1016 Bytes

Versions: 6

Compression:

Stored size: 1016 Bytes

Contents

#!/usr/bin/env ruby
# frozen_string_literal: true

require 'thor'

class ::CapistranoDataPlaneApiCommand < ::Thor
  include ::Thor::Actions

  class << self
    # Define the generator's root folder
    #
    # @return [String]
    def source_root
      ::File.expand_path('..', __dir__)
    end
  end

  desc 'install', 'Install the `capistrano-data_plane_api` gem in your application'

  # @return [void]
  def install
    copy_file 'templates/bin/deploy', 'bin/deploy'
    chmod 'bin/deploy', 'a+x'
    copy_file 'templates/bin/deploy.rb', 'bin/deploy.rb'

    copy_file 'templates/config/data_plane_api.yml', 'config/data_plane_api.yml'
    copy_file 'templates/config/data_plane_api.rb', 'config/data_plane_api.rb'

    inject_into_file 'Capfile', <<~RUBY, after: %r{require ("|')capistrano/deploy("|')\n}
      require_relative "config/data_plane_api" # load your `capistrano-data_plane_api` config file
      require "capistrano/data_plane_api/hooks"
    RUBY

  end
end

::CapistranoDataPlaneApiCommand.start

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
capistrano-data_plane_api-0.1.5 exe/cap_data_plane_api
capistrano-data_plane_api-0.1.4 exe/cap_data_plane_api
capistrano-data_plane_api-0.1.3 exe/cap_data_plane_api
capistrano-data_plane_api-0.1.2 exe/cap_data_plane_api
capistrano-data_plane_api-0.1.1 exe/cap_data_plane_api
capistrano-data_plane_api-0.1.0 exe/cap_data_plane_api