latex_curriculum_vitae 2.0.0 → 2.1.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (43) hide show
  1. checksums.yaml +4 -4
  2. data/Gemfile +10 -8
  3. data/Gemfile.lock +53 -52
  4. data/History.rdoc +15 -0
  5. data/LICENSE.rdoc +619 -24
  6. data/Manifest.txt +7 -12
  7. data/NEWS +69 -0
  8. data/README.rdoc +103 -43
  9. data/Rakefile +31 -42
  10. data/STATUS.rdoc +23 -0
  11. data/bin/latexcv.rb +13 -8
  12. data/data/latex_curriculum_vitae/Cover/Cover.tex +12 -4
  13. data/data/latex_curriculum_vitae/Motivational_Letter/bwanschreiben.tex +23 -6
  14. data/data/latex_curriculum_vitae/Pictures/codealike.png +0 -0
  15. data/data/latex_curriculum_vitae/Pictures/codestats.png +0 -0
  16. data/data/latex_curriculum_vitae/Pictures/openhub.png +0 -0
  17. data/data/latex_curriculum_vitae/Pictures/signatur1.png +0 -0
  18. data/data/latex_curriculum_vitae/Pictures/wakatime.jpg +0 -0
  19. data/data/latex_curriculum_vitae/Resume/cv_10.tex +28 -10
  20. data/etc/latex_curriculum_vitae.cfg +2 -1
  21. data/etc/personal_data.tex +2 -1
  22. data/lib/latex_curriculum_vitae.rb +60 -51
  23. data/lib/latex_curriculum_vitae/cover.rb +17 -9
  24. data/lib/latex_curriculum_vitae/cv.rb +41 -27
  25. data/lib/latex_curriculum_vitae/email.rb +168 -94
  26. data/lib/latex_curriculum_vitae/entityfile.rb +99 -68
  27. data/lib/latex_curriculum_vitae/get-config.rb +28 -18
  28. data/lib/latex_curriculum_vitae/letter.rb +19 -12
  29. data/lib/latex_curriculum_vitae/notifier.rb +20 -13
  30. data/lib/latex_curriculum_vitae/outfile.rb +30 -19
  31. metadata +89 -56
  32. data/.autotest +0 -25
  33. data/.codeclimate.yml +0 -8
  34. data/.coveralls.yml +0 -2
  35. data/.gemnasium.yml +0 -5
  36. data/.rspec +0 -2
  37. data/.rubocop.yml +0 -38
  38. data/.scrutinizer.yml +0 -21
  39. data/.travis.yml +0 -29
  40. data/CODE_OF_CONDUCT.md +0 -17
  41. data/CONTRIBUTING.md +0 -25
  42. data/config.reek +0 -111
  43. data/data/latex_curriculum_vitae/Appendix/Employers_Reference/wtg.pdf +0 -0
@@ -1,9 +1,17 @@
1
- # encoding: utf-8
2
- # @author Sascha Manns
3
- # @abstract CV Module for creating the curriculum vitae
4
- #
5
1
  # Copyright (C) 2015-2017 Sascha Manns <Sascha.Manns@mailbox.org>
6
- # License: MIT
2
+ #
3
+ # This program is free software: you can redistribute it and/or modify
4
+ # it under the terms of the GNU General Public License as published by
5
+ # the Free Software Foundation, either version 3 of the License, or
6
+ # (at your option) any later version.
7
+ #
8
+ # This program is distributed in the hope that it will be useful,
9
+ # but WITHOUT ANY WARRANTY; without even the implied warranty of
10
+ # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11
+ # GNU General Public License for more details.
12
+ #
13
+ # You should have received a copy of the GNU General Public License
14
+ # along with this program. If not, see <http://www.gnu.org/licenses/>.
7
15
 
8
16
  # Dependencies
9
17
  require 'rainbow/ext/string'
@@ -15,21 +23,23 @@ module LatexCurriculumVitae
15
23
  # Module for creating the CV
16
24
  module CV
17
25
  # Create Curriculum Vitae method
26
+ # TODO: Try to fix this in future
27
+ # rubocop:disable Metrics/AbcSize
18
28
  # @param [String] name_of_pdf Name of the resulting PDF file
19
29
  # @param [String] name_of_resume Name of the resume file
20
- # @param [String] tmpdir contains the path to the
21
- def self.create_cv(name_of_resume, tmpdir)
22
- puts 'First run of xelatex'.colour(:yellow)
30
+ # @param [String] tmp_dir contains the path to the
31
+ def self.create_cv(name_of_resume, tmp_dir)
32
+ puts 'First run of xelatex'.color(:yellow)
23
33
  system("xelatex #{name_of_resume}.tex")
24
- puts 'First run of xelatex passed'.colour(:yellow)
25
- puts 'Running biber'.colour(:yellow)
34
+ puts 'First run of xelatex passed'.color(:yellow)
35
+ puts 'Running biber'.color(:yellow)
26
36
  system("biber #{name_of_resume}.bcf")
27
- puts 'Run of biber passed'.colour(:yellow)
28
- puts 'Second run of xelatex'.colour(:yellow)
37
+ puts 'Run of biber passed'.color(:yellow)
38
+ puts 'Second run of xelatex'.color(:yellow)
29
39
  system("xelatex #{name_of_resume}.tex")
30
- puts 'Second run of xelatex passed'.colour(:yellow)
31
- puts 'All done'.colour(:green)
32
- system("cp #{name_of_resume}.pdf #{tmpdir}/#{name_of_resume}.pdf")
40
+ puts 'Second run of xelatex passed'.color(:yellow)
41
+ puts 'All done'.color(:green)
42
+ system("cp #{name_of_resume}.pdf #{tmp_dir}/#{name_of_resume}.pdf")
33
43
  end
34
44
 
35
45
  # Create the final cv
@@ -38,23 +48,26 @@ module LatexCurriculumVitae
38
48
  # @param [String] name_of_resume Name of the resume file
39
49
  # @param [String] name_of_pdf Name of the finished pdf
40
50
  # @param [String] name_of_cover Name of the Cover file
51
+ # TODO: Try to fix this in future
52
+ # This method smells of :reek:LongParameterList
53
+ # This method smells of :reek:ControlParameter
41
54
  def self.create_final_cv(letter, name_of_letter, name_of_resume, name_of_pdf, name_of_cover)
42
55
  if letter == 'yes'
43
- puts 'Merging the motivational letter with the cv'.colour(:yellow)
56
+ puts 'Merging the motivational letter with the cv'.color(:yellow)
44
57
  pdf = CombinePDF.new
45
- pdf << CombinePDF.load("#{name_of_letter}.pdf") # one way to combine, very fast.
58
+ pdf << CombinePDF.load("#{name_of_letter}.pdf")
46
59
  pdf << CombinePDF.load("#{name_of_cover}.pdf")
47
60
  pdf << CombinePDF.load("#{name_of_resume}.pdf")
48
61
  pdf.save 'result.pdf'
49
- puts 'Merging done'.colour(:green)
62
+ puts 'Merging done'.color(:green)
50
63
  else
51
- puts "Copying #{name_of_resume}.pdf result.pdf".colour(:green)
64
+ puts "Copying #{name_of_resume}.pdf result.pdf".color(:green)
52
65
  pdf = CombinePDF.new
53
66
  pdf << CombinePDF.load("#{name_of_cover}.pdf")
54
67
  pdf << CombinePDF.load("#{name_of_resume}.pdf")
55
68
  pdf.save 'resumenew.pdf'
56
69
  system('cp resumenew.pdf result.pdf')
57
- puts 'Done'.colour(:green)
70
+ puts 'Done'.color(:green)
58
71
  end
59
72
  appendix(name_of_pdf)
60
73
  end
@@ -62,28 +75,29 @@ module LatexCurriculumVitae
62
75
  # Add additional stuff
63
76
  # @param [String] name_of_pdf Name of the finished pdf
64
77
  def self.appendix(name_of_pdf)
65
- puts 'Adding additional stuff'.colour(:yellow)
78
+ puts 'Adding additional stuff'.color(:yellow)
66
79
  pdf = CombinePDF.new
67
80
  pdf << CombinePDF.load('result.pdf')
68
81
  # Put there your own stuff
69
82
  pdf << CombinePDF.load('../Appendix/Employers_Reference/xcom.pdf')
70
83
  pdf << CombinePDF.load('../Appendix/Employers_Reference/hays.pdf')
71
84
  pdf << CombinePDF.load('../Appendix/Certificates/thm-webeng1.pdf')
85
+ pdf << CombinePDF.load('../Appendix/Certificates/kompetenzpass12013.pdf')
72
86
  pdf << CombinePDF.load('../Appendix/Employers_Reference/openslx.pdf')
73
87
  pdf << CombinePDF.load('../Appendix/Employers_Reference/openslx1.pdf')
74
88
  pdf << CombinePDF.load('../Appendix/Certificates/Zertifikat_Sascha_Manns1.pdf')
75
- pdf << CombinePDF.load('../Appendix/Employers_Reference/wtg.pdf')
76
89
  pdf << CombinePDF.load('../Appendix/First_References/ihk.pdf')
77
90
  pdf.save "#{name_of_pdf}.pdf"
78
- puts 'Additional stuff done'.colour(:green)
91
+ puts 'Additional stuff done'.color(:green)
79
92
  end
80
93
 
81
94
  # Copy result to .latex_curriculum_vitae
82
95
  # @param [String] name_of_pdf Name of the resulting PDF file
83
- def self.copy_home(name_of_pdf, datadir)
84
- puts "Copying #{name_of_pdf}.pdf to tmpdir".colour(:yellow)
85
- system("cp #{name_of_pdf}.pdf #{datadir}")
86
- puts 'Copied to tmpdir'.colour(:green)
96
+ # @param [String] data_dir Path to the data dir
97
+ def self.copy_home(name_of_pdf, data_dir)
98
+ puts "Copying #{name_of_pdf}.pdf to tmpdir".color(:yellow)
99
+ system("cp #{name_of_pdf}.pdf #{data_dir}")
100
+ puts 'Copied to tmpdir'.color(:green)
87
101
  end
88
102
  end
89
103
  end
@@ -1,10 +1,17 @@
1
- #!/usr/bin/env ruby
2
- # encoding: utf-8
3
- # @author Sascha Manns
4
- # @abstract module for preparing a email and send it out
5
- #
6
1
  # Copyright (C) 2015-2017 Sascha Manns <Sascha.Manns@mailbox.org>
7
- # License: MIT
2
+ #
3
+ # This program is free software: you can redistribute it and/or modify
4
+ # it under the terms of the GNU General Public License as published by
5
+ # the Free Software Foundation, either version 3 of the License, or
6
+ # (at your option) any later version.
7
+ #
8
+ # This program is distributed in the hope that it will be useful,
9
+ # but WITHOUT ANY WARRANTY; without even the implied warranty of
10
+ # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11
+ # GNU General Public License for more details.
12
+ #
13
+ # You should have received a copy of the GNU General Public License
14
+ # along with this program. If not, see <http://www.gnu.org/licenses/>.
8
15
 
9
16
  # Dependencies
10
17
  require 'rainbow/ext/string'
@@ -12,101 +19,172 @@ require 'pony'
12
19
  require 'resolv-replace.rb'
13
20
  require File.expand_path(File.join(File.dirname(__FILE__), 'get-config'))
14
21
 
15
- # rubocop:disable Metrics/LineLength
16
22
  # Module for creating the CV
17
23
  module LatexCurriculumVitae
24
+ # Module for creating the Email
18
25
  module Email
19
26
  # Method for creating the email
20
- # rubocop:disable Metrics/MethodLength
21
27
  # @param [String] contact Name of the contact
22
- # @param [String] emailaddress Email address of the contact
23
- # @param [String] jobtitle Title of the target job
28
+ # @param [String] email_address Email address of the contact
29
+ # @param [String] job_title Title of the target job
24
30
  # @param [String] contact_sex Can be male, female or unknown
25
31
  # @param [String] proactive Can be yes or no
26
32
  # @param [String] letter For preparing the letter
27
33
  # @param [String] name_of_pdf Name of the output pdf
28
- def self.create_email(contact, emailaddress, jobtitle, contact_sex, proactive, letter, name_of_pdf, sysconfdir, datadir)
29
- own_email_address, own_smtp, own_username, own_password, own_port, own_tls = LatexCurriculumVitae::GetConfig.get_smtp(sysconfdir)
30
- introduction = LatexCurriculumVitae::Email.introduction(contact, contact_sex)
31
- subject = LatexCurriculumVitae::Email.subject(proactive, jobtitle)
32
- body = LatexCurriculumVitae::Email.get_body(introduction, letter)
33
- filename = "#{datadir}/#{name_of_pdf}.pdf"
34
-
35
- # More information about Pony Mailer: https://github.com/benprew/pony
36
- Pony.mail({
37
- :to => emailaddress,
38
- :bcc => own_email_address,
39
- :from => own_email_address,
40
- :subject => subject,
41
- :body => body,
42
- :attachments => {'Bewerbungsunterlagen_Manns.pdf' => File.read(filename)},
43
- :via => :smtp,
44
- :via_options => {
45
- :address => own_smtp,
46
- :port => own_port,
47
- :enable_starttls_auto => true,
48
- :user_name => own_username,
49
- :password => own_password,
50
- :authentication => :plain, # :plain, :login, :cram_md5, no auth by default
51
- :domain => 'localhost.localdomain', # the HELO domain provided by the client to the server
52
- }
53
- })
34
+ # TODO: Try to fix this in future
35
+ # rubocop:disable Metrics/MethodLength
36
+ # rubocop:disable Metrics/ParameterLists
37
+ # This method smells of :reek:LongParameterList
38
+ # This method smells of :reek:ControlParameter
39
+ def self.create_email(contact, email_address, job_title, contact_sex, proactive, letter, name_of_pdf, sysconf_dir,
40
+ data_dir, mail_backend, target)
41
+ own_email_address, own_smtp, own_username, own_password,
42
+ own_port = LatexCurriculumVitae::GetConfig.get_smtp(sysconf_dir)
43
+ introduction = introduction(contact, contact_sex)
44
+ subject = subject(proactive, job_title)
45
+ body = get_body(introduction, letter, proactive, job_title, target)
46
+ filename = "#{data_dir}/#{name_of_pdf}.pdf"
47
+
48
+ if mail_backend == 'Pony'
49
+ # More information about Pony Mailer: https://github.com/benprew/pony
50
+ Pony.mail(to: email_address,
51
+ bcc: own_email_address,
52
+ from: own_email_address,
53
+ subject: subject,
54
+ body: body,
55
+ attachments: { 'Bewerbungsunterlagen_Manns.pdf' => File.read(filename) },
56
+ via: :smtp,
57
+ via_options: {
58
+ address: own_smtp,
59
+ port: own_port,
60
+ enable_starttls_auto: true,
61
+ user_name: own_username,
62
+ password: own_password,
63
+ authentication: :plain, # :plain, :login, :cram_md5, no auth by default
64
+ domain: 'localhost.localdomain', # the HELO domain provided by the client to the server
65
+ })
66
+ else
67
+ `evolution mailto:"#{email_address}?subject=#{subject}\&body=#{body}\&attach=#{filename}"`
68
+ end
54
69
  end
55
70
 
56
71
  # Method for building the introduction
57
72
  # @param [String] contact Name of the contact
58
73
  # @param [String] contact_sex Can be male, female or unknown
59
- # @return [String] Returns introductiion
74
+ # @return [String] Returns introduction
75
+ # TODO: Try to fix this in future
76
+ # rubocop:disable Style/IfInsideElse
77
+ # This method smells of :reek:ControlParameter
60
78
  def self.introduction(contact, contact_sex)
61
- if contact == ''
62
- introduction = 'Sehr geehrte Damen und Herren,'
63
- else
64
- if contact_sex == 'male'
65
- introduction = "Sehr geehrter Herr #{contact},"
66
- else
67
- introduction = "Sehr geehrte Frau #{contact},"
68
- end
69
- end
79
+ introduction = if contact == ''
80
+ 'Sehr geehrte Damen und Herren,'
81
+ else
82
+ if contact_sex == 'male'
83
+ "Sehr geehrter Herr #{contact},"
84
+ else
85
+ "Sehr geehrte Frau #{contact},"
86
+ end
87
+ end
70
88
  return introduction
71
89
  end
72
90
 
73
91
  # Method for building the subject
74
92
  # @param [String] proactive Can be yes or no
75
- # @param [String] jobtitle Title of the target job
76
- # @return [String] subject Set the subject
77
- def self.subject(proactive, jobtitle)
78
- if proactive == 'yes'
79
- subject = "Initiativbewerbung um einen Arbeitsplatz als #{jobtitle}"
93
+ # @param [String] job_title Title of the target job
94
+ # @return [Array] subject, intro
95
+ # TODO: Try to fix this in future
96
+ # This method smells of :reek:ControlParameter
97
+ def self.subject(proactive, job_title)
98
+ subject = if proactive == 'yes'
99
+ "Initiativbewerbung um einen Arbeitsplatz als #{job_title}"
100
+ else
101
+ "Bewerbung um einen Arbeitsplatz als #{job_title}"
102
+ end
103
+ return subject
104
+ end
105
+
106
+ # Method for getting the email intro
107
+ # TODO: Try to fix this in future
108
+ # rubocop:disable Metrics/LineLength
109
+ # This method smells of :reek:ControlParameter
110
+ # @param [String] proactive Is this a proactive application yes/no
111
+ # @param [String] job_title The job title
112
+ # @return intro
113
+ def self.get_intro(proactive, job_title)
114
+ intro = if proactive == 'yes'
115
+ "gerne möchte ich mich bei Ihnen um die Stelle als #{job_title} oder einer ähnlichen Position bewerben."
116
+ else
117
+ "mit großem Interesse bin ich auf die ausgeschriebene Position aufmerksam geworden. Aus diesem Grund bewerbe ich mich bei Ihnen als #{job_title}."
118
+ end
119
+ return intro
120
+ end
121
+
122
+ # Method for getting the target code block
123
+ # @param [String] target The chosen target
124
+ # @returns [String] target_block Returns a Block with the chosen Information
125
+ # TODO: Try to fix this in future
126
+ # This method smells of :reek:ControlParameter
127
+ def self.get_target_block(target)
128
+ if target == 'doku'
129
+ target_block = 'Neben der Beschreibungssprache DocBook samt XSL-FO lernte ich die Satzsprache LaTeX.
130
+ Selbstständig erarbeitete ich mir Kenntnisse in den Programmiersprachen Ruby, Python, sowie der Web-App-Entwicklung
131
+ (TH Mittelrhein).'
132
+ elsif target == 'support'
133
+ target_block = 'Im IT-Support hatte ich bereits erste Führungserfahrung als Dispatcher und Controller.
134
+ Selbstständig erarbeitete ich mir Kenntnisse in den Programmiersprachen Bash, Ruby und Python, sowie der
135
+ Web-App-Entwicklung (TH Mittelrhein).'
80
136
  else
81
- subject = "Bewerbung um einen Arbeitsplatz als #{jobtitle}"
137
+ target_block = 'Im kaufmännischen Bereich habe ich bereits vielfältige Erfahrungen im Einkauf, Verkauf,
138
+ Öffentlichkeitsarbeit und Vertrieb gemacht und bin stets bereit neues zu lernen.'
82
139
  end
83
- return subject
140
+ return target_block
84
141
  end
85
142
 
86
143
  # Method for building the email body
87
144
  # @param [String] introduction EMail introduction
88
145
  # @param [String] letter With motivational letter? Can be yes or no
146
+ # @param [String] proactive Is this a proactive application yes/no
147
+ # @param [String] job_title The job title
89
148
  # @return [String] body Returns the messagebody for the email
90
- def self.get_body(introduction, letter)
91
- # rubocop:disable Style/MultilineOperationIndentation
92
- if letter == 'no'
93
- body =<<EOF
149
+ # TODO: Try to fix this in future
150
+ # rubocop:disable Layout/IndentHeredoc
151
+ # This method smells of :reek:ControlParameter
152
+ def self.get_body(introduction, letter, proactive, job_title, target)
153
+ intro = get_intro(proactive, job_title)
154
+ target_block = get_target_block(target)
155
+ body = if letter == 'no'
156
+ <<BODY
94
157
  #{introduction}
95
- Wie ich Ihrer Anzeige entnommen habe, suchen Sie jemanden für die obige Position, um
96
- die ich mich bewerbe. Mit meinen vielfältigen Erfahrungen als Kaufmann, Community Ma-
97
- nager, Buchautor und Customer Supporter (Level 1&2), sowie Autor Geschäftsprozess- &
98
- Anwendungsdokumentation könnte ich Ihr neuer Mitarbeiter sein.
99
- Seit dieser Zeit habe ich an teamgesteuerten Projekten für Kunden mitgearbeitet, wo-
100
- bei mein Schwerpunkt im Bereich Kundenpflege via Telefon und Email, Dispatching und
101
- Teamcontrolling lag.
158
+
159
+ #{intro}
160
+
161
+ Mit meinen vielfältigen Erfahrungen als Kaufmann, Community-
162
+ Manager, Buchautor und Customer Supporter (Level 1 und 2),
163
+ sowie Autor Geschäftsprozess- und Anwendungsdokumentation
164
+ könnte ich Ihr neuer Mitarbeiter sein.
165
+
166
+ Zuletzt war ich für die XCOM AG im Bereich der Dokumentation
167
+ tätig.
168
+
169
+ Seit dieser Zeit habe ich an teamgesteuerten Projekten für Kunden
170
+ mitgearbeitet, wobei mein Schwerpunkt im Bereich Kundenpflege via
171
+ Telefon und Email, Dispatching und Teamcontrolling lag.
172
+
173
+ #{target_block}
174
+
102
175
  In für mich fremde Arbeitsgebiete werde ich mich rasch einarbeiten.
103
- Meine Kenntnisse in IT und Organisationsfähigkeiten kann ich für Ihr Unternehmen im
104
- Bereich des Managements gewinnbringend umsetzen.
105
- Persönlich runde ich das Profil mit den Eigenschaften: Teamfähigkeit, Kommunikations-
106
- stärke und Leistungsbereitschaft ab.
107
- Ich bin mir sicher, die von Ihnen gewünschten Kenntnisse und Fähigkeiten mitzubringen,
108
- und würde mich sehr über ein Vorstellungsgespräch freuen.
176
+ Meine Kenntnisse in IT und Organisationsfähigkeiten kann ich für Ihr
177
+ Unternehmen im Bereich des Managements gewinnbringend umsetzen.
178
+ Persönlich runde ich das Profil mit den Eigenschaften: Teamfähigkeit,
179
+ Kommunikationsstärke und Leistungsbereitschaft ab.
180
+
181
+ Ich bin mir sicher, die von Ihnen gewünschten Kenntnisse und
182
+ Fähigkeiten mitzubringen, und würde mich sehr über ein
183
+ Vorstellungsgespräch freuen.
184
+
109
185
  --
186
+
187
+
110
188
  Sincerly yours
111
189
 
112
190
  Sascha Manns
@@ -115,18 +193,15 @@ Maifeldstraße 10
115
193
  Phone: +49-1573-9242730 (mobile)
116
194
  Phone: +49-2651-4014045 (home)
117
195
  Email: Sascha.Manns@mailbox.org
118
- Jabber: saigkill@jabber.org
119
- Web: http://saigkill.github.io
120
- Linkedin/Twitter: saigkill
121
- Facebook: sascha.manns / Xing: Sascha_Manns2
122
- GPG: 645A18FC6B573A7BE6E95150752763E8BFA83A2C @ hkp://keys.gnupg.net
123
- S/MIME: C57921ED8F7535B08DC6D14BF11CD19BF9E8ED5C @ cacert.org
124
- EOF
125
- else
126
- body =<<EOF
196
+ Web: http://saigkill.tuxfamily.org
197
+ BODY
198
+ else
199
+ <<BODY
127
200
  #{introduction}
201
+
128
202
  gerne möchte ich mich bei Ihnen für die obige Stelle bewerben.
129
- Meine Bewerbungsunterlagen samt des offiziellen Anschreibens sind der Mail als Anhang beigefügt.
203
+ Meine digitale Bewerbungsmappe, samt des offiziellen Anschreibens,
204
+ sind der Mail als Anhang beigefügt.
130
205
  --
131
206
  Sincerly yours
132
207
 
@@ -136,33 +211,32 @@ Maifeldstraße 10
136
211
  Phone: +49-1573-9242730 (mobile)
137
212
  Phone: +49-2651-4014045 (home)
138
213
  Email: Sascha.Manns@mailbox.org
139
- Jabber: saigkill@jabber.org
140
- Web: http://saigkill.github.io
141
- Linkedin/Twitter: saigkill
142
- Facebook: sascha.manns / Xing: Sascha_Manns2
143
- GPG: 645A18FC6B573A7BE6E95150752763E8BFA83A2C @ hkp://keys.gnupg.net
144
- S/MIME: C57921ED8F7535B08DC6D14BF11CD19BF9E8ED5C @ cacert.org
145
- EOF
146
- end
214
+ Web: http://saigkill.tuxfamily.org
215
+ BODY
216
+ end
147
217
  return body
148
218
  end
149
219
 
150
220
  # Method for checking the result
151
221
  # @param [String] contact Name of the contact
152
- # @param [String] emailaddress Email address from the contact
153
- # @param [String] jobtitle The given jobtitle
222
+ # @param [String] email_address Email address from the contact
223
+ # @param [String] job_title The given jobtitle
154
224
  # @param [String] contact_sex Can be male, female or unknown
155
225
  # @param [String] proactive Can be yes or no
156
226
  # @param [String] letter With motivational letter? Can be yes or no
157
227
  # @param [String] name_of_pdf Name of the resulting PDF file
158
- def self.resultok(contact, emailaddress, jobtitle, contact_sex, proactive, letter, name_of_pdf, sysconfdir, datadir)
159
- resultfileok = `yad --title="Resulting file" --center --on-top --form \
228
+ # TODO: Try to fix this in future
229
+ # This method smells of :reek:LongParameterList
230
+ def self.result_ok(contact, email_address, job_title, contact_sex, proactive, letter, name_of_pdf, sysconf_dir,
231
+ data_dir, mail_backend, target)
232
+ resultfile_ok = `yad --title="Resulting file" --center --on-top --form \
160
233
  --item-separator=, --separator="|" \
161
234
  --field="Resulting file ok?:CBE" \
162
235
  "yes,no"`
163
- ok = resultfileok.chomp.split('|')
236
+ ok = resultfile_ok.chomp.split('|')
164
237
  if ok.include? 'yes'
165
- LatexCurriculumVitae::Email.create_email(contact, emailaddress, jobtitle, contact_sex, proactive, letter, name_of_pdf, sysconfdir, datadir)
238
+ LatexCurriculumVitae::Email.create_email(contact, email_address, job_title, contact_sex, proactive, letter,
239
+ name_of_pdf, sysconf_dir, data_dir, mail_backend, target)
166
240
  else
167
241
  abort('Aborted')
168
242
  end