Skip to content
Open

lint #6732

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
242 changes: 0 additions & 242 deletions .standard_todo.yml

This file was deleted.

1 change: 1 addition & 0 deletions app/controllers/all_casa_admins/sessions_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,6 @@

class AllCasaAdmins::SessionsController < Devise::SessionsController
include Accessible

skip_before_action :check_user, only: :destroy
end
2 changes: 1 addition & 1 deletion app/controllers/casa_cases_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -184,7 +184,7 @@ def case_contact_csv_name(case_contacts)
casa_case_number = case_contacts&.first&.casa_case&.case_number
current_date = Time.now.strftime("%Y-%m-%d")

"#{casa_case_number.nil? ? "" : casa_case_number + "-"}case-contacts-#{current_date}.csv"
"#{casa_case_number + "-" unless casa_case_number.nil?}case-contacts-#{current_date}.csv"
end

def court_date_unknown?
Expand Down
1 change: 1 addition & 0 deletions app/controllers/emancipation_checklists_controller.rb
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
class EmancipationChecklistsController < ApplicationController
include DateHelper

before_action :require_organization!
after_action :verify_authorized

Expand Down
1 change: 1 addition & 0 deletions app/controllers/imports_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ class ImportsController < ApplicationController
require "csv"

include ActionView::Helpers::UrlHelper

before_action :failed_csv_service, only: [:create, :download_failed]
after_action :verify_authorized

Expand Down
1 change: 1 addition & 0 deletions app/controllers/users/sessions_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,6 @@

class Users::SessionsController < Devise::SessionsController
include Accessible

skip_before_action :check_user, only: :destroy
end
2 changes: 1 addition & 1 deletion app/datatables/volunteer_datatable.rb
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,7 @@ def transition_aged_youth_filter
filter = additional_filters[:transition_aged_youth]

bool_filter filter do
"transition_aged_youth_cases.volunteer_id IS #{(filter[0] == "true") ? "NOT" : nil} NULL"
"transition_aged_youth_cases.volunteer_id IS #{"NOT" if filter[0] == "true"} NULL"
end
}.call
end
Expand Down
1 change: 1 addition & 0 deletions app/decorators/contact_type_decorator.rb
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
class ContactTypeDecorator < Draper::Decorator
include ActionView::Helpers::DateHelper

delegate_all

def hash_for_multi_select_with_cases(casa_case_ids)
Expand Down
2 changes: 1 addition & 1 deletion app/helpers/phone_number_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,6 @@ def valid_phone_number(number)
end

def strip_unnecessary_characters(number)
number.gsub(/[()\+\s\-\.]/, "")
number.gsub(/[()+\s\-.]/, "")
end
end
1 change: 1 addition & 0 deletions app/models/casa_org.rb
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
class CasaOrg < ApplicationRecord
prepend ActiveSupport::ToJsonWithActiveSupportEncoder

# NOTE: location of the default report template
CASA_DEFAULT_COURT_REPORT = File.new(Rails.root.join("app/documents/templates/default_report_template.docx"), "r")
CASA_DEFAULT_LOGO = Rails.public_path.join("logo.jpeg")
Expand Down
1 change: 1 addition & 0 deletions app/models/case_contact.rb
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
class CaseContact < ApplicationRecord
include ByOrganizationScope

acts_as_paranoid

attr_accessor :duration_hours
Expand Down
1 change: 1 addition & 0 deletions app/models/concerns/api.rb
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
module Api
extend ActiveSupport::Concern

included do
has_one :api_credential, dependent: :destroy
after_create :initialize_api_credentials
Expand Down
1 change: 1 addition & 0 deletions app/notifications/delivery_methods/sms.rb
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
class DeliveryMethods::Sms < Noticed::DeliveryMethod
include SmsBodyHelper

def deliver
if sender.casa_admin? || sender.supervisor?
short_io_api = ShortUrlService.new
Expand Down
1 change: 1 addition & 0 deletions app/services/short_url_service.rb
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ class ShortUrlService
include ApiBaseHelper
include RequestHeaderHelper
include HTTParty

base_uri SHORT_IO
headers ACCEPT_JSON
headers CONTENT_TYPE_JSON
Expand Down
1 change: 1 addition & 0 deletions lib/tasks/example_recurring_task.rb
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
class ExampleRecurringTask
include Delayed::RecurringJob

run_every 1.day
run_at "11:00am"
timezone "US/Pacific"
Expand Down
1 change: 1 addition & 0 deletions spec/controllers/concerns/accessible_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
class MockController < ApplicationController
before_action :reset_session, only: :no_session_action
include Accessible

def action
render plain: "controller action test..."
end
Expand Down
1 change: 1 addition & 0 deletions spec/models/case_court_report_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@

RSpec.describe CaseCourtReport, type: :model do
include DownloadHelpers

let(:path_to_template) { Rails.root.join("app/documents/templates/default_report_template.docx").to_s }
let(:path_to_report) { Rails.root.join("tmp/test_report.docx").to_s }

Expand Down
1 change: 1 addition & 0 deletions spec/requests/case_court_reports_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

RSpec.describe "/case_court_reports", type: :request do
include DownloadHelpers

let(:volunteer) { create(:volunteer, :with_cases_and_contacts, :with_assigned_supervisor) }

before do
Expand Down
1 change: 1 addition & 0 deletions spec/requests/court_dates_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

RSpec.describe "/casa_cases/:casa_case_id/court_dates/:id", type: :request do
include DownloadHelpers

let(:admin) { create(:casa_admin) }
let(:casa_case) { court_date.casa_case }
let(:court_date) { create(:court_date) }
Expand Down
Loading