Skip to content

Commit

Permalink
Fixing spelling issues (#148)
Browse files Browse the repository at this point in the history
* Add github workflows and fixing rspec model cases.

Removed Assignment as foreign key from questionnaire.

* Fixing spelling issues

* Fixing spelling issues

---------

Co-authored-by: kmalick <[email protected]>
  • Loading branch information
Kashika08 and kmalick authored Dec 30, 2024
1 parent 5ef1236 commit 9a9f34c
Show file tree
Hide file tree
Showing 5 changed files with 21 additions and 21 deletions.
4 changes: 2 additions & 2 deletions app/models/assignment.rb
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,7 @@ def team_assignment?
!max_team_size.nil? && max_team_size > 1
end

#Auxillary method for checking the validity of the field reviews_allowed for the given assignment object
#Auxiliary method for checking the validity of the field reviews_allowed for the given assignment object
# Checks if review_allowed is not null and not negative.
def valid_reviews_allowed?(reviews_allowed)
reviews_allowed && reviews_allowed != -1
Expand Down Expand Up @@ -186,7 +186,7 @@ def valid_num_review(review_type)

#This method check if for the given assignment,different type of rubrics are used in different round.
# Checks if for the given assignment any questionnaire is present with used_in_round field not nil.
# Returns a bolean value whether such questionnaire is present.
# Returns a boolean value whether such questionnaire is present.
def varying_rubrics_by_round?
rubric_with_round = AssignmentQuestionnaire.where(assignment_id: id).where.not(used_in_round: nil).first
# Check if any rubric has a specified round
Expand Down
2 changes: 1 addition & 1 deletion config/storage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ local:
# region: us-east-1
# bucket: your_own_bucket-<%= Rails.env %>

# Remember not to checkin your GCS keyfile to a repository
# Remember not to check in your GCS keyfile to a repository
# google:
# service: GCS
# project: your_project
Expand Down
6 changes: 3 additions & 3 deletions spec/requests/api/v1/bookmarks_controller_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@
bookmark.id
end

# Get request on /api/v1/bookmarks/{id} returns the response 200 succesful - bookmark with id = {id} when correct id is passed which is in the database
# Get request on /api/v1/bookmarks/{id} returns the response 200 successful - bookmark with id = {id} when correct id is passed which is in the database
get('show bookmark') do
tags 'Bookmarks'
produces 'application/json'
Expand Down Expand Up @@ -159,7 +159,7 @@
}
}

# put request on /api/v1/bookmarks/{id} returns 200 response succesful when bookmark id is present in the database and correct valid params are passed
# put request on /api/v1/bookmarks/{id} returns 200 response successful when bookmark id is present in the database and correct valid params are passed
response(200, 'successful') do
let(:body_params) do
{
Expand Down Expand Up @@ -201,7 +201,7 @@
delete('delete bookmark') do
tags 'Bookmarks'
produces 'application/json'
# delete request on /api/v1/bookmarks/{id} returns 204 succesful response when bookmark with id present in the database is succesfully deleted
# delete request on /api/v1/bookmarks/{id} returns 204 successful response when bookmark with id present in the database is successfully deleted
response(204, 'successful') do
run_test! do
expect(Bookmark.exists?(id)).to eq(false)
Expand Down
14 changes: 7 additions & 7 deletions spec/requests/api/v1/questionnaires_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@
end
end

# post request on /api/v1/questionnaires returns 422 response - unprocessable entity when wrong params is passed toc reate questionnaire
# post request on /api/v1/questionnaires returns 422 response - unprocessable entity when wrong params is passed to create questionnaire
response(422, 'unprocessable entity') do
let(:questionnaire) do
instructor
Expand Down Expand Up @@ -147,7 +147,7 @@
questionnaire.id
end

# Get request on /api/v1/questionnaires/{id} returns the response 200 succesful - questionnaire with id = {id} when correct id is passed which is in the database
# Get request on /api/v1/questionnaires/{id} returns the response 200 successful - questionnaire with id = {id} when correct id is passed which is in the database
get('show questionnaire') do
tags 'Questionnaires'
produces 'application/json'
Expand Down Expand Up @@ -178,7 +178,7 @@
}
}

# put request on /api/v1/questionnaires/{id} returns 200 response succesful when questionnaire id is present in the database and correct valid params are passed
# put request on /api/v1/questionnaires/{id} returns 200 response successful when questionnaire id is present in the database and correct valid params are passed
response(200, 'successful') do
let(:body_params) do
{
Expand Down Expand Up @@ -229,7 +229,7 @@
}
}

# patch request on /api/v1/questionnaires/{id} returns 200 response succesful when questionnaire id is present in the database and correct valid params are passed
# patch request on /api/v1/questionnaires/{id} returns 200 response successful when questionnaire id is present in the database and correct valid params are passed
response(200, 'successful') do
let(:body_params) do
{
Expand Down Expand Up @@ -271,7 +271,7 @@
delete('delete questionnaire') do
tags 'Questionnaires'
produces 'application/json'
# delete request on /api/v1/questionnaires/{id} returns 204 succesful response when questionnaire with id present in the database is succesfully deleted
# delete request on /api/v1/questionnaires/{id} returns 204 successful response when questionnaire with id present in the database is successfully deleted
response(204, 'successful') do
run_test! do
expect(Questionnaire.exists?(id)).to eq(false)
Expand Down Expand Up @@ -323,7 +323,7 @@
tags 'Questionnaires'
produces 'application/json'

# get request on /api/v1/questionnaires/toggle_access/{id} returns 200 succesful response when correct id is passed and toggles the private variable
# get request on /api/v1/questionnaires/toggle_access/{id} returns 200 successful response when correct id is passed and toggles the private variable
response(200, 'successful') do
run_test! do
expect(response.body).to include(" has been successfully made private. ")
Expand Down Expand Up @@ -375,7 +375,7 @@
consumes 'application/json'
produces 'application/json'

# post request on /api/v1/questionnaires/copy/{id} returns 200 succesful response when request returns copied questionnaire with questionnaire id is present in the database
# post request on /api/v1/questionnaires/copy/{id} returns 200 successful response when request returns copied questionnaire with questionnaire id is present in the database
response(200, 'successful') do
run_test! do
expect(response.body).to eq("Copy of the questionnaire has been created successfully.")
Expand Down
16 changes: 8 additions & 8 deletions spec/requests/api/v1/questions_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@
)
end

# get request on /api/v1/questions returns 200 succesful response when it returns list of questions present in the database
# get request on /api/v1/questions returns 200 successful response when it returns list of questions present in the database
get('list questions') do
tags 'Questions'
produces 'application/json'
Expand Down Expand Up @@ -117,7 +117,7 @@
end
end

# post request on /api/v1/questions returns 404 not foound when questionnaire id for the given question is not present in the database
# post request on /api/v1/questions returns 404 not found when questionnaire id for the given question is not present in the database
response(404, 'questionnaire id not found') do
let(:question) do
instructor
Expand Down Expand Up @@ -199,7 +199,7 @@
tags 'Questions'
produces 'application/json'

# get request on /api/v1/questions/{id} returns 200 succesful response and returns question with given question id
# get request on /api/v1/questions/{id} returns 200 successful response and returns question with given question id
response(200, 'successful') do
run_test! do
expect(response.body).to include('"txt":"test question 1"')
Expand Down Expand Up @@ -228,7 +228,7 @@
}
}

# put request on /api/v1/questions/{id} returns 200 succesful response and updates parameters of question with given question id
# put request on /api/v1/questions/{id} returns 200 successful response and updates parameters of question with given question id
response(200, 'successful') do
let(:body_params) do
{
Expand Down Expand Up @@ -282,7 +282,7 @@
}
}

# patch request on /api/v1/questions/{id} returns 200 succesful response and updates parameters of question with given question id
# patch request on /api/v1/questions/{id} returns 200 successful response and updates parameters of question with given question id
response(200, 'successful') do
let(:body_params) do
{
Expand Down Expand Up @@ -329,7 +329,7 @@
tags 'Questions'
produces 'application/json'

# delete request on /api/v1/questions/{id} returns 204 succesful response when it deletes question with given question id present in the database
# delete request on /api/v1/questions/{id} returns 204 successful response when it deletes question with given question id present in the database
response(204, 'successful') do
run_test! do
expect(Question.exists?(id)).to eq(false)
Expand Down Expand Up @@ -406,7 +406,7 @@
tags 'Questions'
produces 'application/json'

# delete method on /api/v1/questions/delete_all/questionnaire/{id} returns 200 succesful response when all questions with given questionnaire id are deleted
# delete method on /api/v1/questions/delete_all/questionnaire/{id} returns 200 successful response when all questions with given questionnaire id are deleted
response(200, 'successful') do
run_test! do
expect(Question.where(questionnaire_id: id).count).to eq(0)
Expand Down Expand Up @@ -508,7 +508,7 @@
tags 'Questions'
produces 'application/json'

# get method on /api/v1/questions/show_all/questionnaire/{id} returns 200 succesful response when all questions with given questionnaire id are shown
# get method on /api/v1/questions/show_all/questionnaire/{id} returns 200 successful response when all questions with given questionnaire id are shown
response(200, 'successful') do
run_test! do
expect(Question.where(questionnaire_id: id).count).to eq(1)
Expand Down

0 comments on commit 9a9f34c

Please sign in to comment.