openagent 0.7.8 → 0.8.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/lib/openagent/version.rb +1 -1
 - data/lib/sif/models/common/schedule_info.rb +4 -0
 - data/lib/sif/models/groups/sis/attendance_code_info.rb +7 -7
 - data/lib/sif/models/groups/sis/calendar_date.rb +5 -5
 - data/lib/sif/models/groups/sis/discipline_incident.rb +6 -6
 - data/lib/sif/models/groups/sis/lea_info.rb +12 -12
 - data/lib/sif/models/groups/sis/personal_representer.rb +22 -9
 - data/lib/sif/models/groups/sis/section_info.rb +12 -0
 - data/spec/sif/representations/xml/message_spec.rb +1 -0
 - metadata +2 -2
 
    
        data/lib/openagent/version.rb
    CHANGED
    
    
| 
         @@ -5,14 +5,14 @@ module SIF 
     | 
|
| 
       5 
5 
     | 
    
         
             
                    class AttendanceCodeInfo
         
     | 
| 
       6 
6 
     | 
    
         
             
                      include Virtus.model
         
     | 
| 
       7 
7 
     | 
    
         | 
| 
       8 
     | 
    
         
            -
                      attribute :ref_id, 
     | 
| 
      
 8 
     | 
    
         
            +
                      attribute :ref_id,             String
         
     | 
| 
       9 
9 
     | 
    
         
             
                      attribute :school_info_ref_id, String
         
     | 
| 
       10 
     | 
    
         
            -
                      attribute :attendance_code, 
     | 
| 
       11 
     | 
    
         
            -
                      attribute :attendance_type, 
     | 
| 
       12 
     | 
    
         
            -
                      attribute :attendance_status, 
     | 
| 
       13 
     | 
    
         
            -
                      attribute :description, 
     | 
| 
       14 
     | 
    
         
            -
                      attribute :absence_value, 
     | 
| 
       15 
     | 
    
         
            -
                      attribute :used_for_daily_attendance, 
     | 
| 
      
 10 
     | 
    
         
            +
                      attribute :attendance_code,    String
         
     | 
| 
      
 11 
     | 
    
         
            +
                      attribute :attendance_type,    String
         
     | 
| 
      
 12 
     | 
    
         
            +
                      attribute :attendance_status,  String
         
     | 
| 
      
 13 
     | 
    
         
            +
                      attribute :description,        String
         
     | 
| 
      
 14 
     | 
    
         
            +
                      attribute :absence_value,      Float
         
     | 
| 
      
 15 
     | 
    
         
            +
                      attribute :used_for_daily_attendance,  Boolean
         
     | 
| 
       16 
16 
     | 
    
         
             
                      attribute :used_for_period_attendance, Boolean
         
     | 
| 
       17 
17 
     | 
    
         
             
                      attribute :metadata
         
     | 
| 
       18 
18 
     | 
    
         
             
                      attribute :extended_elements
         
     | 
| 
         @@ -7,12 +7,12 @@ module SIF 
     | 
|
| 
       7 
7 
     | 
    
         
             
                    class CalendarDate
         
     | 
| 
       8 
8 
     | 
    
         
             
                      include Virtus.model
         
     | 
| 
       9 
9 
     | 
    
         | 
| 
       10 
     | 
    
         
            -
                      attribute :date, 
     | 
| 
      
 10 
     | 
    
         
            +
                      attribute :date,                    Date
         
     | 
| 
       11 
11 
     | 
    
         
             
                      attribute :calendar_summary_ref_id, String
         
     | 
| 
       12 
     | 
    
         
            -
                      attribute :school_info_ref_id, 
     | 
| 
       13 
     | 
    
         
            -
                      attribute :school_year, 
     | 
| 
       14 
     | 
    
         
            -
                      attribute :calendar_date_type, 
     | 
| 
       15 
     | 
    
         
            -
                      attribute :calendar_date_number, 
     | 
| 
      
 12 
     | 
    
         
            +
                      attribute :school_info_ref_id,      String
         
     | 
| 
      
 13 
     | 
    
         
            +
                      attribute :school_year,             Integer
         
     | 
| 
      
 14 
     | 
    
         
            +
                      attribute :calendar_date_type,      String
         
     | 
| 
      
 15 
     | 
    
         
            +
                      attribute :calendar_date_number,    Integer
         
     | 
| 
       16 
16 
     | 
    
         
             
                      attribute :student_attendance
         
     | 
| 
       17 
17 
     | 
    
         
             
                      attribute :teacher_attendance
         
     | 
| 
       18 
18 
     | 
    
         
             
                      attribute :administrator_attendance
         
     | 
| 
         @@ -7,15 +7,15 @@ module SIF 
     | 
|
| 
       7 
7 
     | 
    
         
             
                    class DisciplineIncident
         
     | 
| 
       8 
8 
     | 
    
         
             
                      include Virtus.model
         
     | 
| 
       9 
9 
     | 
    
         | 
| 
       10 
     | 
    
         
            -
                      attribute :ref_id, 
     | 
| 
       11 
     | 
    
         
            -
                      attribute :school_year, 
     | 
| 
      
 10 
     | 
    
         
            +
                      attribute :ref_id,            String
         
     | 
| 
      
 11 
     | 
    
         
            +
                      attribute :school_year,       Integer
         
     | 
| 
       12 
12 
     | 
    
         
             
                      attribute :agency_reporting
         
     | 
| 
       13 
     | 
    
         
            -
                      attribute :incident_number, 
     | 
| 
       14 
     | 
    
         
            -
                      attribute :incident_date, 
     | 
| 
       15 
     | 
    
         
            -
                      attribute :incident_time, 
     | 
| 
      
 13 
     | 
    
         
            +
                      attribute :incident_number,   String
         
     | 
| 
      
 14 
     | 
    
         
            +
                      attribute :incident_date,     Date
         
     | 
| 
      
 15 
     | 
    
         
            +
                      attribute :incident_time,     Time
         
     | 
| 
       16 
16 
     | 
    
         
             
                      attribute :incident_location, String
         
     | 
| 
       17 
17 
     | 
    
         
             
                      attribute :incident_location_ref_id, String
         
     | 
| 
       18 
     | 
    
         
            -
                      attribute :incident_cost, 
     | 
| 
      
 18 
     | 
    
         
            +
                      attribute :incident_cost,     String
         
     | 
| 
       19 
19 
     | 
    
         
             
                      attribute :incident_reporter
         
     | 
| 
       20 
20 
     | 
    
         
             
                      attribute :related_tos
         
     | 
| 
       21 
21 
     | 
    
         
             
                      attribute :weapon_types
         
     | 
| 
         @@ -5,19 +5,19 @@ module SIF 
     | 
|
| 
       5 
5 
     | 
    
         
             
                    class LEAInfo
         
     | 
| 
       6 
6 
     | 
    
         
             
                      include Virtus.model
         
     | 
| 
       7 
7 
     | 
    
         | 
| 
       8 
     | 
    
         
            -
                      attribute :ref_id, 
     | 
| 
       9 
     | 
    
         
            -
                      attribute :local_id, 
     | 
| 
       10 
     | 
    
         
            -
                      attribute :state_province_id, 
     | 
| 
       11 
     | 
    
         
            -
                      attribute :nces_id, 
     | 
| 
       12 
     | 
    
         
            -
                      attribute :lea_name, 
     | 
| 
       13 
     | 
    
         
            -
                      attribute :lea_url, 
     | 
| 
       14 
     | 
    
         
            -
                      attribute :education_agency_type, 
     | 
| 
       15 
     | 
    
         
            -
                      attribute :lea_contacts, 
     | 
| 
       16 
     | 
    
         
            -
                      attribute :phone_numbers, 
     | 
| 
       17 
     | 
    
         
            -
                      attribute :addresses, 
     | 
| 
       18 
     | 
    
         
            -
                      attribute :identification_infos, 
     | 
| 
      
 8 
     | 
    
         
            +
                      attribute :ref_id,                 String
         
     | 
| 
      
 9 
     | 
    
         
            +
                      attribute :local_id,               String
         
     | 
| 
      
 10 
     | 
    
         
            +
                      attribute :state_province_id,      String
         
     | 
| 
      
 11 
     | 
    
         
            +
                      attribute :nces_id,                String
         
     | 
| 
      
 12 
     | 
    
         
            +
                      attribute :lea_name,               String
         
     | 
| 
      
 13 
     | 
    
         
            +
                      attribute :lea_url,                String
         
     | 
| 
      
 14 
     | 
    
         
            +
                      attribute :education_agency_type,  Integer
         
     | 
| 
      
 15 
     | 
    
         
            +
                      attribute :lea_contacts,           Array[String]
         
     | 
| 
      
 16 
     | 
    
         
            +
                      attribute :phone_numbers,          Array[Common::PhoneNumber]
         
     | 
| 
      
 17 
     | 
    
         
            +
                      attribute :addresses,              Array[Common::Address]
         
     | 
| 
      
 18 
     | 
    
         
            +
                      attribute :identification_infos,   Array[String]
         
     | 
| 
       19 
19 
     | 
    
         
             
                      attribute :grade_levels
         
     | 
| 
       20 
     | 
    
         
            -
                      attribute :operational_status, 
     | 
| 
      
 20 
     | 
    
         
            +
                      attribute :operational_status,     String
         
     | 
| 
       21 
21 
     | 
    
         
             
                      attribute :congressional_district, String
         
     | 
| 
       22 
22 
     | 
    
         
             
                      attribute :metadata
         
     | 
| 
       23 
23 
     | 
    
         
             
                      attribute :extended_elements
         
     | 
| 
         @@ -5,20 +5,33 @@ module SIF 
     | 
|
| 
       5 
5 
     | 
    
         
             
                    module PersonalRepresenter
         
     | 
| 
       6 
6 
     | 
    
         
             
                      include Virtus.model
         
     | 
| 
       7 
7 
     | 
    
         | 
| 
       8 
     | 
    
         
            -
                      attribute :name, 
     | 
| 
       9 
     | 
    
         
            -
                      attribute :local_id, 
     | 
| 
      
 8 
     | 
    
         
            +
                      attribute :name,              MODEL_COMMON::Name
         
     | 
| 
      
 9 
     | 
    
         
            +
                      attribute :local_id,          String
         
     | 
| 
       10 
10 
     | 
    
         
             
                      attribute :state_province_id, String
         
     | 
| 
       11 
     | 
    
         
            -
                      attribute :electronic_ids, 
     | 
| 
       12 
     | 
    
         
            -
                      attribute :other_ids, 
     | 
| 
       13 
     | 
    
         
            -
                      attribute :other_names, 
     | 
| 
       14 
     | 
    
         
            -
                      attribute :demographics, 
     | 
| 
       15 
     | 
    
         
            -
                      attribute :addresses, 
     | 
| 
       16 
     | 
    
         
            -
                      attribute :phone_numbers, 
     | 
| 
       17 
     | 
    
         
            -
                      attribute :emails, 
     | 
| 
      
 11 
     | 
    
         
            +
                      attribute :electronic_ids,    Array[MODEL_COMMON::ElectronicId]
         
     | 
| 
      
 12 
     | 
    
         
            +
                      attribute :other_ids,         Array[MODEL_COMMON::OtherId]
         
     | 
| 
      
 13 
     | 
    
         
            +
                      attribute :other_names,       String
         
     | 
| 
      
 14 
     | 
    
         
            +
                      attribute :demographics,      MODEL_COMMON::Demographics
         
     | 
| 
      
 15 
     | 
    
         
            +
                      attribute :addresses,         Array[MODEL_COMMON::Address]
         
     | 
| 
      
 16 
     | 
    
         
            +
                      attribute :phone_numbers,     Array[MODEL_COMMON::PhoneNumber]
         
     | 
| 
      
 17 
     | 
    
         
            +
                      attribute :emails,            Array[MODEL_COMMON::Email]
         
     | 
| 
      
 18 
     | 
    
         
            +
             
     | 
| 
      
 19 
     | 
    
         
            +
                      def first_name
         
     | 
| 
      
 20 
     | 
    
         
            +
                        name && name.first_name
         
     | 
| 
      
 21 
     | 
    
         
            +
                      end
         
     | 
| 
      
 22 
     | 
    
         
            +
             
     | 
| 
      
 23 
     | 
    
         
            +
                      def last_name
         
     | 
| 
      
 24 
     | 
    
         
            +
                        name && name.last_name
         
     | 
| 
      
 25 
     | 
    
         
            +
                      end
         
     | 
| 
      
 26 
     | 
    
         
            +
             
     | 
| 
      
 27 
     | 
    
         
            +
                      def full_name
         
     | 
| 
      
 28 
     | 
    
         
            +
                        name && name.full_name
         
     | 
| 
      
 29 
     | 
    
         
            +
                      end
         
     | 
| 
       18 
30 
     | 
    
         | 
| 
       19 
31 
     | 
    
         
             
                      def first_email
         
     | 
| 
       20 
32 
     | 
    
         
             
                        emails.map{ |email| email.value.split(/[,;\s]\s?/) }.flatten.first
         
     | 
| 
       21 
33 
     | 
    
         
             
                      end
         
     | 
| 
      
 34 
     | 
    
         
            +
             
     | 
| 
       22 
35 
     | 
    
         
             
                      def email
         
     | 
| 
       23 
36 
     | 
    
         
             
                        first_email
         
     | 
| 
       24 
37 
     | 
    
         
             
                      end
         
     | 
| 
         @@ -24,6 +24,18 @@ module SIF 
     | 
|
| 
       24 
24 
     | 
    
         
             
                          si.term_info_ref_id == term_info_ref_id
         
     | 
| 
       25 
25 
     | 
    
         
             
                        end || Common::ScheduleInfo.new
         
     | 
| 
       26 
26 
     | 
    
         
             
                      end
         
     | 
| 
      
 27 
     | 
    
         
            +
             
     | 
| 
      
 28 
     | 
    
         
            +
                      def first_schedule_info
         
     | 
| 
      
 29 
     | 
    
         
            +
                        schedule_infos.first || Common::ScheduleInfo.new
         
     | 
| 
      
 30 
     | 
    
         
            +
                      end
         
     | 
| 
      
 31 
     | 
    
         
            +
             
     | 
| 
      
 32 
     | 
    
         
            +
                      def term_info_ref_id
         
     | 
| 
      
 33 
     | 
    
         
            +
                        first_schedule_info.term_info_ref_id
         
     | 
| 
      
 34 
     | 
    
         
            +
                      end
         
     | 
| 
      
 35 
     | 
    
         
            +
             
     | 
| 
      
 36 
     | 
    
         
            +
                      def teacher
         
     | 
| 
      
 37 
     | 
    
         
            +
                        first_schedule_info.first_teacher
         
     | 
| 
      
 38 
     | 
    
         
            +
                      end
         
     | 
| 
       27 
39 
     | 
    
         
             
                    end
         
     | 
| 
       28 
40 
     | 
    
         
             
                  end
         
     | 
| 
       29 
41 
     | 
    
         
             
                end
         
     | 
    
        metadata
    CHANGED
    
    | 
         @@ -1,7 +1,7 @@ 
     | 
|
| 
       1 
1 
     | 
    
         
             
            --- !ruby/object:Gem::Specification
         
     | 
| 
       2 
2 
     | 
    
         
             
            name: openagent
         
     | 
| 
       3 
3 
     | 
    
         
             
            version: !ruby/object:Gem::Version
         
     | 
| 
       4 
     | 
    
         
            -
              version: 0. 
     | 
| 
      
 4 
     | 
    
         
            +
              version: 0.8.0
         
     | 
| 
       5 
5 
     | 
    
         
             
              prerelease: 
         
     | 
| 
       6 
6 
     | 
    
         
             
            platform: ruby
         
     | 
| 
       7 
7 
     | 
    
         
             
            authors:
         
     | 
| 
         @@ -11,7 +11,7 @@ authors: 
     | 
|
| 
       11 
11 
     | 
    
         
             
            autorequire: 
         
     | 
| 
       12 
12 
     | 
    
         
             
            bindir: bin
         
     | 
| 
       13 
13 
     | 
    
         
             
            cert_chain: []
         
     | 
| 
       14 
     | 
    
         
            -
            date: 2013-12- 
     | 
| 
      
 14 
     | 
    
         
            +
            date: 2013-12-11 00:00:00.000000000 Z
         
     | 
| 
       15 
15 
     | 
    
         
             
            dependencies:
         
     | 
| 
       16 
16 
     | 
    
         
             
            - !ruby/object:Gem::Dependency
         
     | 
| 
       17 
17 
     | 
    
         
             
              name: rake
         
     |