Sha256: 8a98e522a04c789189087ba61a11e4914da7d32455324f34eb8cd70f7cc9ba2d

Contents?: true

Size: 515 Bytes

Versions: 8

Compression:

Stored size: 515 Bytes

Contents

module Runbook::Generators
  class Runbook < Thor::Group
    include ::Runbook::Generators::Base

    source_root File.dirname(__FILE__)

    def self.usage
      "runbook NAME [options]"
    end

    def self.description
      "Generate a runbook named NAME, e.x. deploy_nginx"
    end

    argument :name, desc: "The name of your runbook, e.x. deploy_nginx"

    def create_runbook
      target = File.join(options[:root], "#{name.underscore}.rb")
      template('templates/runbook.tt', target)
    end
  end
end

Version data entries

8 entries across 8 versions & 2 rubygems

Version Path
careacademy-runbook-1.2.0 lib/runbook/generators/runbook/runbook.rb
runbook-1.1.0 lib/runbook/generators/runbook/runbook.rb
runbook-1.0.0 lib/runbook/generators/runbook/runbook.rb
runbook-0.16.1 lib/runbook/generators/runbook/runbook.rb
runbook-0.16.0 lib/runbook/generators/runbook/runbook.rb
runbook-0.15.0 lib/runbook/generators/runbook/runbook.rb
runbook-0.14.0 lib/runbook/generators/runbook/runbook.rb
runbook-0.13.0 lib/runbook/generators/runbook/runbook.rb