1
0
Fork 0
mirror of https://github.com/maybe-finance/maybe.git synced 2025-07-18 20:59:39 +02:00

Fix remaining rubocop offenses
Some checks failed
Publish Docker image / ci (push) Has been cancelled
Publish Docker image / Build docker image (push) Has been cancelled

- Fix string literal style in doorkeeper.rb
- Add missing final newlines
- Remove trailing whitespace
- Fix array bracket spacing in migrations

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
Josh Pigford 2025-06-18 08:38:04 -05:00
parent 8296e10246
commit 7aca5a2277
7 changed files with 10 additions and 10 deletions

View file

@ -313,7 +313,7 @@ Doorkeeper.configure do
# for example. # for example.
# #
# Block javascript URIs but allow custom schemes # Block javascript URIs but allow custom schemes
forbid_redirect_uri { |uri| uri.scheme.to_s.downcase == 'javascript' } forbid_redirect_uri { |uri| uri.scheme.to_s.downcase == "javascript" }
# Allows to set blank redirect URIs for Applications in case Doorkeeper configured # Allows to set blank redirect URIs for Applications in case Doorkeeper configured
# to use URI-less OAuth grant flows like Client Credentials or Resource Owner # to use URI-less OAuth grant flows like Client Credentials or Resource Owner

View file

@ -3,4 +3,4 @@ Rails.application.config.to_prepare do
Doorkeeper::AuthorizationsController.layout "doorkeeper/application" Doorkeeper::AuthorizationsController.layout "doorkeeper/application"
Doorkeeper::AuthorizedApplicationsController.layout "doorkeeper/application" Doorkeeper::AuthorizedApplicationsController.layout "doorkeeper/application"
Doorkeeper::ApplicationsController.layout "doorkeeper/application" Doorkeeper::ApplicationsController.layout "doorkeeper/application"
end end

View file

@ -189,7 +189,7 @@ Rails.application.routes.draw do
post "auth/signup", to: "auth#signup" post "auth/signup", to: "auth#signup"
post "auth/login", to: "auth#login" post "auth/login", to: "auth#login"
post "auth/refresh", to: "auth#refresh" post "auth/refresh", to: "auth#refresh"
# Production API endpoints # Production API endpoints
resources :accounts, only: [ :index ] resources :accounts, only: [ :index ]
resources :transactions, only: [ :index, :show, :create, :update, :destroy ] resources :transactions, only: [ :index, :show, :create, :update, :destroy ]

View file

@ -1,6 +1,6 @@
class AddSourceToApiKeys < ActiveRecord::Migration[7.2] class AddSourceToApiKeys < ActiveRecord::Migration[7.2]
def change def change
add_column :api_keys, :source, :string, default: "web" add_column :api_keys, :source, :string, default: "web"
add_index :api_keys, [:user_id, :source] add_index :api_keys, [ :user_id, :source ]
end end
end end

View file

@ -12,6 +12,6 @@ class CreateMobileDevices < ActiveRecord::Migration[7.2]
t.timestamps t.timestamps
end end
add_index :mobile_devices, :device_id, unique: true add_index :mobile_devices, :device_id, unique: true
add_index :mobile_devices, [:user_id, :device_id], unique: true add_index :mobile_devices, [ :user_id, :device_id ], unique: true
end end
end end

View file

@ -2,6 +2,6 @@ class AddOwnerToOauthApplications < ActiveRecord::Migration[7.2]
def change def change
add_column :oauth_applications, :owner_id, :uuid add_column :oauth_applications, :owner_id, :uuid
add_column :oauth_applications, :owner_type, :string add_column :oauth_applications, :owner_type, :string
add_index :oauth_applications, [:owner_id, :owner_type] add_index :oauth_applications, [ :owner_id, :owner_type ]
end end
end end

View file

@ -39,7 +39,7 @@ class Api::V1::AuthControllerTest < ActionDispatch::IntegrationTest
assert_equal "newuser@example.com", response_data["user"]["email"] assert_equal "newuser@example.com", response_data["user"]["email"]
assert_equal "New", response_data["user"]["first_name"] assert_equal "New", response_data["user"]["first_name"]
assert_equal "User", response_data["user"]["last_name"] assert_equal "User", response_data["user"]["last_name"]
# OAuth token assertions # OAuth token assertions
assert response_data["access_token"].present? assert response_data["access_token"].present?
assert response_data["refresh_token"].present? assert response_data["refresh_token"].present?
@ -217,7 +217,7 @@ class Api::V1::AuthControllerTest < ActionDispatch::IntegrationTest
assert_equal user.id.to_s, response_data["user"]["id"] assert_equal user.id.to_s, response_data["user"]["id"]
assert_equal user.email, response_data["user"]["email"] assert_equal user.email, response_data["user"]["email"]
# OAuth token assertions # OAuth token assertions
assert response_data["access_token"].present? assert response_data["access_token"].present?
assert response_data["refresh_token"].present? assert response_data["refresh_token"].present?
@ -351,7 +351,7 @@ class Api::V1::AuthControllerTest < ActionDispatch::IntegrationTest
user = users(:family_admin) user = users(:family_admin)
device = user.mobile_devices.create!(@device_info) device = user.mobile_devices.create!(@device_info)
oauth_app = device.create_oauth_application! oauth_app = device.create_oauth_application!
# Create initial token # Create initial token
initial_token = Doorkeeper::AccessToken.create!( initial_token = Doorkeeper::AccessToken.create!(
application: oauth_app, application: oauth_app,
@ -407,4 +407,4 @@ class Api::V1::AuthControllerTest < ActionDispatch::IntegrationTest
response_data = JSON.parse(response.body) response_data = JSON.parse(response.body)
assert_equal "Refresh token is required", response_data["error"] assert_equal "Refresh token is required", response_data["error"]
end end
end end