Skip to content
Merged
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
6 changes: 0 additions & 6 deletions .rubocop_todo.yml
Original file line number Diff line number Diff line change
Expand Up @@ -407,12 +407,6 @@ Style/NestedParenthesizedCalls:
Style/Next:
Enabled: false

# Offense count: 4
# Cop supports --auto-correct.
# Configuration parameters: IncludeSemanticChanges.
Style/NonNilCheck:
Enabled: false

# Offense count: 10
# Cop supports --auto-correct.
# Configuration parameters: AllowSafeAssignment.
Expand Down
4 changes: 2 additions & 2 deletions dashboard/lib/json_value.rb
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
# Utility for formatting JSON values from string input
class JSONValue
def self.numeric?(val)
Float(val) != nil rescue false
!Float(val).nil? rescue false
end

def self.integral?(val)
Integer(val) != nil rescue false
!Integer(val).nil? rescue false
end

def self.boolean?(val)
Expand Down
4 changes: 2 additions & 2 deletions dashboard/test/controllers/activities_controller_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -920,7 +920,7 @@ def _test_logged_in_milestone_with_image(async_activity_writes:)

@controller.stubs(:find_share_failure).raises(OpenURI::HTTPError.new('something broke', 'fake io'))
@controller.expects(:slog).with(:tag, :error, :level_source_id) do |params|
params[:tag] == 'share_checking_error' && params[:error] == 'OpenURI::HTTPError: something broke' && params[:level_source_id] != nil
params[:tag] == 'share_checking_error' && params[:error] == 'OpenURI::HTTPError: something broke' && !params[:level_source_id].nil?
end
@controller.expects(:slog).with(:tag) {|params| params[:tag] == 'activity_finish' }

Expand All @@ -937,7 +937,7 @@ def _test_logged_in_milestone_with_image(async_activity_writes:)
# allow sharing when there's an error, slog so it's possible to look up and review later

@controller.expects(:slog).with(:tag, :error, :level_source_id) do |params|
params[:tag] == 'share_checking_error' && params[:error] == 'IO::EAGAINWaitReadable: Resource temporarily unavailable' && params[:level_source_id] != nil
params[:tag] == 'share_checking_error' && params[:error] == 'IO::EAGAINWaitReadable: Resource temporarily unavailable' && !params[:level_source_id].nil?
end
@controller.expects(:slog).with(:tag) {|params| params[:tag] == 'activity_finish' }

Expand Down