Skip to content

Commit

Permalink
Merge branch 'main' into rspec-github
Browse files Browse the repository at this point in the history
  • Loading branch information
runephilosof-abtion authored Sep 19, 2024
2 parents 8ba4213 + 3dc813d commit 73ed3e4
Show file tree
Hide file tree
Showing 12 changed files with 345 additions and 553 deletions.
4 changes: 2 additions & 2 deletions .tool-versions
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
ruby 3.3.3
nodejs 18.14.1
ruby 3.3.4
nodejs 22.9.0
8 changes: 3 additions & 5 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,7 @@
source "https://rubygems.org"
git_source(:github) { |repo| "https://github.com/#{repo}.git" }

# In bundler 2.4.22 you can do `ruby file: ".tool-versions"`, but heroku uses an old bundler
/^ruby (?<version>\d+\.\d+\.\d+)$/ =~ File.read(File.join(__dir__, ".tool-versions"))
ruby version
ruby file: ".tool-versions"

gem "awesome_print"
gem "bootsnap", ">= 1.4.4", require: false
Expand All @@ -23,7 +21,7 @@ gem "rack-attack"
gem "rails", "~> 7.1.3"
gem "rails-i18n"
gem "rollbar"
gem "shakapacker", "8.0.1"
gem "shakapacker", "8.0.2"
gem "sidekiq"
gem "tzinfo-data", platforms: [:mingw, :mswin, :x64_mingw, :jruby]

Expand All @@ -35,7 +33,7 @@ group :development, :test do
gem "factory_bot_rails"
gem "faker"
gem "i18n-tasks"
gem "rspec-rails", "~> 6.1.4"
gem "rspec-rails", "~> 7.0.1"
gem "selenium-webdriver", ">= 4.11"
gem "shoulda-matchers"
end
Expand Down
72 changes: 35 additions & 37 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -131,9 +131,9 @@ GEM
pwned (~> 2.4)
diff-lcs (1.5.1)
docile (1.4.1)
dotenv (3.1.2)
dotenv-rails (3.1.2)
dotenv (= 3.1.2)
dotenv (3.1.4)
dotenv-rails (3.1.4)
dotenv (= 3.1.4)
railties (>= 6.1)
drb (2.2.1)
erb_lint (0.6.0)
Expand All @@ -144,7 +144,7 @@ GEM
rubocop (>= 1)
smart_properties
erubi (1.13.0)
factory_bot (6.4.6)
factory_bot (6.5.0)
activesupport (>= 5.0.0)
factory_bot_rails (6.4.3)
factory_bot (~> 6.4)
Expand All @@ -157,7 +157,7 @@ GEM
hashdiff (1.1.1)
highline (3.1.1)
reline
i18n (1.14.5)
i18n (1.14.6)
concurrent-ruby (~> 1.0)
i18n-tasks (1.0.14)
activesupport (>= 4.0.2)
Expand Down Expand Up @@ -189,7 +189,7 @@ GEM
listen (3.9.0)
rb-fsevent (~> 0.10, >= 0.10.3)
rb-inotify (~> 0.9, >= 0.9.10)
logger (1.6.0)
logger (1.6.1)
lograge (0.14.0)
actionpack (>= 4)
activesupport (>= 4)
Expand All @@ -210,7 +210,7 @@ GEM
minitest (5.25.1)
msgpack (1.7.2)
mutex_m (0.2.0)
net-imap (0.4.15)
net-imap (0.4.16)
date
net-protocol
net-pop (0.1.2)
Expand All @@ -225,10 +225,10 @@ GEM
orm_adapter (0.5.0)
package_json (0.1.0)
parallel (1.26.3)
parser (3.3.4.2)
parser (3.3.5.0)
ast (~> 2.4.1)
racc
pg (1.5.7)
pg (1.5.8)
pivotal_git_scripts (1.4.0)
pry (0.14.2)
coderay (~> 1.1)
Expand All @@ -240,7 +240,7 @@ GEM
public_suffix (6.0.1)
puma (6.4.2)
nio4r (~> 2.0)
pundit (2.3.2)
pundit (2.4.0)
activesupport (>= 3.0.0)
pwned (2.4.1)
racc (1.8.1)
Expand Down Expand Up @@ -304,60 +304,59 @@ GEM
redis-client (0.22.2)
connection_pool
regexp_parser (2.9.2)
reline (0.5.9)
reline (0.5.10)
io-console (~> 0.5)
request_store (1.7.0)
rack (>= 1.4)
responders (3.1.1)
actionpack (>= 5.2)
railties (>= 5.2)
rexml (3.3.6)
strscan
rollbar (3.5.2)
rspec-core (3.13.0)
rexml (3.3.7)
rollbar (3.6.0)
rspec-core (3.13.1)
rspec-support (~> 3.13.0)
rspec-expectations (3.13.2)
rspec-expectations (3.13.3)
diff-lcs (>= 1.2.0, < 2.0)
rspec-support (~> 3.13.0)
rspec-github (2.4.0)
rspec-core (~> 3.0)
rspec-mocks (3.13.1)
diff-lcs (>= 1.2.0, < 2.0)
rspec-support (~> 3.13.0)
rspec-rails (6.1.4)
actionpack (>= 6.1)
activesupport (>= 6.1)
railties (>= 6.1)
rspec-rails (7.0.1)
actionpack (>= 7.0)
activesupport (>= 7.0)
railties (>= 7.0)
rspec-core (~> 3.13)
rspec-expectations (~> 3.13)
rspec-mocks (~> 3.13)
rspec-support (~> 3.13)
rspec-support (3.13.1)
rubocop (1.66.0)
rubocop (1.66.1)
json (~> 2.3)
language_server-protocol (>= 3.17.0)
parallel (~> 1.10)
parser (>= 3.3.0.2)
rainbow (>= 2.2.2, < 4.0)
regexp_parser (>= 2.4, < 3.0)
rubocop-ast (>= 1.32.1, < 2.0)
rubocop-ast (>= 1.32.2, < 2.0)
ruby-progressbar (~> 1.7)
unicode-display_width (>= 2.4.0, < 3.0)
rubocop-ast (1.32.1)
rubocop-ast (1.32.3)
parser (>= 3.3.1.0)
rubocop-capybara (2.21.0)
rubocop (~> 1.41)
rubocop-factory_bot (2.26.1)
rubocop (~> 1.61)
rubocop-performance (1.21.1)
rubocop-performance (1.22.1)
rubocop (>= 1.48.1, < 2.0)
rubocop-ast (>= 1.31.1, < 2.0)
rubocop-rails (2.25.1)
rubocop-rails (2.26.1)
activesupport (>= 4.2.0)
rack (>= 1.1)
rubocop (>= 1.33.0, < 2.0)
rubocop (>= 1.52.0, < 2.0)
rubocop-ast (>= 1.31.1, < 2.0)
rubocop-rspec (3.0.4)
rubocop-rspec (3.0.5)
rubocop (~> 1.61)
rubocop-rspec_rails (2.30.0)
rubocop (~> 1.61)
Expand All @@ -371,15 +370,15 @@ GEM
rubyzip (>= 1.2.2, < 3.0)
websocket (~> 1.0)
semantic_range (3.0.0)
shakapacker (8.0.1)
shakapacker (8.0.2)
activesupport (>= 5.2)
package_json
rack-proxy (>= 0.6.1)
railties (>= 5.2)
semantic_range (>= 2.3.0)
shoulda-matchers (6.4.0)
activesupport (>= 5.2.0)
sidekiq (7.3.1)
sidekiq (7.3.2)
concurrent-ruby (< 2)
connection_pool (>= 2.3.0)
logger
Expand All @@ -389,7 +388,7 @@ GEM
docile (~> 1.1)
simplecov-html (~> 0.11)
simplecov_json_formatter (~> 0.1)
simplecov-html (0.12.3)
simplecov-html (0.13.1)
simplecov_json_formatter (0.1.4)
smart_properties (1.17.0)
spring (4.2.1)
Expand All @@ -399,14 +398,13 @@ GEM
listen (>= 2.7, < 4.0)
spring (>= 4)
stringio (3.1.1)
strscan (3.1.0)
terminal-table (3.0.2)
unicode-display_width (>= 1.1.1, < 3)
thor (1.3.2)
timeout (0.4.1)
tzinfo (2.0.6)
concurrent-ruby (~> 1.0)
unicode-display_width (2.5.0)
unicode-display_width (2.6.0)
uniform_notifier (1.16.0)
warden (1.2.9)
rack (>= 2.0.9)
Expand All @@ -426,7 +424,7 @@ GEM
websocket-extensions (0.1.5)
xpath (3.2.0)
nokogiri (~> 1.8)
zeitwerk (2.6.17)
zeitwerk (2.6.18)

PLATFORMS
x86_64-linux
Expand Down Expand Up @@ -463,7 +461,7 @@ DEPENDENCIES
rails-i18n
rollbar
rspec-github
rspec-rails (~> 6.1.4)
rspec-rails (~> 7.0.1)
rubocop
rubocop-capybara
rubocop-factory_bot
Expand All @@ -472,7 +470,7 @@ DEPENDENCIES
rubocop-rspec
rubocop-rspec_rails
selenium-webdriver (>= 4.11)
shakapacker (= 8.0.1)
shakapacker (= 8.0.2)
shoulda-matchers
sidekiq
simplecov
Expand All @@ -484,7 +482,7 @@ DEPENDENCIES
webmock

RUBY VERSION
ruby 3.3.3p89
ruby 3.3.4p94

BUNDLED WITH
2.5.14
2.5.16
5 changes: 1 addition & 4 deletions app/javascript/components/Input/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,10 @@ import classNames from "classnames"
import { Size } from "~/const/size"
import "./index.scss"

const InputVariants = ["default", "error"] as const
export type InputVariant = (typeof InputVariants)[number]

export interface InputProps
extends Omit<React.InputHTMLAttributes<HTMLInputElement>, "size"> {
size?: Size
variant?: InputVariant
variant?: "default" | "error"
}

export default function Input(props: InputProps): JSX.Element {
Expand Down
2 changes: 2 additions & 0 deletions app/javascript/entrypoints/application.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,9 @@ require.context("../components", true, /(?<=\.scss)$/) // Only include scss file

// Add application wide CSS, we do this after the components
// because we want tailwind classes to override default component styling
/* eslint-disable @typescript-eslint/no-require-imports */
require("../application.scss")
/* eslint-enable @typescript-eslint/no-require-imports */

// Make components available for react_component helper
const componentsContext = require.context(
Expand Down
2 changes: 1 addition & 1 deletion app/javascript/jest.setup.ts
Original file line number Diff line number Diff line change
@@ -1 +1 @@
import "@testing-library/jest-dom/extend-expect"
import "@testing-library/jest-dom"
4 changes: 2 additions & 2 deletions app/javascript/util/getContrastColor.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
// This file uses js and commonjs to be compatible with tailwind config

/* eslint-disable @typescript-eslint/no-var-requires */
/* eslint-disable @typescript-eslint/no-var-requires, @typescript-eslint/no-require-imports */
const getLuminance = require("./getLuminance")
/* eslint-enable @typescript-eslint/no-var-requires */
/* eslint-enable @typescript-eslint/no-var-requires, @typescript-eslint/no-require-imports */

// Based on luminance, pick the best suited contrast color (dark/light) to the target color
module.exports = function getContrastColor(target, dark, light) {
Expand Down
4 changes: 2 additions & 2 deletions app/javascript/util/getLuminance.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
// This file uses js and commonjs to be compatible with tailwind config

/* eslint-disable @typescript-eslint/no-var-requires */
/* eslint-disable @typescript-eslint/no-var-requires, @typescript-eslint/no-require-imports */
const colorString = require("color-string")
/* eslint-enable @typescript-eslint/no-var-requires */
/* eslint-enable @typescript-eslint/no-var-requires, @typescript-eslint/no-require-imports */

// The calculation is based on the following algorithm:
// https://www.w3.org/TR/2008/REC-WCAG20-20081211/#relativeluminancedef
Expand Down
4 changes: 2 additions & 2 deletions app/javascript/util/prepareColorVariables.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
// This file uses js and commonjs to be compatible with tailwind config

/* eslint-disable @typescript-eslint/no-var-requires */
/* eslint-disable @typescript-eslint/no-var-requires, @typescript-eslint/no-require-imports */
const getContrastColor = require("./getContrastColor")
/* eslint-enable @typescript-eslint/no-var-requires */
/* eslint-enable @typescript-eslint/no-var-requires, @typescript-eslint/no-require-imports */

// Prepare colors for usage in tailwind config and as css variables
module.exports = function prepareColorVariables(jsonColors) {
Expand Down
2 changes: 1 addition & 1 deletion config/initializers/locale.rb
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,6 @@ module ProjectNamePascal
class Application < Rails::Application
config.i18n.available_locales = [:da, :en]
config.i18n.default_locale = ENV.fetch("LOCALE", "en")
config.i18n.load_path += Dir[Rails.root.join("config", "locales", "**", "*.yml")]
config.i18n.load_path += Rails.root.glob("config/locales/**/*.yml")
end
end
Loading

0 comments on commit 73ed3e4

Please sign in to comment.