Module: Approvals::Reporters::Launcher

Defined in:
lib/approvals/reporters/launcher.rb

Constant Summary collapse

REPORTERS =
[:opendiff, :diffmerge, :vimdiff, :tortoisediff, :filelauncher]

Class Method Summary collapse

Class Method Details

.diffmerge_command(received, approved) ⇒ Object



31
32
33
# File 'lib/approvals/reporters/launcher.rb', line 31

def diffmerge_command(received, approved)
  "/Applications/DiffMerge.app/Contents/MacOS/DiffMerge --nosplash \"#{received}\" \"#{approved}\""
end

.filelauncher_command(received, approved) ⇒ Object



43
44
45
# File 'lib/approvals/reporters/launcher.rb', line 43

def filelauncher_command(received, approved)
  "open #{received}"
end

.memoized(instance_variable) ⇒ Object



9
10
11
12
13
14
15
# File 'lib/approvals/reporters/launcher.rb', line 9

def memoized(instance_variable)
  unless self.instance_variable_get(instance_variable)
    value = yield
    self.instance_variable_set(instance_variable, value)
  end
  self.instance_variable_get(instance_variable)
end

.opendiff_command(received, approved) ⇒ Object



27
28
29
# File 'lib/approvals/reporters/launcher.rb', line 27

def opendiff_command(received, approved)
  "opendiff #{received} #{approved}"
end

.tortoisediff_command(received, approved) ⇒ Object



39
40
41
# File 'lib/approvals/reporters/launcher.rb', line 39

def tortoisediff_command(received, approved)
  "C:\\Program Files\\TortoiseSVN\\bin\\TortoiseMerge.exe #{received} #{approved}"
end

.vimdiff_command(received, approved) ⇒ Object



35
36
37
# File 'lib/approvals/reporters/launcher.rb', line 35

def vimdiff_command(received, approved)
  "vimdiff #{received} #{approved}"
end