Class: TaskJuggler::Tj3SsReceiver

Inherits:
Tj3SheetAppBase show all
Defined in:
lib/taskjuggler/apps/Tj3SsReceiver.rb

Instance Method Summary collapse

Methods inherited from Tj3SheetAppBase

#optsEndDate

Methods inherited from Tj3AppBase

#main

Methods included from MessageHandler

#critical, #debug, #error, #fatal, #info, #warning

Constructor Details

#initializeTj3SsReceiver

Returns a new instance of Tj3SsReceiver.



25
26
27
# File 'lib/taskjuggler/apps/Tj3SsReceiver.rb', line 25

def initialize
  super
end

Instance Method Details

#appMain(argv) ⇒ Object



43
44
45
46
47
48
49
50
51
52
53
54
# File 'lib/taskjuggler/apps/Tj3SsReceiver.rb', line 43

def appMain(argv)
  ts = TaskJuggler::StatusSheetReceiver.new('tj3ss_receiver')
  @rc.configure(ts, 'global')
  @rc.configure(ts, 'statussheets')
  @rc.configure(ts, 'statussheets.receiver')
  ts.workingDir = @workingDir if @workingDir
  ts.dryRun = @dryRun

  ts.processEmail

  0
end

#processArguments(argv) ⇒ Object



29
30
31
32
33
34
35
36
37
38
39
40
41
# File 'lib/taskjuggler/apps/Tj3SsReceiver.rb', line 29

def processArguments(argv)
  super do
    @opts.banner.prepend(<<'EOT'
This program can be used to receive filled-out status sheets via email.
It reads the emails from STDIN and extracts the status sheet from the
attached files. The status sheet is checked for correctness. Good status
sheets are filed away. The sender be informed by email that the status
sheets was accepted or rejected.

EOT
	)
  end
end