Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -449,8 +449,8 @@ GEM
rspec-support (3.13.7)
rspec_junit_formatter (0.6.0)
rspec-core (>= 2, < 4, != 2.12.0)
rubocop (1.89.0)
json (~> 2.3)
rubocop (1.90.0)
json (>= 2.3)
language_server-protocol (~> 3.17.0.2)
lint_roller (~> 1.1.0)
parallel (>= 1.10)
Expand Down
3 changes: 1 addition & 2 deletions lib/concepts/school_student/create_batch_sso.rb
Original file line number Diff line number Diff line change
Expand Up @@ -67,9 +67,8 @@ def create_student_roles(school, responses)
end

# We know the school and uniqueness is ok at this stage, so we can skip validations
# rubocop:disable Rails/SkipsModelValidations
# rubocop:disable-next Rails/SkipsModelValidations
Role.insert_all(new_roles, unique_by: %i[user_id school_id role])
# rubocop:enable Rails/SkipsModelValidations
end

def format_student_responses(responses)
Expand Down
3 changes: 1 addition & 2 deletions lib/profile_api_client.rb
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,8 @@ class ProfileApiClient
owner: 'school:owner'
}.freeze

# rubocop:disable Naming/MethodName
# rubocop:disable-next Naming/MethodName
Student = Data.define(:id, :schoolId, :name, :username, :createdAt, :updatedAt, :discardedAt, :email, :ssoProviders)
# rubocop:enable Naming/MethodName

class Error < StandardError; end

Expand Down
6 changes: 2 additions & 4 deletions lib/tasks/seeds_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

require_relative 'project_preview_seeds_helper'

# rubocop:disable Metrics/ModuleLength
# rubocop:disable-next Metrics/ModuleLength
module SeedsHelper
include ProjectPreviewSeedsHelper

Expand Down Expand Up @@ -59,9 +59,8 @@ def verify_school(school)
Role.teacher.create!(user_id: school.creator_id, school:)
end

# rubocop:disable Rails/SkipsModelValidations
# rubocop:disable-next Rails/SkipsModelValidations
school.update_column(:code, SCHOOL_CODE) # The code needs to match the one in the profile
# rubocop:enable Rails/SkipsModelValidations
end

def create_school_class(teacher_id, school, name = Faker::Educator.course_name, description = Faker::Hacker.phrases.sample)
Expand Down Expand Up @@ -150,4 +149,3 @@ def create_project(user_id, school, lesson, project_type)
end
end
end
# rubocop:enable Metrics/ModuleLength
3 changes: 1 addition & 2 deletions spec/requests/join_controller_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -203,7 +203,7 @@
expect(response).to have_http_status(:not_found)
end

# rubocop:disable RSpec/AnyInstance
# rubocop:disable-next RSpec/AnyInstance
it 'responds with 500 when action_status returns an unexpected value' do
allow_any_instance_of(Api::JoinController).to receive(:action_status).and_return(:something_unexpected)

Expand All @@ -212,7 +212,6 @@
expect(response).to have_http_status(:internal_server_error)
expect(response.body).to include('Unexpected join action_status')
end
# rubocop:enable RSpec/AnyInstance

context 'when the email domain is not registered for the school' do
let(:student) { build(:student, email: 'student@other.edu') }
Expand Down
3 changes: 1 addition & 2 deletions spec/support/sign_in_stubs.rb
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,10 @@
module SignInStubs
# Use this method if you don't want to bother going through the login process
# itself.
# rubocop:disable RSpec/AnyInstance
# rubocop:disable-next RSpec/AnyInstance
def stub_sign_in(user)
allow_any_instance_of(AuthenticationHelper).to receive(:current_user).and_return(user)
end
# rubocop:enable RSpec/AnyInstance

def stub_auth_for(user)
OmniAuth.config.add_mock(:rpi, uid: user.id, extra: { raw_info: user.serializable_hash(except: :id) })
Expand Down
Loading