Sha256: 84fe5a8172e1d8eafa409b9c68296bc647e5256120cdc4ffa63436638df73367

Contents?: true

Size: 712 Bytes

Versions: 94

Compression:

Stored size: 712 Bytes

Contents

require "danger/danger_core/dangerfile_generator"

# Mainly so we can have a nice strucutre for commands

module Danger
  class DangerfileCommand < Runner
    self.summary = "Easily create you Dangerfiles."
    self.command = "dangerfile"

    self.abstract_command = true
    def self.options
      []
    end
  end
end

# Just a less verbose way of doing the Dangerfile from `danger init`.

module Danger
  class DangerfileInit < DangerfileCommand
    self.summary = "Create an example Dangerfile."
    self.command = "init"

    def run
      content = DangerfileGenerator.create_dangerfile(".", cork)
      File.write("Dangerfile", content)
      cork.puts "Created" + "./Dangerfile".green
    end
  end
end

Version data entries

94 entries across 94 versions & 1 rubygems

Version Path
danger-5.5.10 lib/danger/commands/dangerfile/init.rb
danger-5.5.9 lib/danger/commands/dangerfile/init.rb
danger-5.5.8 lib/danger/commands/dangerfile/init.rb
danger-5.5.7 lib/danger/commands/dangerfile/init.rb
danger-5.5.6 lib/danger/commands/dangerfile/init.rb
danger-5.5.5 lib/danger/commands/dangerfile/init.rb
danger-5.5.4 lib/danger/commands/dangerfile/init.rb
danger-5.5.3 lib/danger/commands/dangerfile/init.rb
danger-5.5.2 lib/danger/commands/dangerfile/init.rb
danger-5.5.1 lib/danger/commands/dangerfile/init.rb
danger-5.5.0 lib/danger/commands/dangerfile/init.rb
danger-5.4.3 lib/danger/commands/dangerfile/init.rb
danger-5.4.2 lib/danger/commands/dangerfile/init.rb
danger-5.4.1 lib/danger/commands/dangerfile/init.rb
danger-5.4.0 lib/danger/commands/dangerfile/init.rb
danger-5.3.5 lib/danger/commands/dangerfile/init.rb
danger-5.3.4 lib/danger/commands/dangerfile/init.rb
danger-5.3.3 lib/danger/commands/dangerfile/init.rb
danger-5.3.2 lib/danger/commands/dangerfile/init.rb
danger-5.3.1 lib/danger/commands/dangerfile/init.rb