Class: TaskJuggler::Tj3TsReceiver

Inherits:
Tj3SheetAppBase show all
Defined in:
lib/taskjuggler/apps/Tj3TsReceiver.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

#initializeTj3TsReceiver

Returns a new instance of Tj3TsReceiver.



27
28
29
# File 'lib/taskjuggler/apps/Tj3TsReceiver.rb', line 27

def initialize
  super
end

Instance Method Details

#appMain(argv) ⇒ Object



45
46
47
48
49
50
51
52
53
54
55
56
# File 'lib/taskjuggler/apps/Tj3TsReceiver.rb', line 45

def appMain(argv)
  ts = TimeSheetReceiver.new('tj3ts_receiver')
  @rc.configure(ts, 'global')
  @rc.configure(ts, 'timesheets')
  @rc.configure(ts, 'timesheets.receiver')
  ts.workingDir = @workingDir if @workingDir
  ts.dryRun = @dryRun

  ts.processEmail

  0
end

#processArguments(argv) ⇒ Object



31
32
33
34
35
36
37
38
39
40
41
42
43
# File 'lib/taskjuggler/apps/Tj3TsReceiver.rb', line 31

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

EOT
	)
  end
end