gaku 0.0.1 → 0.0.2
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.
- checksums.yaml +4 -4
- data/README.md +12 -4
- data/VERSION +1 -1
- data/core/app/controllers/concerns/enrollments_controller.rb +1 -2
- data/core/app/controllers/gaku/contacts_controller.rb +3 -3
- data/core/app/controllers/gaku/notes_controller.rb +33 -24
- data/core/app/controllers/gaku/syllabuses_controller.rb +44 -16
- data/core/app/models/gaku/address.rb +1 -1
- data/core/app/models/gaku/class_group_enrollment.rb +4 -3
- data/core/app/models/gaku/contact.rb +2 -2
- data/core/app/models/gaku/grading_method_set.rb +1 -1
- data/core/app/views/gaku/class_groups/students/enroll_students.js.erb +6 -0
- data/core/app/views/gaku/contacts/_form_fields.html.slim +1 -1
- data/core/app/views/gaku/notes/create.js.erb +3 -3
- data/core/app/views/gaku/notes/destroy.js.erb +3 -3
- data/core/app/views/gaku/notes/edit.js.erb +1 -1
- data/core/app/views/gaku/notes/new.js.erb +1 -1
- data/core/app/views/gaku/notes/show.js.erb +1 -1
- data/core/app/views/gaku/notes/update.js.erb +2 -2
- data/core/app/views/gaku/syllabuses/_syllabus_fields.html.slim +2 -3
- data/core/app/views/gaku/syllabuses/_syllabuses.html.slim +1 -1
- data/core/app/views/gaku/syllabuses/create.js.erb +4 -3
- data/core/app/views/gaku/syllabuses/destroy.js.erb +1 -1
- data/core/app/views/gaku/syllabuses/{show.html.slim → edit.html.slim} +0 -0
- data/core/app/views/gaku/syllabuses/edit.js.erb +1 -1
- data/core/app/views/gaku/syllabuses/new.js.erb +1 -1
- data/core/app/views/gaku/syllabuses/update.js.erb +1 -1
- data/core/config/routes.rb +0 -8
- data/core/gaku_core.gemspec +15 -11
- data/core/lib/gaku/testing/factories/note_factory.rb +4 -0
- data/core/lib/gaku/testing/factories/syllabus_factory.rb +4 -0
- data/core/lib/gaku/testing/request_helpers.rb +5 -0
- data/core/spec/controllers/gaku/addresses_controller_spec.rb +1 -1
- data/core/spec/controllers/gaku/contacts_controller_spec.rb +83 -12
- data/core/spec/controllers/gaku/notes_controller_spec.rb +143 -0
- data/core/spec/controllers/gaku/syllabuses_controller_spec.rb +140 -0
- data/core/spec/requests/admin/achievements/achievements_spec.rb +1 -1
- data/core/spec/requests/admin/grading/grading_method_set_items_spec.rb +1 -1
- data/core/spec/requests/admin/grading/grading_method_sets_spec.rb +1 -1
- data/core/spec/requests/admin/grading/grading_methods_spec.rb +1 -1
- data/core/spec/requests/admin/roles_spec.rb +1 -1
- data/core/spec/requests/admin/school_years/school_years_spec.rb +1 -1
- data/core/spec/requests/admin/school_years/semesters_spec.rb +1 -1
- data/core/spec/requests/admin/schools/campuses/addresses_spec.rb +1 -1
- data/core/spec/requests/admin/schools/campuses/campuses_spec.rb +1 -1
- data/core/spec/requests/admin/schools/campuses/contacts_spec.rb +10 -22
- data/core/spec/requests/admin/schools/programs_spec.rb +1 -1
- data/core/spec/requests/admin/schools/school_levels_spec.rb +1 -1
- data/core/spec/requests/admin/schools/schools_spec.rb +1 -1
- data/core/spec/requests/admin/specialties_spec.rb +1 -1
- data/core/spec/requests/admin/templates_spec.rb +1 -1
- data/core/spec/requests/admin/types_and_methods/attendance_types_spec.rb +1 -1
- data/core/spec/requests/admin/types_and_methods/commute_method_types_spec.rb +1 -1
- data/core/spec/requests/admin/types_and_methods/contact_types_spec.rb +1 -1
- data/core/spec/requests/admin/types_and_methods/enrollment_statuses_spec.rb +1 -1
- data/core/spec/requests/admin/types_and_methods/states_spec.rb +1 -1
- data/core/spec/requests/admin/users_spec.rb +1 -1
- data/core/spec/requests/class_groups/class_groups_spec.rb +1 -1
- data/core/spec/requests/class_groups/notes_spec.rb +6 -13
- data/core/spec/requests/class_groups/semester_class_groups_spec.rb +1 -1
- data/core/spec/requests/course_groups/course_groups_spec.rb +1 -1
- data/core/spec/requests/courses/courses_spec.rb +1 -1
- data/core/spec/requests/courses/notes_spec.rb +6 -11
- data/core/spec/requests/courses/semester_courses_spec.rb +1 -1
- data/core/spec/requests/exams/exam_portions/attachments_spec.rb +1 -1
- data/core/spec/requests/exams/notes_spec.rb +6 -11
- data/core/spec/requests/students/achievements_spec.rb +1 -1
- data/core/spec/requests/students/contacts_spec.rb +7 -7
- data/core/spec/requests/students/guardians/contacts_spec.rb +9 -17
- data/core/spec/requests/students/notes_spec.rb +5 -9
- data/core/spec/requests/students/simple_grades_spec.rb +1 -1
- data/core/spec/requests/students/specialties_spec.rb +1 -1
- data/core/spec/requests/syllabuses/exams_spec.rb +5 -5
- data/core/spec/requests/syllabuses/notes_spec.rb +5 -10
- data/core/spec/requests/syllabuses/syllabuses_spec.rb +46 -85
- data/core/spec/requests/teachers/contacts_spec.rb +11 -19
- data/core/spec/requests/teachers/notes_spec.rb +5 -10
- data/core/spec/support/requests/shared_addresses_spec.rb +6 -2
- data/core/spec/support/requests/shared_contacts_spec.rb +19 -15
- data/core/spec/support/requests/shared_notes_spec.rb +36 -35
- data/gaku_dependencies.rb +1 -8
- metadata +9 -9
- data/core/app/controllers/gaku/assignments_controller.rb +0 -15
- data/core/spec/controllers/gaku/syllabuses/syllabuses_controller_spec.rb +0 -92
| @@ -3,48 +3,40 @@ require 'spec_helper' | |
| 3 3 | 
             
            describe 'Teacher Contacts' do
         | 
| 4 4 |  | 
| 5 5 | 
             
              before { as :admin }
         | 
| 6 | 
            +
              before(:all) { set_resource 'teacher-contact' }
         | 
| 6 7 |  | 
| 7 8 | 
             
              let(:teacher) { create(:teacher) }
         | 
| 8 9 | 
             
              let(:teacher_with_contact) { create(:teacher, :with_contact) }
         | 
| 9 10 | 
             
              let(:teacher_with_contacts) { create(:teacher, :with_contacts) }
         | 
| 10 | 
            -
              let(:contact_type) { create(:contact_type, name: 'Email') }
         | 
| 11 | 
            -
             | 
| 12 | 
            -
              before :all do
         | 
| 13 | 
            -
                set_resource 'teacher-contact'
         | 
| 14 | 
            -
              end
         | 
| 11 | 
            +
              let!(:contact_type) { create(:contact_type, name: 'Email') }
         | 
| 15 12 |  | 
| 16 13 | 
             
              context 'new', js: true, type: 'contact' do
         | 
| 17 14 |  | 
| 18 15 | 
             
                before do
         | 
| 19 | 
            -
                   | 
| 20 | 
            -
                  visit gaku.edit_teacher_path( | 
| 16 | 
            +
                  @resource = teacher
         | 
| 17 | 
            +
                  visit gaku.edit_teacher_path(@resource)
         | 
| 21 18 | 
             
                  click tab_link
         | 
| 22 | 
            -
             | 
| 19 | 
            +
             | 
| 23 20 | 
             
                end
         | 
| 24 21 |  | 
| 25 22 | 
             
                it_behaves_like 'new contact'
         | 
| 26 | 
            -
             | 
| 27 23 | 
             
              end
         | 
| 28 24 |  | 
| 29 25 | 
             
              context 'existing', type: 'contact' do
         | 
| 30 26 |  | 
| 31 27 | 
             
                context 'one contact' do
         | 
| 32 28 |  | 
| 33 | 
            -
                  before | 
| 34 | 
            -
                    @data = teacher_with_contact
         | 
| 35 | 
            -
                  end
         | 
| 29 | 
            +
                  before { @resource = teacher_with_contact }
         | 
| 36 30 |  | 
| 37 31 | 
             
                  context 'edit', js: true do
         | 
| 38 32 |  | 
| 39 33 | 
             
                    before do
         | 
| 40 | 
            -
                      visit gaku.edit_teacher_path(@ | 
| 34 | 
            +
                      visit gaku.edit_teacher_path(@resource)
         | 
| 41 35 | 
             
                      click tab_link
         | 
| 42 36 | 
             
                    end
         | 
| 43 37 |  | 
| 44 38 | 
             
                    it_behaves_like 'edit contact'
         | 
| 45 | 
            -
             | 
| 46 | 
            -
                    it_behaves_like 'delete contact', @data
         | 
| 47 | 
            -
             | 
| 39 | 
            +
                    it_behaves_like 'delete contact', @resource
         | 
| 48 40 | 
             
                  end
         | 
| 49 41 |  | 
| 50 42 | 
             
                end
         | 
| @@ -52,13 +44,13 @@ describe 'Teacher Contacts' do | |
| 52 44 | 
             
                context 'two contacts', type: 'contact' do
         | 
| 53 45 |  | 
| 54 46 | 
             
                  before do
         | 
| 55 | 
            -
                    @ | 
| 56 | 
            -
                    visit gaku.edit_teacher_path(@ | 
| 47 | 
            +
                    @resource = teacher_with_contacts
         | 
| 48 | 
            +
                    visit gaku.edit_teacher_path(@resource)
         | 
| 57 49 | 
             
                    click tab_link
         | 
| 58 50 | 
             
                  end
         | 
| 59 51 |  | 
| 60 52 | 
             
                  it_behaves_like 'primary contacts'
         | 
| 61 | 
            -
             | 
| 62 53 | 
             
                end
         | 
| 63 54 | 
             
              end
         | 
| 55 | 
            +
             | 
| 64 56 | 
             
            end
         | 
| @@ -3,20 +3,16 @@ require 'spec_helper' | |
| 3 3 | 
             
            describe 'Teacher Notes' do
         | 
| 4 4 |  | 
| 5 5 | 
             
              before { as :admin }
         | 
| 6 | 
            +
              before(:all) { set_resource 'teacher-note' }
         | 
| 6 7 |  | 
| 7 8 | 
             
              let(:teacher) { create(:teacher) }
         | 
| 8 9 | 
             
              let(:teacher_with_note) { create(:teacher, :with_note) }
         | 
| 9 10 | 
             
              let(:note) { create(:note) }
         | 
| 10 11 |  | 
| 11 | 
            -
              before :all do
         | 
| 12 | 
            -
                set_resource 'teacher-note'
         | 
| 13 | 
            -
              end
         | 
| 14 | 
            -
             | 
| 15 12 | 
             
              context 'new', type: 'note'  do
         | 
| 16 | 
            -
             | 
| 17 13 | 
             
                before do
         | 
| 18 | 
            -
                  @ | 
| 19 | 
            -
                  visit gaku.edit_teacher_path(@ | 
| 14 | 
            +
                  @resource = teacher
         | 
| 15 | 
            +
                  visit gaku.edit_teacher_path(@resource)
         | 
| 20 16 | 
             
                  click tab_link
         | 
| 21 17 | 
             
                end
         | 
| 22 18 |  | 
| @@ -26,13 +22,12 @@ describe 'Teacher Notes' do | |
| 26 22 | 
             
              context 'existing', type: 'note'  do
         | 
| 27 23 |  | 
| 28 24 | 
             
                before do
         | 
| 29 | 
            -
                  @ | 
| 30 | 
            -
                  visit gaku.edit_teacher_path(@ | 
| 25 | 
            +
                  @resource = teacher_with_note
         | 
| 26 | 
            +
                  visit gaku.edit_teacher_path(@resource)
         | 
| 31 27 | 
             
                  click tab_link
         | 
| 32 28 | 
             
                end
         | 
| 33 29 |  | 
| 34 30 | 
             
                it_behaves_like 'edit note'
         | 
| 35 | 
            -
             | 
| 36 31 | 
             
                it_behaves_like 'delete note'
         | 
| 37 32 | 
             
              end
         | 
| 38 33 |  | 
| @@ -21,6 +21,10 @@ shared_examples 'new address' do | |
| 21 21 | 
             
                  end.to change(@resource.addresses, :count).by(1)
         | 
| 22 22 |  | 
| 23 23 | 
             
                  has_content? 'Primary address'
         | 
| 24 | 
            +
                  count? 'Addresses list(1)'
         | 
| 25 | 
            +
                  if page.has_css?(tab_link)
         | 
| 26 | 
            +
                    within(tab_link)  { has_content? 'Addresses(1)' }
         | 
| 27 | 
            +
                  end
         | 
| 24 28 | 
             
                end
         | 
| 25 29 |  | 
| 26 30 | 
             
                it 'has validations', js:true do
         | 
| @@ -38,7 +42,7 @@ shared_examples_for 'edit address' do | |
| 38 42 | 
             
              let(:address) { @resource.addresses.first }
         | 
| 39 43 |  | 
| 40 44 | 
             
              before do
         | 
| 41 | 
            -
                click  | 
| 45 | 
            +
                click js_edit_link
         | 
| 42 46 | 
             
                wait_until_visible modal
         | 
| 43 47 | 
             
              end
         | 
| 44 48 |  | 
| @@ -149,7 +153,7 @@ shared_examples_for 'dynamic state dropdown' do | |
| 149 153 | 
             
              end
         | 
| 150 154 |  | 
| 151 155 | 
             
              context 'edit form' do
         | 
| 152 | 
            -
                before { click  | 
| 156 | 
            +
                before { click js_edit_link }
         | 
| 153 157 |  | 
| 154 158 | 
             
                it 'changes country with state',js: true do
         | 
| 155 159 | 
             
                  select "#{country}", from: 'country_dropdown'
         | 
| @@ -16,7 +16,7 @@ shared_examples_for 'new contact' do | |
| 16 16 | 
             
                    fill_in 'contact_details', with: 'The contact details'
         | 
| 17 17 | 
             
                    click submit
         | 
| 18 18 | 
             
                    flash_created?
         | 
| 19 | 
            -
                  end.to change(@ | 
| 19 | 
            +
                  end.to change(@resource.contacts, :count).by 1
         | 
| 20 20 |  | 
| 21 21 | 
             
                  has_content? 'The contact data'
         | 
| 22 22 | 
             
                  has_content? 'The contact details'
         | 
| @@ -32,19 +32,23 @@ end | |
| 32 32 |  | 
| 33 33 | 
             
            shared_examples_for 'edit contact' do
         | 
| 34 34 |  | 
| 35 | 
            +
              let(:contact) { @resource.contacts.first }
         | 
| 36 | 
            +
             | 
| 35 37 | 
             
              before do
         | 
| 36 | 
            -
                within(table) { click  | 
| 38 | 
            +
                within(table) { click js_edit_link }
         | 
| 37 39 | 
             
                wait_until_visible modal
         | 
| 38 40 | 
             
              end
         | 
| 39 41 |  | 
| 40 42 | 
             
              it 'edits' do
         | 
| 43 | 
            +
                old_contact = contact.data
         | 
| 41 44 | 
             
                fill_in 'contact_data', with: 'example@genshin.org'
         | 
| 42 45 | 
             
                click submit
         | 
| 43 46 |  | 
| 44 47 | 
             
                wait_until_invisible modal
         | 
| 45 48 | 
             
                has_content? 'example@genshin.org'
         | 
| 46 49 | 
             
                flash_updated?
         | 
| 47 | 
            -
                expect(@ | 
| 50 | 
            +
                expect(@resource.contacts.first.reload.data).to eq 'example@genshin.org'
         | 
| 51 | 
            +
                has_no_content? old_contact
         | 
| 48 52 | 
             
              end
         | 
| 49 53 |  | 
| 50 54 | 
             
              it 'errors without required fields', js:true do
         | 
| @@ -57,7 +61,7 @@ end | |
| 57 61 | 
             
            shared_examples_for 'delete contact' do
         | 
| 58 62 |  | 
| 59 63 | 
             
              it 'deletes', js: true do
         | 
| 60 | 
            -
                contact_field = @ | 
| 64 | 
            +
                contact_field = @resource.contacts.first.data
         | 
| 61 65 |  | 
| 62 66 | 
             
                count? 'Contacts list(1)'
         | 
| 63 67 | 
             
                if page.has_css?(tab_link)
         | 
| @@ -69,8 +73,8 @@ shared_examples_for 'delete contact' do | |
| 69 73 | 
             
                  expect do
         | 
| 70 74 | 
             
                    ensure_delete_is_working
         | 
| 71 75 | 
             
                    flash_destroyed?
         | 
| 72 | 
            -
                  end.to change(@ | 
| 73 | 
            -
                end.to change(@ | 
| 76 | 
            +
                  end.to change(@resource.contacts, :count).by(-1)
         | 
| 77 | 
            +
                end.to change(@resource.contacts.deleted, :count).by(1)
         | 
| 74 78 |  | 
| 75 79 | 
             
                within(count_div) { has_no_content? 'Contacts list(1)' }
         | 
| 76 80 | 
             
                if page.has_css?(tab_link)
         | 
| @@ -84,24 +88,24 @@ end | |
| 84 88 | 
             
            shared_examples_for 'primary contacts' do
         | 
| 85 89 |  | 
| 86 90 | 
             
              it 'sets primary', js: true do
         | 
| 87 | 
            -
                expect(@ | 
| 88 | 
            -
                expect(@ | 
| 91 | 
            +
                expect(@resource.contacts.first.primary?).to eq true
         | 
| 92 | 
            +
                expect(@resource.contacts.second.primary?).to eq false
         | 
| 89 93 |  | 
| 90 94 | 
             
                within("#{table} tr#contact-2") { click_link 'set-primary-link' }
         | 
| 91 95 | 
             
                accept_alert
         | 
| 92 96 |  | 
| 93 | 
            -
                within("#{table} tr#contact-#{@ | 
| 97 | 
            +
                within("#{table} tr#contact-#{@resource.contacts.second.id}") do
         | 
| 94 98 | 
             
                  expect(page).to have_css('.btn-primary')
         | 
| 95 99 | 
             
                end
         | 
| 96 100 |  | 
| 97 | 
            -
                @ | 
| 98 | 
            -
                expect(@ | 
| 99 | 
            -
                expect(@ | 
| 101 | 
            +
                @resource.contacts.reload
         | 
| 102 | 
            +
                expect(@resource.contacts.first.primary?).to eq false
         | 
| 103 | 
            +
                expect(@resource.contacts.second.primary?).to eq true
         | 
| 100 104 | 
             
              end
         | 
| 101 105 |  | 
| 102 106 | 
             
              it 'delete primary', js: true do
         | 
| 103 | 
            -
                contact1_tr = "#contact-#{@ | 
| 104 | 
            -
                contact2_tr = "#contact-#{@ | 
| 107 | 
            +
                contact1_tr = "#contact-#{@resource.contacts.first.id}"
         | 
| 108 | 
            +
                contact2_tr = "#contact-#{@resource.contacts.second.id}"
         | 
| 105 109 |  | 
| 106 110 | 
             
                within("#{table} #{contact2_tr}") { click_link 'set-primary-link' }
         | 
| 107 111 | 
             
                accept_alert
         | 
| @@ -112,6 +116,6 @@ shared_examples_for 'primary contacts' do | |
| 112 116 | 
             
                accept_alert
         | 
| 113 117 |  | 
| 114 118 | 
             
                page.find("#{contact1_tr} .primary-contact a.btn-primary")
         | 
| 115 | 
            -
                expect(@ | 
| 119 | 
            +
                expect(@resource.contacts.first.primary?).to eq true
         | 
| 116 120 | 
             
              end
         | 
| 117 121 | 
             
            end
         | 
| @@ -1,28 +1,28 @@ | |
| 1 1 | 
             
            shared_examples_for 'new note' do
         | 
| 2 | 
            -
             | 
| 2 | 
            +
             | 
| 3 3 | 
             
              context 'new' do
         | 
| 4 | 
            -
             | 
| 4 | 
            +
             | 
| 5 5 | 
             
                before do
         | 
| 6 6 | 
             
                  click new_link
         | 
| 7 | 
            -
                  wait_until_visible submit | 
| 7 | 
            +
                  wait_until_visible submit
         | 
| 8 8 | 
             
                end
         | 
| 9 9 |  | 
| 10 10 | 
             
                it 'adds and shows', js: true do
         | 
| 11 11 | 
             
                  expect do
         | 
| 12 | 
            -
                     | 
| 13 | 
            -
             | 
| 14 | 
            -
             | 
| 15 | 
            -
             | 
| 16 | 
            -
             | 
| 17 | 
            -
             | 
| 18 | 
            -
                   | 
| 19 | 
            -
             | 
| 20 | 
            -
                   | 
| 21 | 
            -
                   | 
| 22 | 
            -
             | 
| 23 | 
            -
             | 
| 24 | 
            -
             | 
| 25 | 
            -
                   | 
| 12 | 
            +
                    expect do
         | 
| 13 | 
            +
                      fill_in 'note_title',   with: 'The note title'
         | 
| 14 | 
            +
                      fill_in 'note_content', with: 'The note content'
         | 
| 15 | 
            +
                      click submit
         | 
| 16 | 
            +
                      flash_created?
         | 
| 17 | 
            +
                    end.to change(Gaku::Note, :count).by(1)
         | 
| 18 | 
            +
                  end.to change(@resource.notes, :count).by(1)
         | 
| 19 | 
            +
             | 
| 20 | 
            +
                  has_content? 'The note title'
         | 
| 21 | 
            +
                  has_content? 'The note content'
         | 
| 22 | 
            +
                  count? 'Notes list(1)'
         | 
| 23 | 
            +
                  if page.has_css?(tab_link)
         | 
| 24 | 
            +
                    within(tab_link)  { has_content? 'Notes(1)' }
         | 
| 25 | 
            +
                  end
         | 
| 26 26 | 
             
                end
         | 
| 27 27 |  | 
| 28 28 | 
             
                it 'has validations', js: true do
         | 
| @@ -30,53 +30,54 @@ shared_examples_for 'new note' do | |
| 30 30 | 
             
                end
         | 
| 31 31 |  | 
| 32 32 | 
             
              end
         | 
| 33 | 
            -
              
         | 
| 34 33 | 
             
            end
         | 
| 35 34 |  | 
| 36 35 | 
             
            shared_examples_for 'edit note' do
         | 
| 37 | 
            -
             | 
| 36 | 
            +
             | 
| 37 | 
            +
              let(:note) { @resource.notes.first }
         | 
| 38 | 
            +
             | 
| 38 39 | 
             
              before do
         | 
| 39 | 
            -
                within(table) { click  | 
| 40 | 
            +
                within(table) { click js_edit_link }
         | 
| 40 41 | 
             
                wait_until_visible modal
         | 
| 41 42 | 
             
              end
         | 
| 42 43 |  | 
| 43 44 | 
             
              it 'edits', js:true do
         | 
| 45 | 
            +
                old_note = note.title
         | 
| 44 46 | 
             
                fill_in 'note_title',   with: 'Edited note title'
         | 
| 45 47 | 
             
                fill_in 'note_content', with: 'Edited note content'
         | 
| 46 48 | 
             
                click submit
         | 
| 47 49 |  | 
| 48 | 
            -
                wait_until_invisible modal
         | 
| 49 | 
            -
                page.should have_content 'Edited note title'
         | 
| 50 | 
            -
                page.should have_content 'Edited note content'
         | 
| 51 50 | 
             
                flash_updated?
         | 
| 52 | 
            -
             | 
| 53 | 
            -
             | 
| 54 | 
            -
             | 
| 55 | 
            -
                 | 
| 51 | 
            +
                has_content? 'Edited note title'
         | 
| 52 | 
            +
                has_content? 'Edited note content'
         | 
| 53 | 
            +
                has_no_content? old_note
         | 
| 54 | 
            +
                expect(@resource.notes.first.reload.title).to eq 'Edited note title'
         | 
| 56 55 | 
             
              end
         | 
| 57 56 |  | 
| 58 57 | 
             
              it 'errors without required fields', js:true do
         | 
| 59 58 | 
             
                fill_in 'note_title', with: ''
         | 
| 60 59 | 
             
                has_validations?
         | 
| 61 60 | 
             
              end
         | 
| 62 | 
            -
             | 
| 63 61 | 
             
            end
         | 
| 64 62 |  | 
| 65 63 | 
             
            shared_examples_for 'delete note' do
         | 
| 66 64 |  | 
| 67 65 | 
             
              it 'deletes', js: true do
         | 
| 68 | 
            -
                note_field = @ | 
| 66 | 
            +
                note_field = @resource.notes.first.title
         | 
| 69 67 |  | 
| 70 | 
            -
                 | 
| 71 | 
            -
                 | 
| 68 | 
            +
                count? 'Notes list(1)'
         | 
| 69 | 
            +
                has_content? note_field
         | 
| 72 70 |  | 
| 73 71 | 
             
                expect do
         | 
| 74 72 | 
             
                  ensure_delete_is_working
         | 
| 75 | 
            -
             | 
| 73 | 
            +
                  flash_destroyed?
         | 
| 74 | 
            +
                end.to change(@resource.notes, :count).by(-1)
         | 
| 76 75 |  | 
| 77 | 
            -
                within(count_div) {  | 
| 78 | 
            -
                page. | 
| 79 | 
            -
             | 
| 76 | 
            +
                within(count_div) { has_no_content? 'Notes list(1)' }
         | 
| 77 | 
            +
                if page.has_css?(tab_link)
         | 
| 78 | 
            +
                  within(tab_link)  { has_no_content? 'Notes(1)' }
         | 
| 79 | 
            +
                end
         | 
| 80 | 
            +
                has_no_content? note_field
         | 
| 80 81 | 
             
              end
         | 
| 81 82 |  | 
| 82 83 | 
             
            end
         | 
    
        data/gaku_dependencies.rb
    CHANGED
    
    | @@ -1,13 +1,6 @@ | |
| 1 1 | 
             
            source 'http://production.s3.rubygems.org'
         | 
| 2 2 |  | 
| 3 | 
            -
            gem ' | 
| 4 | 
            -
             | 
| 5 | 
            -
            gem 'sass-rails',   '~> 4.0.0'
         | 
| 6 | 
            -
            gem 'coffee-rails', '~> 4.0.0'
         | 
| 7 | 
            -
            gem 'uglifier',     '>= 1.0.3'
         | 
| 8 | 
            -
             | 
| 9 | 
            -
            gem 'globalize3',  github: 'svenfuchs/globalize3', branch: 'rails4'
         | 
| 10 | 
            -
            gem 'gaku_helpers', github: 'kalkov/gaku_helpers'
         | 
| 3 | 
            +
            gem 'globalize3',  github: 'globalize/globalize', branch: 'rails4', ref: '82b3b36308677745b261bd147dda00ed4560a25d'
         | 
| 11 4 |  | 
| 12 5 | 
             
            group :development do
         | 
| 13 6 | 
             
              gem 'guard'
         | 
    
        metadata
    CHANGED
    
    | @@ -1,7 +1,7 @@ | |
| 1 1 | 
             
            --- !ruby/object:Gem::Specification
         | 
| 2 2 | 
             
            name: gaku
         | 
| 3 3 | 
             
            version: !ruby/object:Gem::Version
         | 
| 4 | 
            -
              version: 0.0. | 
| 4 | 
            +
              version: 0.0.2
         | 
| 5 5 | 
             
            platform: ruby
         | 
| 6 6 | 
             
            authors:
         | 
| 7 7 | 
             
            - Rei Kagetsuki
         | 
| @@ -11,7 +11,7 @@ authors: | |
| 11 11 | 
             
            autorequire: 
         | 
| 12 12 | 
             
            bindir: bin
         | 
| 13 13 | 
             
            cert_chain: []
         | 
| 14 | 
            -
            date: 2013-10- | 
| 14 | 
            +
            date: 2013-10-10 00:00:00.000000000 Z
         | 
| 15 15 | 
             
            dependencies:
         | 
| 16 16 | 
             
            - !ruby/object:Gem::Dependency
         | 
| 17 17 | 
             
              name: gaku_core
         | 
| @@ -19,28 +19,28 @@ dependencies: | |
| 19 19 | 
             
                requirements:
         | 
| 20 20 | 
             
                - - '='
         | 
| 21 21 | 
             
                  - !ruby/object:Gem::Version
         | 
| 22 | 
            -
                    version: 0.0. | 
| 22 | 
            +
                    version: 0.0.2
         | 
| 23 23 | 
             
              type: :runtime
         | 
| 24 24 | 
             
              prerelease: false
         | 
| 25 25 | 
             
              version_requirements: !ruby/object:Gem::Requirement
         | 
| 26 26 | 
             
                requirements:
         | 
| 27 27 | 
             
                - - '='
         | 
| 28 28 | 
             
                  - !ruby/object:Gem::Version
         | 
| 29 | 
            -
                    version: 0.0. | 
| 29 | 
            +
                    version: 0.0.2
         | 
| 30 30 | 
             
            - !ruby/object:Gem::Dependency
         | 
| 31 31 | 
             
              name: gaku_sample
         | 
| 32 32 | 
             
              requirement: !ruby/object:Gem::Requirement
         | 
| 33 33 | 
             
                requirements:
         | 
| 34 34 | 
             
                - - '='
         | 
| 35 35 | 
             
                  - !ruby/object:Gem::Version
         | 
| 36 | 
            -
                    version: 0.0. | 
| 36 | 
            +
                    version: 0.0.2
         | 
| 37 37 | 
             
              type: :runtime
         | 
| 38 38 | 
             
              prerelease: false
         | 
| 39 39 | 
             
              version_requirements: !ruby/object:Gem::Requirement
         | 
| 40 40 | 
             
                requirements:
         | 
| 41 41 | 
             
                - - '='
         | 
| 42 42 | 
             
                  - !ruby/object:Gem::Version
         | 
| 43 | 
            -
                    version: 0.0. | 
| 43 | 
            +
                    version: 0.0.2
         | 
| 44 44 | 
             
            description: It allows for full student management, grading etc. It's bascally what
         | 
| 45 45 | 
             
              all student grading tools are with some unique features
         | 
| 46 46 | 
             
            email: info@genshin.org
         | 
| @@ -208,7 +208,6 @@ files: | |
| 208 208 | 
             
            - core/app/controllers/gaku/admin/system_tools_controller.rb
         | 
| 209 209 | 
             
            - core/app/controllers/gaku/admin/templates_controller.rb
         | 
| 210 210 | 
             
            - core/app/controllers/gaku/admin/users_controller.rb
         | 
| 211 | 
            -
            - core/app/controllers/gaku/assignments_controller.rb
         | 
| 212 211 | 
             
            - core/app/controllers/gaku/attachments_controller.rb
         | 
| 213 212 | 
             
            - core/app/controllers/gaku/attendances_controller.rb
         | 
| 214 213 | 
             
            - core/app/controllers/gaku/class_group_enrollments_controller.rb
         | 
| @@ -1014,6 +1013,7 @@ files: | |
| 1014 1013 | 
             
            - core/app/views/gaku/syllabuses/assignments/create.js.erb
         | 
| 1015 1014 | 
             
            - core/app/views/gaku/syllabuses/create.js.erb
         | 
| 1016 1015 | 
             
            - core/app/views/gaku/syllabuses/destroy.js.erb
         | 
| 1016 | 
            +
            - core/app/views/gaku/syllabuses/edit.html.slim
         | 
| 1017 1017 | 
             
            - core/app/views/gaku/syllabuses/edit.js.erb
         | 
| 1018 1018 | 
             
            - core/app/views/gaku/syllabuses/exam_syllabuses/create.js.erb
         | 
| 1019 1019 | 
             
            - core/app/views/gaku/syllabuses/exam_syllabuses/destroy.js.erb
         | 
| @@ -1032,7 +1032,6 @@ files: | |
| 1032 1032 | 
             
            - core/app/views/gaku/syllabuses/importer/index.html.slim
         | 
| 1033 1033 | 
             
            - core/app/views/gaku/syllabuses/index.html.slim
         | 
| 1034 1034 | 
             
            - core/app/views/gaku/syllabuses/new.js.erb
         | 
| 1035 | 
            -
            - core/app/views/gaku/syllabuses/show.html.slim
         | 
| 1036 1035 | 
             
            - core/app/views/gaku/syllabuses/update.js.erb
         | 
| 1037 1036 | 
             
            - core/app/views/gaku/teachers/_delete_modal.html.slim
         | 
| 1038 1037 | 
             
            - core/app/views/gaku/teachers/_edit_table.html.slim
         | 
| @@ -1224,9 +1223,10 @@ files: | |
| 1224 1223 | 
             
            - core/spec/controllers/gaku/course_groups/course_groups_controller_spec.rb
         | 
| 1225 1224 | 
             
            - core/spec/controllers/gaku/courses/courses_controller_spec.rb
         | 
| 1226 1225 | 
             
            - core/spec/controllers/gaku/exams/exams_controller_spec.rb
         | 
| 1226 | 
            +
            - core/spec/controllers/gaku/notes_controller_spec.rb
         | 
| 1227 1227 | 
             
            - core/spec/controllers/gaku/students/guardians_controller_spec.rb
         | 
| 1228 1228 | 
             
            - core/spec/controllers/gaku/students/students_controller_spec.rb
         | 
| 1229 | 
            -
            - core/spec/controllers/gaku/ | 
| 1229 | 
            +
            - core/spec/controllers/gaku/syllabuses_controller_spec.rb
         | 
| 1230 1230 | 
             
            - core/spec/controllers/gaku/teachers_controller_spec.rb
         | 
| 1231 1231 | 
             
            - core/spec/coverage/.last_run.json
         | 
| 1232 1232 | 
             
            - core/spec/coverage/.resultset.json
         |