rsmart_toolbox 0.9 → 0.10
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- checksums.yaml.gz.sig +0 -0
- data.tar.gz.sig +0 -0
- data/bin/transform_CSV_to_HR_XML +71 -47
- data/lib/rsmart_toolbox/version.rb +1 -1
- metadata +1 -1
- metadata.gz.sig +0 -0
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 13ec30f97bddd32bc604c1395a371e5a8dd9c4bc
|
4
|
+
data.tar.gz: bab3bab4ef63ebf15a26c2bd4a5d98966313c529
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f6cb52bfe81dcb9663609702eace294df5cef7b073214734398444fc2d3eb91b767b9477a712eed1f75f7cc67b8afdcc3f10770e34c2d5e6355479277bd30bd1
|
7
|
+
data.tar.gz: da9dd51a65a9df329aca5c97efd9636c4713a2a9a218bdf2b2cdac3b0900e2c7d6355a5119ad851886c94af353fd590ed14ad4aab4d18b7f90b6e85f294c09a1
|
checksums.yaml.gz.sig
CHANGED
Binary file
|
data.tar.gz.sig
CHANGED
Binary file
|
data/bin/transform_CSV_to_HR_XML
CHANGED
@@ -106,7 +106,7 @@ CSV.open(opt[:csv_filename], opt[:csv_options]) do |csv|
|
|
106
106
|
record.affiliations do |affiliations|
|
107
107
|
aff = {}
|
108
108
|
afltn_typ_cd = ETL.parse_string row[:afltn_typ_cd], name: 'AFLTN_TYP_CD', length: 40, required: true
|
109
|
-
campus = ETL.parse_string row[:campus_cd], length: 2
|
109
|
+
campus = ETL.parse_string row[:campus_cd], name: 'CAMPUS_CD', length: 2
|
110
110
|
aff[:affiliationType] = afltn_typ_cd unless afltn_typ_cd.empty?
|
111
111
|
aff[:campus] = campus unless campus.empty?
|
112
112
|
aff[:default] = true
|
@@ -116,9 +116,9 @@ CSV.open(opt[:csv_filename], opt[:csv_options]) do |csv|
|
|
116
116
|
emp = {}
|
117
117
|
emp_stat_cd = GRM.parse_emp_stat_cd row[:emp_stat_cd]
|
118
118
|
emp_typ_cd = GRM.parse_emp_typ_cd row[:emp_typ_cd]
|
119
|
-
base_slry_amt = ETL.parse_float row[:base_slry_amt], length: 15
|
120
|
-
prmry_dept_cd = ETL.parse_string row[:prmry_dept_cd], length: 40
|
121
|
-
emp_id = ETL.parse_string row[:emp_id], length: 40
|
119
|
+
base_slry_amt = ETL.parse_float row[:base_slry_amt], length: 15, name: 'BASE_SLRY_AMT'
|
120
|
+
prmry_dept_cd = ETL.parse_string row[:prmry_dept_cd], length: 40, name: 'PRMRY_DEPT_CD'
|
121
|
+
emp_id = ETL.parse_string row[:emp_id], length: 40, name: 'EMP_ID'
|
122
122
|
emp[:employeeStatus] = emp_stat_cd unless emp_stat_cd.empty?
|
123
123
|
emp[:employeeType] = emp_typ_cd unless emp_typ_cd.empty?
|
124
124
|
emp[:baseSalaryAmount] = base_slry_amt unless base_slry_amt.nil?
|
@@ -129,15 +129,39 @@ CSV.open(opt[:csv_filename], opt[:csv_options]) do |csv|
|
|
129
129
|
affiliation.employment emp
|
130
130
|
end
|
131
131
|
end # affiliations
|
132
|
+
|
133
|
+
address = {}
|
134
|
+
addr_typ_cd = GRM.parse_address_type_code( row[:addr_typ_cd] )
|
135
|
+
addr_line_1 = ETL.parse_string( row[:addr_line_1], name: 'ADDR_LINE_1', length: 45 )
|
136
|
+
addr_line_2 = ETL.parse_string( row[:addr_line_2], name: 'ADDR_LINE_2', length: 45 )
|
137
|
+
addr_line_3 = ETL.parse_string( row[:addr_line_3], name: 'ADDR_LINE_3', length: 45 )
|
138
|
+
city = ETL.parse_string( row[:city], name: 'CITY', length: 30 )
|
139
|
+
state_pvc_cd = ETL.parse_string( row[:state_pvc_cd], name: 'STATE_PVC_CD', length: 2 )
|
140
|
+
postal_cd = ETL.parse_string( row[:postal_cd], name: 'POSTAL_CD', length: 20 )
|
141
|
+
postal_cntry_cd = ETL.parse_string( row[:postal_cntry_cd], name: 'POSTAL_CNTRY_CD', length: 2 )
|
142
|
+
address[:addressTypeCode] = addr_typ_cd unless addr_typ_cd.empty?
|
143
|
+
address[:addressLine1] = addr_line_1 unless addr_line_1.empty?
|
144
|
+
address[:addressLine2] = addr_line_2 unless addr_line_2.empty?
|
145
|
+
address[:addressLine3] = addr_line_3 unless addr_line_3.empty?
|
146
|
+
address[:city] = city unless city.empty?
|
147
|
+
address[:stateOrProvince] = state_pvc_cd unless state_pvc_cd.empty?
|
148
|
+
address[:postalCode] = postal_cd unless postal_cd.empty?
|
149
|
+
address[:country] = postal_cntry_cd unless postal_cntry_cd.empty?
|
150
|
+
unless address.empty?
|
151
|
+
record.addresses do |addresses|
|
152
|
+
addresses.address address
|
153
|
+
end # addresses
|
154
|
+
end
|
155
|
+
|
132
156
|
record.names do |names|
|
133
157
|
nm = {}
|
134
158
|
nm_typ_cd = GRM.parse_name_code row[:nm_typ_cd]
|
135
159
|
prefix_nm = GRM.parse_prefix row[:prefix_nm]
|
136
|
-
first_nm = ETL.parse_string row[:first_nm], length: 40
|
137
|
-
middle_nm = ETL.parse_string row[:middle_nm], length: 40
|
138
|
-
last_nm = ETL.parse_string row[:last_nm], length: 80
|
160
|
+
first_nm = ETL.parse_string row[:first_nm], length: 40, name: 'FIRST_NM'
|
161
|
+
middle_nm = ETL.parse_string row[:middle_nm], length: 40, name: 'MIDDLE_NM'
|
162
|
+
last_nm = ETL.parse_string row[:last_nm], length: 80, name: 'LAST_NM'
|
139
163
|
suffix_nm = GRM.parse_suffix row[:suffix_nm]
|
140
|
-
title_nm = ETL.parse_string row[:title_nm], length: 20
|
164
|
+
title_nm = ETL.parse_string row[:title_nm], length: 20, name: 'TITLE_NM'
|
141
165
|
nm[:nameCode] = nm_typ_cd unless nm_typ_cd.empty?
|
142
166
|
nm[:prefix] = prefix_nm unless prefix_nm.empty?
|
143
167
|
nm[:firstName] = first_nm unless first_nm.empty?
|
@@ -154,12 +178,12 @@ CSV.open(opt[:csv_filename], opt[:csv_options]) do |csv|
|
|
154
178
|
ph = {}
|
155
179
|
phone_typ_cd = GRM.parse_phone_type row[:phone_typ_cd]
|
156
180
|
phone_nbr = GRM.parse_phone_number row[:phone_nbr]
|
157
|
-
phone_extn_nbr = ETL.parse_string row[:phone_extn_nbr], length: 8
|
158
|
-
|
181
|
+
phone_extn_nbr = ETL.parse_string row[:phone_extn_nbr], length: 8, name: 'PHONE_EXTN_NBR'
|
182
|
+
phone_cntry_cd = ETL.parse_string row[:phone_cntry_cd], length: 2, name: 'PHONE_CNTRY_CD'
|
159
183
|
ph[:phoneType] = phone_typ_cd unless phone_typ_cd.empty?
|
160
184
|
ph[:phoneNumber] = phone_nbr unless phone_nbr.empty?
|
161
185
|
ph[:extension] = phone_extn_nbr unless phone_extn_nbr.empty?
|
162
|
-
ph[:country] =
|
186
|
+
ph[:country] = phone_cntry_cd unless phone_cntry_cd.empty?
|
163
187
|
ph[:default] = true
|
164
188
|
ph[:active] = true
|
165
189
|
|
@@ -184,35 +208,35 @@ CSV.open(opt[:csv_filename], opt[:csv_options]) do |csv|
|
|
184
208
|
end
|
185
209
|
|
186
210
|
ea = {}
|
187
|
-
visa_type = ETL.parse_string( row[:visa_type], length: 30 )
|
188
|
-
county = ETL.parse_string( row[:county], length: 30 )
|
189
|
-
age_by_fiscal_year = ETL.parse_integer( row[:age_by_fiscal_year], length: 3 )
|
190
|
-
race = ETL.parse_string( row[:race], length: 30 )
|
191
|
-
education_level = ETL.parse_string( row[:education_level], length: 30 )
|
192
|
-
degree = GRM.parse_degree( row[:degree] )
|
193
|
-
major = ETL.parse_string( row[:major], length: 30 )
|
194
|
-
is_handicapped = ETL.parse_boolean row[:is_handicapped]
|
195
|
-
handicap_type = ETL.parse_string(
|
196
|
-
is_veteran = ETL.parse_boolean( row[:is_veteran] )
|
197
|
-
veteran_type = ETL.parse_string(
|
198
|
-
has_visa = ETL.parse_boolean( row[:has_visa] )
|
199
|
-
visa_code = ETL.parse_string(
|
200
|
-
visa_renewal_date = ETL.parse_string( row[:visa_renewal_date], length: 19 )
|
201
|
-
office_location = ETL.parse_string( row[:office_location], length: 30 )
|
202
|
-
secondry_office_location = ETL.parse_string( row[:secondry_office_location], length: 30 )
|
203
|
-
school = ETL.parse_string( row[:school], length: 50 )
|
204
|
-
year_graduated = GRM.parse_year(
|
205
|
-
directory_department = ETL.parse_string(
|
206
|
-
directory_title = ETL.parse_string( row[:directory_title], length: 50 )
|
207
|
-
primary_title = ETL.parse_string( row[:primary_title], length: 51 )
|
208
|
-
vacation_accural = ETL.parse_boolean( row[:vacation_accural] )
|
209
|
-
is_on_sabbatical = ETL.parse_boolean( row[:is_on_sabbatical] )
|
210
|
-
id_provided = ETL.parse_string( row[:id_provided], length: 30 )
|
211
|
-
id_verified = ETL.parse_string( row[:id_verified], length: 30 )
|
211
|
+
visa_type = ETL.parse_string( row[:visa_type], length: 30, name: 'VISA_TYPE' )
|
212
|
+
county = ETL.parse_string( row[:county], length: 30, name: 'COUNTY' )
|
213
|
+
age_by_fiscal_year = ETL.parse_integer( row[:age_by_fiscal_year], length: 3, name: 'AGE_BY_FISCAL_YEAR' )
|
214
|
+
race = ETL.parse_string( row[:race], length: 30, name: 'RACE' )
|
215
|
+
education_level = ETL.parse_string( row[:education_level], length: 30, name: 'EDUCATION_LEVEL' )
|
216
|
+
degree = GRM.parse_degree( row[:degree], name: 'DEGREE' )
|
217
|
+
major = ETL.parse_string( row[:major], length: 30, name: 'MAJOR' )
|
218
|
+
is_handicapped = ETL.parse_boolean( row[:is_handicapped], name: 'IS_HANDICAPPED' )
|
219
|
+
handicap_type = ETL.parse_string( row[:handicap_type], length: 30, name: 'HANDICAP_TYPE' )
|
220
|
+
is_veteran = ETL.parse_boolean( row[:is_veteran], name: 'IS_VETERAN' )
|
221
|
+
veteran_type = ETL.parse_string( row[:veteran_type], length: 30, name: 'VETERAN_TYPE' )
|
222
|
+
has_visa = ETL.parse_boolean( row[:has_visa], name: 'HAS_VISA' )
|
223
|
+
visa_code = ETL.parse_string( row[:visa_code], length: 20, name: 'VISA_CODE' )
|
224
|
+
visa_renewal_date = ETL.parse_string( row[:visa_renewal_date], length: 19, name: 'VISA_RENEWAL_DATE' )
|
225
|
+
office_location = ETL.parse_string( row[:office_location], length: 30, name: 'OFFICE_LOCATION' )
|
226
|
+
secondry_office_location = ETL.parse_string( row[:secondry_office_location], length: 30, name: 'SECONDRY_OFFICE_LOCATION' )
|
227
|
+
school = ETL.parse_string( row[:school], length: 50, name: 'SCHOOL' )
|
228
|
+
year_graduated = GRM.parse_year( row[:year_graduated], name: 'YEAR_GRADUATED' )
|
229
|
+
directory_department = ETL.parse_string( row[:directory_department], length: 30, name: 'DIRECTORY_DEPARTMENT' )
|
230
|
+
directory_title = ETL.parse_string( row[:directory_title], length: 50, name: 'DIRECTORY_TITLE' )
|
231
|
+
primary_title = ETL.parse_string( row[:primary_title], length: 51, name: 'PRIMARY_TITLE' )
|
232
|
+
vacation_accural = ETL.parse_boolean( row[:vacation_accural], name: 'VACATION_ACCURAL' )
|
233
|
+
is_on_sabbatical = ETL.parse_boolean( row[:is_on_sabbatical], name: 'IS_ON_SABBATICAL' )
|
234
|
+
id_provided = ETL.parse_string( row[:id_provided], length: 30, name: 'ID_PROVIDED' )
|
235
|
+
id_verified = ETL.parse_string( row[:id_verified], length: 30, name: 'ID_VERIFIED' )
|
212
236
|
citizenship_type_code = GRM.parse_citizenship_type( row[:citizenship_type_code] )
|
213
|
-
multi_campus_principal_id = ETL.parse_string( row[:multi_campus_principal_id], length: 40 )
|
214
|
-
multi_campus_principal_name = ETL.parse_string( row[:multi_campus_principal_name], length: 100 )
|
215
|
-
salary_anniversary_date = ETL.parse_string( row[:salary_anniversary_date], length: 10 )
|
237
|
+
multi_campus_principal_id = ETL.parse_string( row[:multi_campus_principal_id], length: 40, name: 'MULTI_CAMPUS_PRINCIPAL_ID' )
|
238
|
+
multi_campus_principal_name = ETL.parse_string( row[:multi_campus_principal_name], length: 100, name: 'MULTI_CAMPUS_PRINCIPAL_NAME' )
|
239
|
+
salary_anniversary_date = ETL.parse_string( row[:salary_anniversary_date], length: 10, name: 'SALARY_ANNIVERSARY_DATE' )
|
216
240
|
ea[:visaType] = visa_type unless visa_type.empty?
|
217
241
|
ea[:county] = county unless county.empty?
|
218
242
|
ea[:ageByFiscalYear] = age_by_fiscal_year unless age_by_fiscal_year.nil?
|
@@ -246,14 +270,14 @@ CSV.open(opt[:csv_filename], opt[:csv_options]) do |csv|
|
|
246
270
|
record.kcExtendedAttributes ea
|
247
271
|
|
248
272
|
ap = {}
|
249
|
-
unit_number = ETL.parse_string( row[:unit_number], length: 8 )
|
250
|
-
appointment_type_code = ETL.parse_string( row[:appointment_type_code], length: 3 )
|
251
|
-
job_code = ETL.parse_string( row[:job_code], length: 6 )
|
252
|
-
salary = ETL.parse_float( row[:salary], length: 15 )
|
253
|
-
appointment_start_date = ETL.parse_string( row[:appointment_start_date] )
|
254
|
-
appointment_end_date = ETL.parse_string( row[:appointment_end_date] )
|
255
|
-
job_title = ETL.parse_string( row[:job_title], length: 50 )
|
256
|
-
prefered_job_title = ETL.parse_string( row[:prefered_job_title], length: 51 )
|
273
|
+
unit_number = ETL.parse_string( row[:unit_number], length: 8, name: 'UNIT_NUMBER' )
|
274
|
+
appointment_type_code = ETL.parse_string( row[:appointment_type_code], length: 3, name: 'APPOINTMENT_TYPE_CODE' )
|
275
|
+
job_code = ETL.parse_string( row[:job_code], length: 6, name: 'JOB_CODE' )
|
276
|
+
salary = ETL.parse_float( row[:salary], length: 15, name: 'SALARY' )
|
277
|
+
appointment_start_date = ETL.parse_string( row[:appointment_start_date], name: 'APPOINTMENT_START_DATE' )
|
278
|
+
appointment_end_date = ETL.parse_string( row[:appointment_end_date], name: 'APPOINTMENT_END_DATE' )
|
279
|
+
job_title = ETL.parse_string( row[:job_title], length: 50, name: 'JOB_TITLE' )
|
280
|
+
prefered_job_title = ETL.parse_string( row[:prefered_job_title], length: 51, name: 'PREFERED_JOB_TITLE' )
|
257
281
|
ap[:unitNumber] = unit_number unless unit_number.empty?
|
258
282
|
ap[:appointmentType] = appointment_type_code unless appointment_type_code.empty?
|
259
283
|
ap[:jobCode] = job_code unless job_code.empty?
|
metadata
CHANGED
metadata.gz.sig
CHANGED
Binary file
|