-
Notifications
You must be signed in to change notification settings - Fork 0
Apply fixes from CodeFactor #15
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Closed
Closed
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,71 +1,71 @@ | ||
| source "https://rubygems.org" | ||
| source 'https://rubygems.org' | ||
|
|
||
| # Bundle edge Rails instead: gem "rails", github: "rails/rails", branch: "main" | ||
| gem "rails", "~> 8.1.2" | ||
| gem 'rails', '~> 8.1.2' | ||
| # The modern asset pipeline for Rails [https://github.com/rails/propshaft] | ||
| gem "propshaft" | ||
| gem 'propshaft' | ||
| # Use postgresql as the database for Active Record | ||
| gem "pg", "~> 1.1" | ||
| gem 'pg', '~> 1.1' | ||
| # Use the Puma web server [https://github.com/puma/puma] | ||
| gem "puma", ">= 5.0" | ||
| gem 'puma', '>= 5.0' | ||
| # Use JavaScript with ESM import maps [https://github.com/rails/importmap-rails] | ||
| gem "importmap-rails" | ||
| gem 'importmap-rails' | ||
| # Hotwire's SPA-like page accelerator [https://turbo.hotwired.dev] | ||
| gem "turbo-rails" | ||
| gem 'turbo-rails' | ||
| # Hotwire's modest JavaScript framework [https://stimulus.hotwired.dev] | ||
| gem "stimulus-rails" | ||
| gem 'stimulus-rails' | ||
| # Build JSON APIs with ease [https://github.com/rails/jbuilder] | ||
| gem "jbuilder" | ||
| gem 'jbuilder' | ||
| # Use Tailwind CSS [https://github.com/rails/tailwindcss-rails] | ||
| gem "tailwindcss-rails" | ||
| gem 'tailwindcss-rails' | ||
|
|
||
| # Use Active Model has_secure_password [https://guides.rubyonrails.org/active_model_basics.html#securepassword] | ||
| # gem "bcrypt", "~> 3.1.7" | ||
|
|
||
| # Windows does not include zoneinfo files, so bundle the tzinfo-data gem | ||
| gem "tzinfo-data", platforms: %i[ windows jruby ] | ||
| gem 'tzinfo-data', platforms: %i[ windows jruby ] | ||
|
Check notice on line 26 in Gemfile
|
||
|
|
||
| # Use the database-backed adapters for Rails.cache, Active Job, and Action Cable | ||
| gem "solid_cache" | ||
| gem "solid_queue" | ||
| gem "solid_cable" | ||
| gem 'solid_cache' | ||
| gem 'solid_queue' | ||
| gem 'solid_cable' | ||
|
|
||
| # Reduces boot times through caching; required in config/boot.rb | ||
| gem "bootsnap", require: false | ||
| gem 'bootsnap', require: false | ||
|
|
||
| # Deploy this application anywhere as a Docker container [https://kamal-deploy.org] | ||
| gem "kamal", require: false | ||
| gem 'kamal', require: false | ||
|
|
||
| # Add HTTP asset caching/compression and X-Sendfile acceleration to Puma [https://github.com/basecamp/thruster/] | ||
| gem "thruster", require: false | ||
| gem 'thruster', require: false | ||
|
|
||
| # Use Active Storage variants [https://guides.rubyonrails.org/active_storage_overview.html#transforming-images] | ||
| gem "image_processing", "~> 1.2" | ||
| gem 'image_processing', '~> 1.2' | ||
|
|
||
| # Pagination [https://github.com/kaminari/kaminari] | ||
| gem "kaminari" | ||
| gem 'kaminari' | ||
|
|
||
| group :development, :test do | ||
| # See https://guides.rubyonrails.org/debugging_rails_applications.html#debugging-with-the-debug-gem | ||
| gem "debug", platforms: %i[ mri windows ], require: "debug/prelude" | ||
| gem 'debug', platforms: %i[ mri windows ], require: 'debug/prelude' | ||
|
Check notice on line 50 in Gemfile
|
||
|
|
||
| # Audits gems for known security defects (use config/bundler-audit.yml to ignore issues) | ||
| gem "bundler-audit", require: false | ||
| gem 'bundler-audit', require: false | ||
|
|
||
| # Static analysis for security vulnerabilities [https://brakemanscanner.org/] | ||
| gem "brakeman", require: false | ||
| gem 'brakeman', require: false | ||
|
|
||
| # Omakase Ruby styling [https://github.com/rails/rubocop-rails-omakase/] | ||
| gem "rubocop-rails-omakase", require: false | ||
| gem 'rubocop-rails-omakase', require: false | ||
|
|
||
| # Testing | ||
| gem "rspec-rails" | ||
| gem "factory_bot_rails" | ||
| gem "shoulda-matchers" | ||
| gem "simplecov", require: false | ||
| gem 'rspec-rails' | ||
| gem 'factory_bot_rails' | ||
| gem 'shoulda-matchers' | ||
| gem 'simplecov', require: false | ||
| end | ||
|
|
||
| group :development do | ||
| # Use console on exceptions pages [https://github.com/rails/web-console] | ||
| gem "web-console" | ||
| gem 'web-console' | ||
| end | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,8 +1,8 @@ | ||
| module ApplicationHelper | ||
| def sanitize_url(url) | ||
| uri = URI.parse(url.to_s) | ||
| uri.scheme&.match?(/\Ahttps?\z/i) ? url : "#" | ||
| uri.scheme&.match?(/\Ahttps?\z/i) ? url : '#' | ||
| rescue URI::InvalidURIError | ||
| "#" | ||
| '#' | ||
| end | ||
| end |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,4 +1,4 @@ | ||
| class ApplicationMailer < ActionMailer::Base | ||
| default from: "from@example.com" | ||
| layout "mailer" | ||
| default from: 'from@example.com' | ||
| layout 'mailer' | ||
| end |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,4 +1,4 @@ | ||
| ENV["BUNDLE_GEMFILE"] ||= File.expand_path("../Gemfile", __dir__) | ||
| ENV['BUNDLE_GEMFILE'] ||= File.expand_path('../Gemfile', __dir__) | ||
|
|
||
| require "bundler/setup" # Set up gems listed in the Gemfile. | ||
| require "bootsnap/setup" # Speed up boot time by caching expensive operations. | ||
| require 'bundler/setup' # Set up gems listed in the Gemfile. | ||
| require 'bootsnap/setup' # Speed up boot time by caching expensive operations. | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,5 +1,5 @@ | ||
| # Load the Rails application. | ||
| require_relative "application" | ||
| require_relative 'application' | ||
|
|
||
| # Initialize the Rails application. | ||
| Rails.application.initialize! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,7 +1,7 @@ | ||
| # Pin npm packages by running ./bin/importmap | ||
|
|
||
| pin "application" | ||
| pin "@hotwired/turbo-rails", to: "turbo.min.js" | ||
| pin "@hotwired/stimulus", to: "stimulus.min.js" | ||
| pin "@hotwired/stimulus-loading", to: "stimulus-loading.js" | ||
| pin_all_from "app/javascript/controllers", under: "controllers" | ||
| pin 'application' | ||
| pin '@hotwired/turbo-rails', to: 'turbo.min.js' | ||
| pin '@hotwired/stimulus', to: 'stimulus.min.js' | ||
| pin '@hotwired/stimulus-loading', to: 'stimulus-loading.js' | ||
| pin_all_from 'app/javascript/controllers', under: 'controllers' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,7 +1,7 @@ | ||
| # Be sure to restart your server when you modify this file. | ||
|
|
||
| # Version of your assets, change this if you want to expire all your assets. | ||
| Rails.application.config.assets.version = "1.0" | ||
| Rails.application.config.assets.version = '1.0' | ||
|
|
||
| # Add additional assets to the asset load path. | ||
| # Rails.application.config.assets.paths << Emoji.images_path |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,9 +1,9 @@ | ||
| Rails.application.routes.draw do | ||
| root "creators#index" | ||
| root 'creators#index' | ||
|
|
||
| resources :creators, only: [ :index, :show ] do | ||
| resources :contents, except: [ :index, :show ] | ||
| end | ||
|
|
||
| get "up" => "rails/health#show", as: :rails_health_check | ||
| get 'up' => 'rails/health#show', as: :rails_health_check | ||
| end |
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do not use spaces inside percent literal delimiters.