Class: Transcriptic::SBT

Inherits:
Object
  • Object
show all
Extended by:
UI
Defined in:
lib/transcriptic/sbt.rb

Defined Under Namespace

Classes: Installer

Class Method Summary collapse

Methods included from UI

arrow, confirm, confirm_billing, confirm_command, confirm_quote, deprecate, disable_error_capture, display, display_row, display_table, enable_error_capture, error, error_with_failure, extended, extended_into, fail, format_bytes, format_date, format_with_bang, get_terminal_environment, included, included_into, indent, info, json_decode, json_encode, longest, mute!, output, output_with_arrow, output_with_bang, output_with_indent, quantify, quiet?, redisplay, say, say_status, set_buffer, status, string_distance, suggestion, time_ago, truncate, unmute!, wait_spinner, warn

Class Method Details

.cleanObject



32
33
34
35
# File 'lib/transcriptic/sbt.rb', line 32

def clean
  ensure_installed
  sbt("clean")
end

.compileObject



6
7
8
9
# File 'lib/transcriptic/sbt.rb', line 6

def compile
  ensure_installed
  sbt("package")
end

.stageObject



11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
# File 'lib/transcriptic/sbt.rb', line 11

def stage
  ensure_installed
  if sbt("package")
    jars = Dir.glob("target/scala-2.10/*.jar")
    if jars.length == 0
      output_with_arrow "Couldn't find compiled package!  Is your code in the right directory?"
      false
    elsif jars.length > 1
      output_with_arrow "Multiple packages found: I'm unsure which one is correct.  Try `transcriptic clean` and recompiling."
      false
    else
      jars[0]
    end
  end
end

.updateObject



27
28
29
30
# File 'lib/transcriptic/sbt.rb', line 27

def update
  ensure_installed
  sbt("update")
end