class Guard::Julia

Guard plugin for the Julia language.

Attributes

options[RW]

Options for plugin.

runner[RW]

Runner that handles Julia commands.

Public Class Methods

new(options = {}) click to toggle source
Calls superclass method
# File lib/guard/julia.rb, line 15
def initialize(options = {})
  super

  @options = {
    all_on_start: true
  }.merge(options)
  @runner = Runner.new(@options)
end

Public Instance Methods

reload() click to toggle source
# File lib/guard/julia.rb, line 33
def reload
  true
end
run_all() click to toggle source
# File lib/guard/julia.rb, line 37
def run_all
  UI.info 'Running: all tests', reset: true
  throw_on_failed_tests { runner.run_all }
end
run_on_additions(_) click to toggle source
# File lib/guard/julia.rb, line 46
def run_on_additions(_)
  true
end
run_on_changes(_) click to toggle source
# File lib/guard/julia.rb, line 42
def run_on_changes(_)
  true
end
run_on_modifications(paths) click to toggle source
# File lib/guard/julia.rb, line 50
def run_on_modifications(paths)
  UI.info "Running: #{paths.join(', ')}", reset: true
  throw_on_failed_tests { runner.run_on_modifications(paths) }
end
run_on_removals(_) click to toggle source
# File lib/guard/julia.rb, line 55
def run_on_removals(_)
  true
end
start() click to toggle source
# File lib/guard/julia.rb, line 24
def start
  UI.info "Guard::Julia #{JuliaVersion::VERSION} is running"
  run_all if @options[:all_on_start]
end
stop() click to toggle source
# File lib/guard/julia.rb, line 29
def stop
  true
end

Private Instance Methods

throw_on_failed_tests() { || ... } click to toggle source

Runs block and throws :task_has_failed when return is false.

# File lib/guard/julia.rb, line 63
def throw_on_failed_tests
  throw :task_has_failed unless yield
end