Module: Rum

Defined in:
lib/rumrunner.rb,
lib/rumrunner/init.rb,
lib/rumrunner/docker.rb,
lib/rumrunner/version.rb,
lib/rumrunner/manifest.rb,
lib/rumrunner/application.rb,
lib/rumrunner/dsl_definition.rb

Overview

Rum Runner namespace.

Defined Under Namespace

Modules: DSL, Docker Classes: Application, Manifest

Constant Summary collapse

VERSION =

Rum Runner gem version.

"0.3.3"

Class Method Summary collapse

Class Method Details

.init(input = nil, stdin = $stdin, stdout = $stdout, stderr = $stderr) ⇒ Object

Helper to initialize a Rumfile

Example:

$ ruby -r rumrunner -e Rum.init > Rumfile

12
13
14
15
16
17
18
19
20
21
# File 'lib/rumrunner/init.rb', line 12

def init(input = nil, stdin = $stdin, stdout = $stdout, stderr = $stderr)
  # Get image name from $stdin
  image = gets_image input, stdin, stderr

  # Begin Rumfile
  stdout.write "#!/usr/bin/env ruby\n"
  stdout.write "rum :\"#{image.family}\" do\n"
  stdout.write parse_stages "Dockerfile" if File.exist? "Dockerfile"
  stdout.write "end\n"
end