Skip to content

Commit

Permalink
Merge branch 'main' into werebus/rubocop
Browse files Browse the repository at this point in the history
  • Loading branch information
werebus authored Oct 30, 2024
2 parents f2effa5 + e1d061b commit 1dc3fae
Show file tree
Hide file tree
Showing 21 changed files with 15 additions and 7 deletions.
10 changes: 5 additions & 5 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ GEM
capistrano (~> 3.0)
capistrano-pending (0.2.0)
capistrano (>= 3.2.0)
capistrano-rails (1.6.1)
capistrano-rails (1.6.3)
capistrano (~> 3.1)
capistrano-bundler (>= 1.1, < 3)
capistrano-yarn (2.0.2)
Expand Down Expand Up @@ -203,7 +203,7 @@ GEM
parser (3.3.5.0)
ast (~> 2.4.1)
racc
phonelib (0.9.2)
phonelib (0.9.3)
pry (0.14.2)
coderay (~> 1.1)
method_source (~> 1.0)
Expand Down Expand Up @@ -297,7 +297,7 @@ GEM
rubocop-ast (>= 1.32.2, < 2.0)
ruby-progressbar (~> 1.7)
unicode-display_width (>= 2.4.0, < 3.0)
rubocop-ast (1.32.3)
rubocop-ast (1.33.0)
parser (>= 3.3.1.0)
rubocop-capybara (2.21.0)
rubocop (~> 1.41)
Expand All @@ -306,12 +306,12 @@ GEM
rubocop-performance (1.22.1)
rubocop (>= 1.48.1, < 2.0)
rubocop-ast (>= 1.31.1, < 2.0)
rubocop-rails (2.26.2)
rubocop-rails (2.27.0)
activesupport (>= 4.2.0)
rack (>= 1.1)
rubocop (>= 1.52.0, < 2.0)
rubocop-ast (>= 1.31.1, < 2.0)
rubocop-rspec (3.1.0)
rubocop-rspec (3.2.0)
rubocop (~> 1.61)
rubocop-rspec_rails (2.30.0)
rubocop (~> 1.61)
Expand Down
2 changes: 1 addition & 1 deletion app/controllers/application_controller.rb
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# frozen_string_literal: true

class ApplicationController < ActionController::Base
before_action :check_primary_account, :set_current_user, :set_roster, :set_paper_trail_whodunnit
before_action :check_primary_account, :set_current_user, :set_roster

def self.api_accessible(**options)
skip_before_action :check_primary_account, :set_current_user, **options
Expand Down
7 changes: 7 additions & 0 deletions app/models/current.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,11 @@

class Current < ActiveSupport::CurrentAttributes
attribute :user

resets { PaperTrail.request.whodunnit if PaperTrail.request.enabled? }

def user=(user)
PaperTrail.request.whodunnit = user&.id if PaperTrail.request.enabled?
super
end
end
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion coverage/.last_run.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"result": {
"line": 99.25
"line": 99.26
}
}
1 change: 1 addition & 0 deletions spec/spec_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
require 'rspec/rails'
require 'rack_session_access/capybara'
require 'umts_custom_matchers'
require 'paper_trail/frameworks/rspec'

ActiveRecord::Migration.maintain_test_schema!
Timecop.safe_mode = true
Expand Down

0 comments on commit 1dc3fae

Please sign in to comment.