From fb0c4b302b8560e90f20b4d502c82f4abc1830fd Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 19 Nov 2024 01:07:34 +0000 Subject: [PATCH 01/13] Bump cross-spawn from 7.0.3 to 7.0.6 Bumps [cross-spawn](https://github.com/moxystudio/node-cross-spawn) from 7.0.3 to 7.0.6. - [Changelog](https://github.com/moxystudio/node-cross-spawn/blob/master/CHANGELOG.md) - [Commits](https://github.com/moxystudio/node-cross-spawn/compare/v7.0.3...v7.0.6) --- updated-dependencies: - dependency-name: cross-spawn dependency-type: indirect ... Signed-off-by: dependabot[bot] --- yarn.lock | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/yarn.lock b/yarn.lock index c07cad5..bc494f1 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1301,9 +1301,9 @@ core-js-compat@^3.38.0, core-js-compat@^3.38.1: browserslist "^4.24.2" cross-spawn@^7.0.3: - version "7.0.3" - resolved "https://registry.yarnpkg.com/cross-spawn/-/cross-spawn-7.0.3.tgz#f73a85b9d5d41d045551c177e2882d4ac85728a6" - integrity sha512-iRDPJKUPVEND7dHPO8rkbOnPpyDygcDFtWjpeWNCgy8WP2rXcxXL8TskReQl6OrB2G7+UJrags1q15Fudc7G6w== + version "7.0.6" + resolved "https://registry.yarnpkg.com/cross-spawn/-/cross-spawn-7.0.6.tgz#8a58fe78f00dcd70c370451759dfbfaf03e8ee9f" + integrity sha512-uV2QOWP2nWzsy2aMp8aRibhi9dlzF5Hgh5SHaB9OiTGEyDTiJJyx0uy51QXdyWbtAHNua4XJzUKca3OzKUd3vA== dependencies: path-key "^3.1.0" shebang-command "^2.0.0" From 8c4f3575c0e3bed2108bea8204a66ef3a1d29e60 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 2 Dec 2024 22:12:07 +0000 Subject: [PATCH 02/13] Bump rails-html-sanitizer from 1.6.0 to 1.6.1 Bumps [rails-html-sanitizer](https://github.com/rails/rails-html-sanitizer) from 1.6.0 to 1.6.1. - [Release notes](https://github.com/rails/rails-html-sanitizer/releases) - [Changelog](https://github.com/rails/rails-html-sanitizer/blob/main/CHANGELOG.md) - [Commits](https://github.com/rails/rails-html-sanitizer/compare/v1.6.0...v1.6.1) --- updated-dependencies: - dependency-name: rails-html-sanitizer dependency-type: indirect ... Signed-off-by: dependabot[bot] --- Gemfile.lock | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/Gemfile.lock b/Gemfile.lock index 960eb3f..80aefde 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -181,7 +181,7 @@ GEM marcel (1.0.4) matrix (0.4.2) mini_mime (1.1.5) - mini_portile2 (2.8.7) + mini_portile2 (2.8.8) minitest (5.25.1) msgpack (1.7.3) mutex_m (0.2.0) @@ -201,7 +201,7 @@ GEM net-protocol net-ssh (7.3.0) nio4r (2.7.4) - nokogiri (1.16.7) + nokogiri (1.16.8) mini_portile2 (~> 2.8.2) racc (~> 1.4) orm_adapter (0.5.0) @@ -248,9 +248,9 @@ GEM activesupport (>= 4.2) choice (~> 0.2.0) ruby-graphviz (~> 1.2) - rails-html-sanitizer (1.6.0) + rails-html-sanitizer (1.6.1) loofah (~> 2.21) - nokogiri (~> 1.14) + nokogiri (>= 1.15.7, != 1.16.7, != 1.16.6, != 1.16.5, != 1.16.4, != 1.16.3, != 1.16.2, != 1.16.1, != 1.16.0.rc1, != 1.16.0) railties (7.1.5) actionpack (= 7.1.5) activesupport (= 7.1.5) From 5ae935deed7ea9e83172589bec605b3e4bf14273 Mon Sep 17 00:00:00 2001 From: Taketo Takashima Date: Thu, 12 Dec 2024 22:22:42 +0900 Subject: [PATCH 03/13] Update gem & npm --- Gemfile.lock | 51 +++--- yarn.lock | 493 +++++++++++++++++++++++++-------------------------- 2 files changed, 266 insertions(+), 278 deletions(-) diff --git a/Gemfile.lock b/Gemfile.lock index 80aefde..92db073 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -85,14 +85,14 @@ GEM awesome_print (1.9.2) base64 (0.2.0) bcrypt (3.1.20) - benchmark (0.3.0) + benchmark (0.4.0) bigdecimal (3.1.8) bootsnap (1.18.4) msgpack (~> 1.2) breadcrumbs_on_rails (4.1.0) railties (>= 5.0) builder (3.3.0) - capistrano (3.19.1) + capistrano (3.19.2) airbrussh (>= 1.0.0) i18n rake (>= 10.0.0) @@ -125,7 +125,7 @@ GEM concurrent-ruby (1.3.4) connection_pool (2.4.1) crass (1.0.6) - date (3.4.0) + date (3.4.1) debug (1.9.2) irb (~> 1.10) reline (>= 0.3.8) @@ -148,8 +148,8 @@ GEM activesupport (>= 6.1) i18n (1.14.6) concurrent-ruby (~> 1.0) - io-console (0.7.2) - irb (1.14.1) + io-console (0.8.0) + irb (1.14.2) rdoc (>= 4.0.0) reline (>= 0.4.2) jbuilder (2.13.0) @@ -169,7 +169,7 @@ GEM activerecord kaminari-core (= 1.2.2) kaminari-core (1.2.2) - logger (1.6.1) + logger (1.6.2) loofah (2.23.1) crass (~> 1.0.2) nokogiri (>= 1.12.0) @@ -182,11 +182,11 @@ GEM matrix (0.4.2) mini_mime (1.1.5) mini_portile2 (2.8.8) - minitest (5.25.1) - msgpack (1.7.3) - mutex_m (0.2.0) + minitest (5.25.4) + msgpack (1.7.5) + mutex_m (0.3.0) mysql2 (0.5.6) - net-imap (0.5.0) + net-imap (0.5.1) date net-protocol net-pop (0.1.2) @@ -201,15 +201,16 @@ GEM net-protocol net-ssh (7.3.0) nio4r (2.7.4) - nokogiri (1.16.8) + nokogiri (1.17.1) mini_portile2 (~> 2.8.2) racc (~> 1.4) orm_adapter (0.5.0) - ostruct (0.6.0) - psych (5.1.2) + ostruct (0.6.1) + psych (5.2.1) + date stringio public_suffix (6.0.1) - puma (6.4.3) + puma (6.5.0) nio4r (~> 2.0) racc (1.8.1) rack (3.1.8) @@ -219,7 +220,7 @@ GEM rack (>= 3.0.0) rack-test (2.1.0) rack (>= 1.3) - rackup (2.2.0) + rackup (2.2.1) rack (>= 3) rails (7.1.5) actioncable (= 7.1.5) @@ -264,10 +265,10 @@ GEM activerecord (>= 6.1.5) activesupport (>= 6.1.5) i18n - rdoc (6.7.0) + rdoc (6.8.1) psych (>= 4.0.0) - regexp_parser (2.9.2) - reline (0.5.10) + regexp_parser (2.9.3) + reline (0.5.12) io-console (~> 0.5) responders (3.1.1) actionpack (>= 5.2) @@ -281,7 +282,7 @@ GEM rspec-mocks (3.13.2) diff-lcs (>= 1.2.0, < 2.0) rspec-support (~> 3.13.0) - rspec-rails (7.0.1) + rspec-rails (7.1.0) actionpack (>= 7.0) activesupport (>= 7.0) railties (>= 7.0) @@ -289,12 +290,12 @@ GEM rspec-expectations (~> 3.13) rspec-mocks (~> 3.13) rspec-support (~> 3.13) - rspec-support (3.13.1) + rspec-support (3.13.2) ruby-graphviz (1.2.5) rexml rubyzip (2.3.2) - securerandom (0.3.1) - selenium-webdriver (4.26.0) + securerandom (0.4.0) + selenium-webdriver (4.27.0) base64 (~> 0.2) logger (~> 1.4) rexml (~> 3.2, >= 3.2.5) @@ -321,11 +322,11 @@ GEM net-sftp (>= 2.1.2) net-ssh (>= 2.8.0) ostruct - stringio (3.1.1) + stringio (3.1.2) temple (0.10.3) thor (1.3.2) tilt (2.4.0) - timeout (0.4.1) + timeout (0.4.2) tzinfo (2.0.6) concurrent-ruby (~> 1.0) warden (1.2.9) @@ -375,4 +376,4 @@ DEPENDENCIES tzinfo-data BUNDLED WITH - 2.5.23 + 2.5.22 diff --git a/yarn.lock b/yarn.lock index bc494f1..793782f 100644 --- a/yarn.lock +++ b/yarn.lock @@ -10,7 +10,7 @@ "@jridgewell/gen-mapping" "^0.3.5" "@jridgewell/trace-mapping" "^0.3.24" -"@babel/code-frame@^7.25.9", "@babel/code-frame@^7.26.0": +"@babel/code-frame@^7.25.9", "@babel/code-frame@^7.26.0", "@babel/code-frame@^7.26.2": version "7.26.2" resolved "https://registry.yarnpkg.com/@babel/code-frame/-/code-frame-7.26.2.tgz#4b5fab97d33338eff916235055f0ebc21e573a85" integrity sha512-RJlIHRueQgwWitWgF8OdFYGZX328Ax5BCemNGlqHfplnRT9ESi8JkFlvaVYbS+UubVY6dpv87Fs2u5M29iNFVQ== @@ -20,9 +20,9 @@ picocolors "^1.0.0" "@babel/compat-data@^7.22.6", "@babel/compat-data@^7.25.9", "@babel/compat-data@^7.26.0": - version "7.26.2" - resolved "https://registry.yarnpkg.com/@babel/compat-data/-/compat-data-7.26.2.tgz#278b6b13664557de95b8f35b90d96785850bb56e" - integrity sha512-Z0WgzSEa+aUcdiJuCIqgujCshpMWgUpgOxXotrYPSA53hA3qopNaqcJpyr0hVb1FeWdnqFA35/fUtXgBK8srQg== + version "7.26.3" + resolved "https://registry.yarnpkg.com/@babel/compat-data/-/compat-data-7.26.3.tgz#99488264a56b2aded63983abd6a417f03b92ed02" + integrity sha512-nHIxvKPniQXpmQLb0vhY3VaFb3S0YrTAwpOWJZh1wn3oJPjJk9Asva204PsBdmAE8vpzfHudT8DB0scYvy9q0g== "@babel/core@^7.18.6": version "7.26.0" @@ -45,13 +45,13 @@ json5 "^2.2.3" semver "^6.3.1" -"@babel/generator@^7.25.9", "@babel/generator@^7.26.0": - version "7.26.2" - resolved "https://registry.yarnpkg.com/@babel/generator/-/generator-7.26.2.tgz#87b75813bec87916210e5e01939a4c823d6bb74f" - integrity sha512-zevQbhbau95nkoxSq3f/DC/SC+EEOUZd3DYqfSkMhY2/wfSeaHV1Ew4vk8e+x8lja31IbyuUa2uQ3JONqKbysw== +"@babel/generator@^7.26.0", "@babel/generator@^7.26.3": + version "7.26.3" + resolved "https://registry.yarnpkg.com/@babel/generator/-/generator-7.26.3.tgz#ab8d4360544a425c90c248df7059881f4b2ce019" + integrity sha512-6FF/urZvD0sTeO7k6/B15pMLC4CHUv1426lzr3N01aHJTl046uCAh9LXW/fzeXXjPNCJ6iABW5XaWOsIZB93aQ== dependencies: - "@babel/parser" "^7.26.2" - "@babel/types" "^7.26.0" + "@babel/parser" "^7.26.3" + "@babel/types" "^7.26.3" "@jridgewell/gen-mapping" "^0.3.5" "@jridgewell/trace-mapping" "^0.3.25" jsesc "^3.0.2" @@ -63,14 +63,6 @@ dependencies: "@babel/types" "^7.25.9" -"@babel/helper-builder-binary-assignment-operator-visitor@^7.25.9": - version "7.25.9" - resolved "https://registry.yarnpkg.com/@babel/helper-builder-binary-assignment-operator-visitor/-/helper-builder-binary-assignment-operator-visitor-7.25.9.tgz#f41752fe772a578e67286e6779a68a5a92de1ee9" - integrity sha512-C47lC7LIDCnz0h4vai/tpNOI95tCd5ZT3iBt/DBH5lXKHZsyNQv18yf1wIIg2ntiQNgmAvA+DgZ82iW8Qdym8g== - dependencies: - "@babel/traverse" "^7.25.9" - "@babel/types" "^7.25.9" - "@babel/helper-compilation-targets@^7.22.6", "@babel/helper-compilation-targets@^7.25.9": version "7.25.9" resolved "https://registry.yarnpkg.com/@babel/helper-compilation-targets/-/helper-compilation-targets-7.25.9.tgz#55af025ce365be3cdc0c1c1e56c6af617ce88875" @@ -96,18 +88,18 @@ semver "^6.3.1" "@babel/helper-create-regexp-features-plugin@^7.18.6", "@babel/helper-create-regexp-features-plugin@^7.25.9": - version "7.25.9" - resolved "https://registry.yarnpkg.com/@babel/helper-create-regexp-features-plugin/-/helper-create-regexp-features-plugin-7.25.9.tgz#3e8999db94728ad2b2458d7a470e7770b7764e26" - integrity sha512-ORPNZ3h6ZRkOyAa/SaHU+XsLZr0UQzRwuDQ0cczIA17nAzZ+85G5cVkOJIj7QavLZGSe8QXUmNFxSZzjcZF9bw== + version "7.26.3" + resolved "https://registry.yarnpkg.com/@babel/helper-create-regexp-features-plugin/-/helper-create-regexp-features-plugin-7.26.3.tgz#5169756ecbe1d95f7866b90bb555b022595302a0" + integrity sha512-G7ZRb40uUgdKOQqPLjfD12ZmGA54PzqDFUv2BKImnC9QIfGhIHKvVML0oN8IUiDq4iRqpq74ABpvOaerfWdong== dependencies: "@babel/helper-annotate-as-pure" "^7.25.9" - regexpu-core "^6.1.1" + regexpu-core "^6.2.0" semver "^6.3.1" -"@babel/helper-define-polyfill-provider@^0.6.2": - version "0.6.2" - resolved "https://registry.yarnpkg.com/@babel/helper-define-polyfill-provider/-/helper-define-polyfill-provider-0.6.2.tgz#18594f789c3594acb24cfdb4a7f7b7d2e8bd912d" - integrity sha512-LV76g+C502biUK6AyZ3LK10vDpDyCzZnhZFXkH1L75zHPj68+qc8Zfpx2th+gzwA2MzyK+1g/3EPl62yFnVttQ== +"@babel/helper-define-polyfill-provider@^0.6.2", "@babel/helper-define-polyfill-provider@^0.6.3": + version "0.6.3" + resolved "https://registry.yarnpkg.com/@babel/helper-define-polyfill-provider/-/helper-define-polyfill-provider-0.6.3.tgz#f4f2792fae2ef382074bc2d713522cf24e6ddb21" + integrity sha512-HK7Bi+Hj6H+VTHA3ZvBis7V/6hu9QuTrnMXNybfUf2iiuU/N97I8VjB+KbhFF8Rld/Lx5MzoCwPCpPjfK+n8Cg== dependencies: "@babel/helper-compilation-targets" "^7.22.6" "@babel/helper-plugin-utils" "^7.22.5" @@ -170,14 +162,6 @@ "@babel/helper-optimise-call-expression" "^7.25.9" "@babel/traverse" "^7.25.9" -"@babel/helper-simple-access@^7.25.9": - version "7.25.9" - resolved "https://registry.yarnpkg.com/@babel/helper-simple-access/-/helper-simple-access-7.25.9.tgz#6d51783299884a2c74618d6ef0f86820ec2e7739" - integrity sha512-c6WHXuiaRsJTyHYLJV75t9IqsmTbItYfdj99PnzYGQZkYKvan5/2jKJ7gu31J3/BJ/A18grImSPModuyG/Eo0Q== - dependencies: - "@babel/traverse" "^7.25.9" - "@babel/types" "^7.25.9" - "@babel/helper-skip-transparent-expression-wrappers@^7.25.9": version "7.25.9" resolved "https://registry.yarnpkg.com/@babel/helper-skip-transparent-expression-wrappers/-/helper-skip-transparent-expression-wrappers-7.25.9.tgz#0b2e1b62d560d6b1954893fd2b705dc17c91f0c9" @@ -218,12 +202,12 @@ "@babel/template" "^7.25.9" "@babel/types" "^7.26.0" -"@babel/parser@^7.25.9", "@babel/parser@^7.26.0", "@babel/parser@^7.26.2": - version "7.26.2" - resolved "https://registry.yarnpkg.com/@babel/parser/-/parser-7.26.2.tgz#fd7b6f487cfea09889557ef5d4eeb9ff9a5abd11" - integrity sha512-DWMCZH9WA4Maitz2q21SRKHo9QXZxkDsbNZoVD62gusNtNBBqDg9i7uOhASfTfIGNzW+O+r7+jAlM8dwphcJKQ== +"@babel/parser@^7.25.9", "@babel/parser@^7.26.0", "@babel/parser@^7.26.3": + version "7.26.3" + resolved "https://registry.yarnpkg.com/@babel/parser/-/parser-7.26.3.tgz#8c51c5db6ddf08134af1ddbacf16aaab48bac234" + integrity sha512-WJ/CvmY8Mea8iDXo6a7RK2wbmJITT5fN3BEkRuFlxVyNx8jOKIIhmC4fSkTcPcf8JyavbBwIe6OpiCOBXt/IcA== dependencies: - "@babel/types" "^7.26.0" + "@babel/types" "^7.26.3" "@babel/plugin-bugfix-firefox-class-in-computed-class-key@^7.25.9": version "7.25.9" @@ -404,11 +388,10 @@ "@babel/helper-plugin-utils" "^7.25.9" "@babel/plugin-transform-exponentiation-operator@^7.25.9": - version "7.25.9" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-exponentiation-operator/-/plugin-transform-exponentiation-operator-7.25.9.tgz#ece47b70d236c1d99c263a1e22b62dc20a4c8b0f" - integrity sha512-KRhdhlVk2nObA5AYa7QMgTMTVJdfHprfpAk4DjZVtllqRg9qarilstTKEhpVjyt+Npi8ThRyiV8176Am3CodPA== + version "7.26.3" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-exponentiation-operator/-/plugin-transform-exponentiation-operator-7.26.3.tgz#e29f01b6de302c7c2c794277a48f04a9ca7f03bc" + integrity sha512-7CAHcQ58z2chuXPWblnn1K6rLDnDWieghSOEmqQsrBenH0P9InCUtOJYD89pvngljmZlJcz3fcmgYsXFNGa1ZQ== dependencies: - "@babel/helper-builder-binary-assignment-operator-visitor" "^7.25.9" "@babel/helper-plugin-utils" "^7.25.9" "@babel/plugin-transform-export-namespace-from@^7.25.9": @@ -472,13 +455,12 @@ "@babel/helper-plugin-utils" "^7.25.9" "@babel/plugin-transform-modules-commonjs@^7.25.9": - version "7.25.9" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-modules-commonjs/-/plugin-transform-modules-commonjs-7.25.9.tgz#d165c8c569a080baf5467bda88df6425fc060686" - integrity sha512-dwh2Ol1jWwL2MgkCzUSOvfmKElqQcuswAZypBSUsScMXvgdT8Ekq5YA6TtqpTVWH+4903NmboMuH1o9i8Rxlyg== + version "7.26.3" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-modules-commonjs/-/plugin-transform-modules-commonjs-7.26.3.tgz#8f011d44b20d02c3de44d8850d971d8497f981fb" + integrity sha512-MgR55l4q9KddUDITEzEFYn5ZsGDXMSsU9E+kh7fjRXTIC3RHqfCo8RPRbyReYJh44HQ/yomFkqbOFohXvDCiIQ== dependencies: - "@babel/helper-module-transforms" "^7.25.9" + "@babel/helper-module-transforms" "^7.26.0" "@babel/helper-plugin-utils" "^7.25.9" - "@babel/helper-simple-access" "^7.25.9" "@babel/plugin-transform-modules-systemjs@^7.25.9": version "7.25.9" @@ -781,22 +763,22 @@ "@babel/types" "^7.25.9" "@babel/traverse@^7.25.9": - version "7.25.9" - resolved "https://registry.yarnpkg.com/@babel/traverse/-/traverse-7.25.9.tgz#a50f8fe49e7f69f53de5bea7e413cd35c5e13c84" - integrity sha512-ZCuvfwOwlz/bawvAuvcj8rrithP2/N55Tzz342AkTvq4qaWbGfmCk/tKhNaV2cthijKrPAA8SRJV5WWe7IBMJw== + version "7.26.4" + resolved "https://registry.yarnpkg.com/@babel/traverse/-/traverse-7.26.4.tgz#ac3a2a84b908dde6d463c3bfa2c5fdc1653574bd" + integrity sha512-fH+b7Y4p3yqvApJALCPJcwb0/XaOSgtK4pzV6WVjPR5GLFQBRI7pfoX2V2iM48NXvX07NUxxm1Vw98YjqTcU5w== dependencies: - "@babel/code-frame" "^7.25.9" - "@babel/generator" "^7.25.9" - "@babel/parser" "^7.25.9" + "@babel/code-frame" "^7.26.2" + "@babel/generator" "^7.26.3" + "@babel/parser" "^7.26.3" "@babel/template" "^7.25.9" - "@babel/types" "^7.25.9" + "@babel/types" "^7.26.3" debug "^4.3.1" globals "^11.1.0" -"@babel/types@^7.25.9", "@babel/types@^7.26.0", "@babel/types@^7.4.4": - version "7.26.0" - resolved "https://registry.yarnpkg.com/@babel/types/-/types-7.26.0.tgz#deabd08d6b753bc8e0f198f8709fb575e31774ff" - integrity sha512-Z/yiTPj+lDVnF7lWeKCIJzaIkI0vYO87dMpZ4bg4TDrFe4XXLFWL1TbXU27gBP3QccxV9mZICCrnjnYlJjXHOA== +"@babel/types@^7.25.9", "@babel/types@^7.26.0", "@babel/types@^7.26.3", "@babel/types@^7.4.4": + version "7.26.3" + resolved "https://registry.yarnpkg.com/@babel/types/-/types-7.26.3.tgz#37e79830f04c2b5687acc77db97fbc75fb81f3c0" + integrity sha512-vN5p+1kl59GVKMvTHt55NzzmYVxprfJD+ql7U9NFIfKCBkYE55LYtS+WtPlaYOyzydrKI8Nezd+aZextrd+FMA== dependencies: "@babel/helper-string-parser" "^7.25.9" "@babel/helper-validator-identifier" "^7.25.9" @@ -817,9 +799,9 @@ integrity sha512-eYm8vijH/hpzr/6/1CJ/V/Eb1xQFW2nnUKArb3z+yUWv7HTwj6M7SP957oMjfZjAHU6qpoNc2wQvIxBLWYa/Jg== "@jridgewell/gen-mapping@^0.3.5": - version "0.3.5" - resolved "https://registry.yarnpkg.com/@jridgewell/gen-mapping/-/gen-mapping-0.3.5.tgz#dcce6aff74bdf6dad1a95802b69b04a2fcb1fb36" - integrity sha512-IzL8ZoEDIBRWEzlCcRhOaCupYyN5gdIK+Q6fbFdPDg6HqX6jpkItn7DFIpW9LQzXG6Df9sA7+OKnq0qlz/GaQg== + version "0.3.8" + resolved "https://registry.yarnpkg.com/@jridgewell/gen-mapping/-/gen-mapping-0.3.8.tgz#4f0e06362e01362f823d348f1872b08f666d8142" + integrity sha512-imAbBGkb+ebQyxKgzv5Hu2nmROxoDOXHh80evxdoXNOrvAnVx7zimzc1Oo5h9RlfV4vPXaE2iM5pOFbvOCClWA== dependencies: "@jridgewell/set-array" "^1.2.1" "@jridgewell/sourcemap-codec" "^1.4.10" @@ -982,131 +964,131 @@ integrity sha512-5+fP8P8MFNC+AyZCDxrB2pkZFPGzqQWUzpSeuuVLvm8VMcorNYavBqoFcxK8bQz4Qsbn4oUEEem4wDLfcysGHA== "@types/node@*": - version "22.9.0" - resolved "https://registry.yarnpkg.com/@types/node/-/node-22.9.0.tgz#b7f16e5c3384788542c72dc3d561a7ceae2c0365" - integrity sha512-vuyHg81vvWA1Z1ELfvLko2c8f34gyA0zaic0+Rllc5lbCnbSyuvb2Oxpm6TAUAC/2xZN3QGqxBNggD1nNR2AfQ== - dependencies: - undici-types "~6.19.8" - -"@webassemblyjs/ast@1.12.1", "@webassemblyjs/ast@^1.12.1": - version "1.12.1" - resolved "https://registry.yarnpkg.com/@webassemblyjs/ast/-/ast-1.12.1.tgz#bb16a0e8b1914f979f45864c23819cc3e3f0d4bb" - integrity sha512-EKfMUOPRRUTy5UII4qJDGPpqfwjOmZ5jeGFwid9mnoqIFK+e0vqoi1qH56JpmZSzEL53jKnNzScdmftJyG5xWg== - dependencies: - "@webassemblyjs/helper-numbers" "1.11.6" - "@webassemblyjs/helper-wasm-bytecode" "1.11.6" - -"@webassemblyjs/floating-point-hex-parser@1.11.6": - version "1.11.6" - resolved "https://registry.yarnpkg.com/@webassemblyjs/floating-point-hex-parser/-/floating-point-hex-parser-1.11.6.tgz#dacbcb95aff135c8260f77fa3b4c5fea600a6431" - integrity sha512-ejAj9hfRJ2XMsNHk/v6Fu2dGS+i4UaXBXGemOfQ/JfQ6mdQg/WXtwleQRLLS4OvfDhv8rYnVwH27YJLMyYsxhw== - -"@webassemblyjs/helper-api-error@1.11.6": - version "1.11.6" - resolved "https://registry.yarnpkg.com/@webassemblyjs/helper-api-error/-/helper-api-error-1.11.6.tgz#6132f68c4acd59dcd141c44b18cbebbd9f2fa768" - integrity sha512-o0YkoP4pVu4rN8aTJgAyj9hC2Sv5UlkzCHhxqWj8butaLvnpdc2jOwh4ewE6CX0txSfLn/UYaV/pheS2Txg//Q== - -"@webassemblyjs/helper-buffer@1.12.1": - version "1.12.1" - resolved "https://registry.yarnpkg.com/@webassemblyjs/helper-buffer/-/helper-buffer-1.12.1.tgz#6df20d272ea5439bf20ab3492b7fb70e9bfcb3f6" - integrity sha512-nzJwQw99DNDKr9BVCOZcLuJJUlqkJh+kVzVl6Fmq/tI5ZtEyWT1KZMyOXltXLZJmDtvLCDgwsyrkohEtopTXCw== - -"@webassemblyjs/helper-numbers@1.11.6": - version "1.11.6" - resolved "https://registry.yarnpkg.com/@webassemblyjs/helper-numbers/-/helper-numbers-1.11.6.tgz#cbce5e7e0c1bd32cf4905ae444ef64cea919f1b5" - integrity sha512-vUIhZ8LZoIWHBohiEObxVm6hwP034jwmc9kuq5GdHZH0wiLVLIPcMCdpJzG4C11cHoQ25TFIQj9kaVADVX7N3g== - dependencies: - "@webassemblyjs/floating-point-hex-parser" "1.11.6" - "@webassemblyjs/helper-api-error" "1.11.6" + version "22.10.2" + resolved "https://registry.yarnpkg.com/@types/node/-/node-22.10.2.tgz#a485426e6d1fdafc7b0d4c7b24e2c78182ddabb9" + integrity sha512-Xxr6BBRCAOQixvonOye19wnzyDiUtTeqldOOmj3CkeblonbccA12PFwlufvRdrpjXxqnmUaeiU5EOA+7s5diUQ== + dependencies: + undici-types "~6.20.0" + +"@webassemblyjs/ast@1.14.1", "@webassemblyjs/ast@^1.14.1": + version "1.14.1" + resolved "https://registry.yarnpkg.com/@webassemblyjs/ast/-/ast-1.14.1.tgz#a9f6a07f2b03c95c8d38c4536a1fdfb521ff55b6" + integrity sha512-nuBEDgQfm1ccRp/8bCQrx1frohyufl4JlbMMZ4P1wpeOfDhF6FQkxZJ1b/e+PLwr6X1Nhw6OLme5usuBWYBvuQ== + dependencies: + "@webassemblyjs/helper-numbers" "1.13.2" + "@webassemblyjs/helper-wasm-bytecode" "1.13.2" + +"@webassemblyjs/floating-point-hex-parser@1.13.2": + version "1.13.2" + resolved "https://registry.yarnpkg.com/@webassemblyjs/floating-point-hex-parser/-/floating-point-hex-parser-1.13.2.tgz#fcca1eeddb1cc4e7b6eed4fc7956d6813b21b9fb" + integrity sha512-6oXyTOzbKxGH4steLbLNOu71Oj+C8Lg34n6CqRvqfS2O71BxY6ByfMDRhBytzknj9yGUPVJ1qIKhRlAwO1AovA== + +"@webassemblyjs/helper-api-error@1.13.2": + version "1.13.2" + resolved "https://registry.yarnpkg.com/@webassemblyjs/helper-api-error/-/helper-api-error-1.13.2.tgz#e0a16152248bc38daee76dd7e21f15c5ef3ab1e7" + integrity sha512-U56GMYxy4ZQCbDZd6JuvvNV/WFildOjsaWD3Tzzvmw/mas3cXzRJPMjP83JqEsgSbyrmaGjBfDtV7KDXV9UzFQ== + +"@webassemblyjs/helper-buffer@1.14.1": + version "1.14.1" + resolved "https://registry.yarnpkg.com/@webassemblyjs/helper-buffer/-/helper-buffer-1.14.1.tgz#822a9bc603166531f7d5df84e67b5bf99b72b96b" + integrity sha512-jyH7wtcHiKssDtFPRB+iQdxlDf96m0E39yb0k5uJVhFGleZFoNw1c4aeIcVUPPbXUVJ94wwnMOAqUHyzoEPVMA== + +"@webassemblyjs/helper-numbers@1.13.2": + version "1.13.2" + resolved "https://registry.yarnpkg.com/@webassemblyjs/helper-numbers/-/helper-numbers-1.13.2.tgz#dbd932548e7119f4b8a7877fd5a8d20e63490b2d" + integrity sha512-FE8aCmS5Q6eQYcV3gI35O4J789wlQA+7JrqTTpJqn5emA4U2hvwJmvFRC0HODS+3Ye6WioDklgd6scJ3+PLnEA== + dependencies: + "@webassemblyjs/floating-point-hex-parser" "1.13.2" + "@webassemblyjs/helper-api-error" "1.13.2" "@xtuc/long" "4.2.2" -"@webassemblyjs/helper-wasm-bytecode@1.11.6": - version "1.11.6" - resolved "https://registry.yarnpkg.com/@webassemblyjs/helper-wasm-bytecode/-/helper-wasm-bytecode-1.11.6.tgz#bb2ebdb3b83aa26d9baad4c46d4315283acd51e9" - integrity sha512-sFFHKwcmBprO9e7Icf0+gddyWYDViL8bpPjJJl0WHxCdETktXdmtWLGVzoHbqUcY4Be1LkNfwTmXOJUFZYSJdA== +"@webassemblyjs/helper-wasm-bytecode@1.13.2": + version "1.13.2" + resolved "https://registry.yarnpkg.com/@webassemblyjs/helper-wasm-bytecode/-/helper-wasm-bytecode-1.13.2.tgz#e556108758f448aae84c850e593ce18a0eb31e0b" + integrity sha512-3QbLKy93F0EAIXLh0ogEVR6rOubA9AoZ+WRYhNbFyuB70j3dRdwH9g+qXhLAO0kiYGlg3TxDV+I4rQTr/YNXkA== -"@webassemblyjs/helper-wasm-section@1.12.1": - version "1.12.1" - resolved "https://registry.yarnpkg.com/@webassemblyjs/helper-wasm-section/-/helper-wasm-section-1.12.1.tgz#3da623233ae1a60409b509a52ade9bc22a37f7bf" - integrity sha512-Jif4vfB6FJlUlSbgEMHUyk1j234GTNG9dBJ4XJdOySoj518Xj0oGsNi59cUQF4RRMS9ouBUxDDdyBVfPTypa5g== +"@webassemblyjs/helper-wasm-section@1.14.1": + version "1.14.1" + resolved "https://registry.yarnpkg.com/@webassemblyjs/helper-wasm-section/-/helper-wasm-section-1.14.1.tgz#9629dda9c4430eab54b591053d6dc6f3ba050348" + integrity sha512-ds5mXEqTJ6oxRoqjhWDU83OgzAYjwsCV8Lo/N+oRsNDmx/ZDpqalmrtgOMkHwxsG0iI//3BwWAErYRHtgn0dZw== dependencies: - "@webassemblyjs/ast" "1.12.1" - "@webassemblyjs/helper-buffer" "1.12.1" - "@webassemblyjs/helper-wasm-bytecode" "1.11.6" - "@webassemblyjs/wasm-gen" "1.12.1" + "@webassemblyjs/ast" "1.14.1" + "@webassemblyjs/helper-buffer" "1.14.1" + "@webassemblyjs/helper-wasm-bytecode" "1.13.2" + "@webassemblyjs/wasm-gen" "1.14.1" -"@webassemblyjs/ieee754@1.11.6": - version "1.11.6" - resolved "https://registry.yarnpkg.com/@webassemblyjs/ieee754/-/ieee754-1.11.6.tgz#bb665c91d0b14fffceb0e38298c329af043c6e3a" - integrity sha512-LM4p2csPNvbij6U1f19v6WR56QZ8JcHg3QIJTlSwzFcmx6WSORicYj6I63f9yU1kEUtrpG+kjkiIAkevHpDXrg== +"@webassemblyjs/ieee754@1.13.2": + version "1.13.2" + resolved "https://registry.yarnpkg.com/@webassemblyjs/ieee754/-/ieee754-1.13.2.tgz#1c5eaace1d606ada2c7fd7045ea9356c59ee0dba" + integrity sha512-4LtOzh58S/5lX4ITKxnAK2USuNEvpdVV9AlgGQb8rJDHaLeHciwG4zlGr0j/SNWlr7x3vO1lDEsuePvtcDNCkw== dependencies: "@xtuc/ieee754" "^1.2.0" -"@webassemblyjs/leb128@1.11.6": - version "1.11.6" - resolved "https://registry.yarnpkg.com/@webassemblyjs/leb128/-/leb128-1.11.6.tgz#70e60e5e82f9ac81118bc25381a0b283893240d7" - integrity sha512-m7a0FhE67DQXgouf1tbN5XQcdWoNgaAuoULHIfGFIEVKA6tu/edls6XnIlkmS6FrXAquJRPni3ZZKjw6FSPjPQ== +"@webassemblyjs/leb128@1.13.2": + version "1.13.2" + resolved "https://registry.yarnpkg.com/@webassemblyjs/leb128/-/leb128-1.13.2.tgz#57c5c3deb0105d02ce25fa3fd74f4ebc9fd0bbb0" + integrity sha512-Lde1oNoIdzVzdkNEAWZ1dZ5orIbff80YPdHx20mrHwHrVNNTjNr8E3xz9BdpcGqRQbAEa+fkrCb+fRFTl/6sQw== dependencies: "@xtuc/long" "4.2.2" -"@webassemblyjs/utf8@1.11.6": - version "1.11.6" - resolved "https://registry.yarnpkg.com/@webassemblyjs/utf8/-/utf8-1.11.6.tgz#90f8bc34c561595fe156603be7253cdbcd0fab5a" - integrity sha512-vtXf2wTQ3+up9Zsg8sa2yWiQpzSsMyXj0qViVP6xKGCUT8p8YJ6HqI7l5eCnWx1T/FYdsv07HQs2wTFbbof/RA== - -"@webassemblyjs/wasm-edit@^1.12.1": - version "1.12.1" - resolved "https://registry.yarnpkg.com/@webassemblyjs/wasm-edit/-/wasm-edit-1.12.1.tgz#9f9f3ff52a14c980939be0ef9d5df9ebc678ae3b" - integrity sha512-1DuwbVvADvS5mGnXbE+c9NfA8QRcZ6iKquqjjmR10k6o+zzsRVesil54DKexiowcFCPdr/Q0qaMgB01+SQ1u6g== - dependencies: - "@webassemblyjs/ast" "1.12.1" - "@webassemblyjs/helper-buffer" "1.12.1" - "@webassemblyjs/helper-wasm-bytecode" "1.11.6" - "@webassemblyjs/helper-wasm-section" "1.12.1" - "@webassemblyjs/wasm-gen" "1.12.1" - "@webassemblyjs/wasm-opt" "1.12.1" - "@webassemblyjs/wasm-parser" "1.12.1" - "@webassemblyjs/wast-printer" "1.12.1" - -"@webassemblyjs/wasm-gen@1.12.1": - version "1.12.1" - resolved "https://registry.yarnpkg.com/@webassemblyjs/wasm-gen/-/wasm-gen-1.12.1.tgz#a6520601da1b5700448273666a71ad0a45d78547" - integrity sha512-TDq4Ojh9fcohAw6OIMXqiIcTq5KUXTGRkVxbSo1hQnSy6lAM5GSdfwWeSxpAo0YzgsgF182E/U0mDNhuA0tW7w== - dependencies: - "@webassemblyjs/ast" "1.12.1" - "@webassemblyjs/helper-wasm-bytecode" "1.11.6" - "@webassemblyjs/ieee754" "1.11.6" - "@webassemblyjs/leb128" "1.11.6" - "@webassemblyjs/utf8" "1.11.6" - -"@webassemblyjs/wasm-opt@1.12.1": - version "1.12.1" - resolved "https://registry.yarnpkg.com/@webassemblyjs/wasm-opt/-/wasm-opt-1.12.1.tgz#9e6e81475dfcfb62dab574ac2dda38226c232bc5" - integrity sha512-Jg99j/2gG2iaz3hijw857AVYekZe2SAskcqlWIZXjji5WStnOpVoat3gQfT/Q5tb2djnCjBtMocY/Su1GfxPBg== - dependencies: - "@webassemblyjs/ast" "1.12.1" - "@webassemblyjs/helper-buffer" "1.12.1" - "@webassemblyjs/wasm-gen" "1.12.1" - "@webassemblyjs/wasm-parser" "1.12.1" - -"@webassemblyjs/wasm-parser@1.12.1", "@webassemblyjs/wasm-parser@^1.12.1": - version "1.12.1" - resolved "https://registry.yarnpkg.com/@webassemblyjs/wasm-parser/-/wasm-parser-1.12.1.tgz#c47acb90e6f083391e3fa61d113650eea1e95937" - integrity sha512-xikIi7c2FHXysxXe3COrVUPSheuBtpcfhbpFj4gmu7KRLYOzANztwUU0IbsqvMqzuNK2+glRGWCEqZo1WCLyAQ== - dependencies: - "@webassemblyjs/ast" "1.12.1" - "@webassemblyjs/helper-api-error" "1.11.6" - "@webassemblyjs/helper-wasm-bytecode" "1.11.6" - "@webassemblyjs/ieee754" "1.11.6" - "@webassemblyjs/leb128" "1.11.6" - "@webassemblyjs/utf8" "1.11.6" - -"@webassemblyjs/wast-printer@1.12.1": - version "1.12.1" - resolved "https://registry.yarnpkg.com/@webassemblyjs/wast-printer/-/wast-printer-1.12.1.tgz#bcecf661d7d1abdaf989d8341a4833e33e2b31ac" - integrity sha512-+X4WAlOisVWQMikjbcvY2e0rwPsKQ9F688lksZhBcPycBBuii3O7m8FACbDMWDojpAqvjIncrG8J0XHKyQfVeA== - dependencies: - "@webassemblyjs/ast" "1.12.1" +"@webassemblyjs/utf8@1.13.2": + version "1.13.2" + resolved "https://registry.yarnpkg.com/@webassemblyjs/utf8/-/utf8-1.13.2.tgz#917a20e93f71ad5602966c2d685ae0c6c21f60f1" + integrity sha512-3NQWGjKTASY1xV5m7Hr0iPeXD9+RDobLll3T9d2AO+g3my8xy5peVyjSag4I50mR1bBSN/Ct12lo+R9tJk0NZQ== + +"@webassemblyjs/wasm-edit@^1.14.1": + version "1.14.1" + resolved "https://registry.yarnpkg.com/@webassemblyjs/wasm-edit/-/wasm-edit-1.14.1.tgz#ac6689f502219b59198ddec42dcd496b1004d597" + integrity sha512-RNJUIQH/J8iA/1NzlE4N7KtyZNHi3w7at7hDjvRNm5rcUXa00z1vRz3glZoULfJ5mpvYhLybmVcwcjGrC1pRrQ== + dependencies: + "@webassemblyjs/ast" "1.14.1" + "@webassemblyjs/helper-buffer" "1.14.1" + "@webassemblyjs/helper-wasm-bytecode" "1.13.2" + "@webassemblyjs/helper-wasm-section" "1.14.1" + "@webassemblyjs/wasm-gen" "1.14.1" + "@webassemblyjs/wasm-opt" "1.14.1" + "@webassemblyjs/wasm-parser" "1.14.1" + "@webassemblyjs/wast-printer" "1.14.1" + +"@webassemblyjs/wasm-gen@1.14.1": + version "1.14.1" + resolved "https://registry.yarnpkg.com/@webassemblyjs/wasm-gen/-/wasm-gen-1.14.1.tgz#991e7f0c090cb0bb62bbac882076e3d219da9570" + integrity sha512-AmomSIjP8ZbfGQhumkNvgC33AY7qtMCXnN6bL2u2Js4gVCg8fp735aEiMSBbDR7UQIj90n4wKAFUSEd0QN2Ukg== + dependencies: + "@webassemblyjs/ast" "1.14.1" + "@webassemblyjs/helper-wasm-bytecode" "1.13.2" + "@webassemblyjs/ieee754" "1.13.2" + "@webassemblyjs/leb128" "1.13.2" + "@webassemblyjs/utf8" "1.13.2" + +"@webassemblyjs/wasm-opt@1.14.1": + version "1.14.1" + resolved "https://registry.yarnpkg.com/@webassemblyjs/wasm-opt/-/wasm-opt-1.14.1.tgz#e6f71ed7ccae46781c206017d3c14c50efa8106b" + integrity sha512-PTcKLUNvBqnY2U6E5bdOQcSM+oVP/PmrDY9NzowJjislEjwP/C4an2303MCVS2Mg9d3AJpIGdUFIQQWbPds0Sw== + dependencies: + "@webassemblyjs/ast" "1.14.1" + "@webassemblyjs/helper-buffer" "1.14.1" + "@webassemblyjs/wasm-gen" "1.14.1" + "@webassemblyjs/wasm-parser" "1.14.1" + +"@webassemblyjs/wasm-parser@1.14.1", "@webassemblyjs/wasm-parser@^1.14.1": + version "1.14.1" + resolved "https://registry.yarnpkg.com/@webassemblyjs/wasm-parser/-/wasm-parser-1.14.1.tgz#b3e13f1893605ca78b52c68e54cf6a865f90b9fb" + integrity sha512-JLBl+KZ0R5qB7mCnud/yyX08jWFw5MsoalJ1pQ4EdFlgj9VdXKGuENGsiCIjegI1W7p91rUlcB/LB5yRJKNTcQ== + dependencies: + "@webassemblyjs/ast" "1.14.1" + "@webassemblyjs/helper-api-error" "1.13.2" + "@webassemblyjs/helper-wasm-bytecode" "1.13.2" + "@webassemblyjs/ieee754" "1.13.2" + "@webassemblyjs/leb128" "1.13.2" + "@webassemblyjs/utf8" "1.13.2" + +"@webassemblyjs/wast-printer@1.14.1": + version "1.14.1" + resolved "https://registry.yarnpkg.com/@webassemblyjs/wast-printer/-/wast-printer-1.14.1.tgz#3bb3e9638a8ae5fdaf9610e7a06b4d9f9aa6fe07" + integrity sha512-kPSSXE6De1XOR820C90RIo2ogvZG+c3KiHzqUoO/F34Y2shGzesfqv7o57xrxovZJH/MetF5UjroJ/R/3isoiw== + dependencies: + "@webassemblyjs/ast" "1.14.1" "@xtuc/long" "4.2.2" "@webpack-cli/configtest@^2.1.1": @@ -1192,12 +1174,12 @@ babel-loader@^9.0.0: schema-utils "^4.0.0" babel-plugin-polyfill-corejs2@^0.4.10: - version "0.4.11" - resolved "https://registry.yarnpkg.com/babel-plugin-polyfill-corejs2/-/babel-plugin-polyfill-corejs2-0.4.11.tgz#30320dfe3ffe1a336c15afdcdafd6fd615b25e33" - integrity sha512-sMEJ27L0gRHShOh5G54uAAPaiCOygY/5ratXuiyb2G46FmlSpc9eFCzYVyDiPxfNbwzA7mYahmjQc5q+CZQ09Q== + version "0.4.12" + resolved "https://registry.yarnpkg.com/babel-plugin-polyfill-corejs2/-/babel-plugin-polyfill-corejs2-0.4.12.tgz#ca55bbec8ab0edeeef3d7b8ffd75322e210879a9" + integrity sha512-CPWT6BwvhrTO2d8QVorhTCQw9Y43zOu7G9HigcfxvepOU6b8o3tcWad6oVgZIsZCTt42FFv97aA7ZJsbM4+8og== dependencies: "@babel/compat-data" "^7.22.6" - "@babel/helper-define-polyfill-provider" "^0.6.2" + "@babel/helper-define-polyfill-provider" "^0.6.3" semver "^6.3.1" babel-plugin-polyfill-corejs3@^0.10.6: @@ -1209,11 +1191,11 @@ babel-plugin-polyfill-corejs3@^0.10.6: core-js-compat "^3.38.0" babel-plugin-polyfill-regenerator@^0.6.1: - version "0.6.2" - resolved "https://registry.yarnpkg.com/babel-plugin-polyfill-regenerator/-/babel-plugin-polyfill-regenerator-0.6.2.tgz#addc47e240edd1da1058ebda03021f382bba785e" - integrity sha512-2R25rQZWP63nGwaAswvDazbPXfrM3HwVoBXK6HcqeKrSrL/JqcC/rDcf95l4r7LXLyxDXc8uQDa064GubtCABg== + version "0.6.3" + resolved "https://registry.yarnpkg.com/babel-plugin-polyfill-regenerator/-/babel-plugin-polyfill-regenerator-0.6.3.tgz#abeb1f3f1c762eace37587f42548b08b57789bc8" + integrity sha512-LiWSbl4CRSIa5x/JAU6jZiG9eit9w6mz+yVMFwDE83LAWvt0AfGBoZ7HS/mkhrKuh2ZlzfVZYKoLjXdqw6Yt7Q== dependencies: - "@babel/helper-define-polyfill-provider" "^0.6.2" + "@babel/helper-define-polyfill-provider" "^0.6.3" bootstrap@^5.0.1: version "5.3.3" @@ -1243,9 +1225,9 @@ buffer-from@^1.0.0: integrity sha512-E+XQCRwSbaaiChtv6k6Dwgc+bx+Bs6vuKJHHl5kox/BaKbhiXzqQOwK4cO22yElGp2OCmjwVhT3HmxgyPGnJfQ== caniuse-lite@^1.0.30001669: - version "1.0.30001677" - resolved "https://registry.yarnpkg.com/caniuse-lite/-/caniuse-lite-1.0.30001677.tgz#27c2e2c637e007cfa864a16f7dfe7cde66b38b5f" - integrity sha512-fmfjsOlJUpMWu+mAAtZZZHz7UEwsUxIIvu1TJfO1HqFQvB/B+ii0xr9B5HpbZY/mC4XZ8SvjHJqtAY6pDPQEog== + version "1.0.30001688" + resolved "https://registry.yarnpkg.com/caniuse-lite/-/caniuse-lite-1.0.30001688.tgz#f9d3ede749f083ce0db4c13db9d828adaf2e8d0a" + integrity sha512-Nmqpru91cuABu/DTCXbM2NSRHzM2uVHfPnhJ/1zEAJx/ILBRVmz3pzH4N7DZqbdG0gWClsCC05Oj0mJ/1AWMbA== chokidar@^4.0.0: version "4.0.1" @@ -1329,9 +1311,9 @@ cssesc@^3.0.0: integrity sha512-/Tb/JcjK111nNScGob5MNtsntNM1aCNUDipB/TkwZFhyDrrE47SOx/18wF2bbjgc3ZzCSKW1T5nt5EbFoAz/Vg== debug@^4.1.0, debug@^4.1.1, debug@^4.3.1: - version "4.3.7" - resolved "https://registry.yarnpkg.com/debug/-/debug-4.3.7.tgz#87945b4151a011d76d95a198d7111c865c360a52" - integrity sha512-Er2nc/H7RrMXZBFCEim6TCmMk02Z8vLC2Rbi1KEBggpo0fS6l0S1nnapwmIi3yW/+GOJap1Krg4w0Hg80oCqgQ== + version "4.4.0" + resolved "https://registry.yarnpkg.com/debug/-/debug-4.4.0.tgz#2b3f2aea2ffeb776477460267377dc8710faba8a" + integrity sha512-6WTZ/IxCY/T6BALoZHaE4ctp9xm+Z5kY/pzYaCHRFeyVhojxlrm+46y68HA6hr0TcwEssoxNiDEUJQjfPZ/RYA== dependencies: ms "^2.1.3" @@ -1341,9 +1323,9 @@ detect-libc@^1.0.3: integrity sha512-pGjwhsmsp4kL2RTz08wcOlGN83otlqHeD/Z5T8GXZB+/YcpQ/dgo+lbU8ZsGxV0HIvqqxo9l7mqYwyYMD9bKDg== electron-to-chromium@^1.5.41: - version "1.5.52" - resolved "https://registry.yarnpkg.com/electron-to-chromium/-/electron-to-chromium-1.5.52.tgz#2bed832c95a56a195504f918150e548474687da8" - integrity sha512-xtoijJTZ+qeucLBDNztDOuQBE1ksqjvNjvqFoST3nGC7fSpqJ+X6BdTBaY5BHG+IhWWmpc6b/KfpeuEDupEPOQ== + version "1.5.73" + resolved "https://registry.yarnpkg.com/electron-to-chromium/-/electron-to-chromium-1.5.73.tgz#f32956ce40947fa3c8606726a96cd8fb5bb5f720" + integrity sha512-8wGNxG9tAG5KhGd3eeA0o6ixhiNdgr0DcHWm85XPCphwZgD1lIEoi6t3VERayWao7SF7AAZTw6oARGJeVjH8Kg== enhanced-resolve@^5.17.1: version "5.17.1" @@ -1501,10 +1483,10 @@ icss-utils@^5.0.0, icss-utils@^5.1.0: resolved "https://registry.yarnpkg.com/icss-utils/-/icss-utils-5.1.0.tgz#c6be6858abd013d768e98366ae47e25d5887b1ae" integrity sha512-soFhflCVWLfRNOPU3iv5Z9VUdT44xFRbzjLsEzSr5AQmgqPMTHdU3PMT1Cf1ssx8fLNJDA1juftYl+PUcv3MqA== -immutable@^4.0.0: - version "4.3.7" - resolved "https://registry.yarnpkg.com/immutable/-/immutable-4.3.7.tgz#c70145fc90d89fb02021e65c84eb0226e4e5a381" - integrity sha512-1hqclzwYwjRDFLjcFxOM5AYkkG0rpFPpr1RLPMEuGczoS7YA8gLhy8SWXYRAA/XwfEHpfo3cw5JGioS32fnMRw== +immutable@^5.0.2: + version "5.0.3" + resolved "https://registry.yarnpkg.com/immutable/-/immutable-5.0.3.tgz#aa037e2313ea7b5d400cd9298fa14e404c933db1" + integrity sha512-P8IdPQHq3lA1xVeBRi5VPqUm5HDgKnx0Ru51wZz5mjxHr5n3RWhjIpOFU7ybkUxfB+5IToy+OLaHYDBIWsv+uw== import-local@^3.0.2: version "3.2.0" @@ -1579,7 +1561,12 @@ js-tokens@^4.0.0: resolved "https://registry.yarnpkg.com/js-tokens/-/js-tokens-4.0.0.tgz#19203fb59991df98e3a287050d4647cdeaf32499" integrity sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ== -jsesc@^3.0.2, jsesc@~3.0.2: +jsesc@^3.0.2: + version "3.1.0" + resolved "https://registry.yarnpkg.com/jsesc/-/jsesc-3.1.0.tgz#74d335a234f67ed19907fdadfac7ccf9d409825d" + integrity sha512-/sM3dO2FOzXjKQhJuo0Q173wf2KOo8t4I8vHy6lF9poUp7bKT0/NHE8fPX23PwfhnykfqnC2xRxOnVw5XuGIaA== + +jsesc@~3.0.2: version "3.0.2" resolved "https://registry.yarnpkg.com/jsesc/-/jsesc-3.0.2.tgz#bb8b09a6597ba426425f2e4a07245c3d00b9343e" integrity sha512-xKqzzWXDttJuOcawBt4KnKHHIf5oQ/Cxax+0PWFG+DFDgHNAdi+TXECADI+RYiFUMmx8792xsMbbgXj4CwnP4g== @@ -1684,9 +1671,9 @@ ms@^2.1.3: integrity sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA== nanoid@^3.3.7: - version "3.3.7" - resolved "https://registry.yarnpkg.com/nanoid/-/nanoid-3.3.7.tgz#d0c301a691bc8d54efa0a2226ccf3fe2fd656bd8" - integrity sha512-eSRppjcPIatRIMC1U6UngP8XFcz8MQWGQdt1MTBQ7NaAmvXDfvNxbvWV3x2y6CdEUciCSsDHDQZbhYaB8QEo2g== + version "3.3.8" + resolved "https://registry.yarnpkg.com/nanoid/-/nanoid-3.3.8.tgz#b1be3030bee36aaff18bacb375e5cce521684baf" + integrity sha512-WNLf5Sd8oZxOm+TzppcYk8gVOgP+l58xNy58D0nbUnOxOWRWvlcCV4kUF7ltmI6PsrLl/BgKEyS4mqsGChFN0w== neo-async@^2.6.2: version "2.6.2" @@ -1699,9 +1686,9 @@ node-addon-api@^7.0.0: integrity sha512-5m3bsyrjFWE1xf7nz7YXdN4udnVtXK6/Yfgn5qnahL6bCkf2yKt4k3nuTKAtT4r3IG8JNR2ncsIMdZuAzJjHQQ== node-releases@^2.0.18: - version "2.0.18" - resolved "https://registry.yarnpkg.com/node-releases/-/node-releases-2.0.18.tgz#f010e8d35e2fe8d6b2944f03f70213ecedc4ca3f" - integrity sha512-d9VeXT4SJ7ZeOqGX6R5EM022wpL+eWPooLI+5UpWn2jCT1aosUQEhQP214x33Wkwx3JQMvIm+tIoVOdodFS40g== + version "2.0.19" + resolved "https://registry.yarnpkg.com/node-releases/-/node-releases-2.0.19.tgz#9e445a52950951ec4d177d843af370b411caf314" + integrity sha512-xxOWJsBKtzAq7DY0J+DTzuz58K8e7sJbdgwkbMWQe8UYB6ekmsQ45q0M/tJDsGaZmbC+l7n57UV8Hl5tHxO9uw== p-limit@^2.2.0: version "2.3.0" @@ -1756,7 +1743,7 @@ path-parse@^1.0.7: resolved "https://registry.yarnpkg.com/path-parse/-/path-parse-1.0.7.tgz#fbc114b60ca42b30d9daf5858e4bd68bbedb6735" integrity sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw== -picocolors@^1.0.0, picocolors@^1.1.0: +picocolors@^1.0.0, picocolors@^1.1.0, picocolors@^1.1.1: version "1.1.1" resolved "https://registry.yarnpkg.com/picocolors/-/picocolors-1.1.1.tgz#3d321af3eab939b083c8f929a1d12cda81c26b6b" integrity sha512-xceH2snhtb5M9liqDsmEw56le376mTZkEX/jEb/RxNFyegNul7eNslCXP9FDj/Lcu0X8KEyMceP2ntpaHrDEVA== @@ -1786,20 +1773,20 @@ postcss-modules-extract-imports@^3.1.0: integrity sha512-k3kNe0aNFQDAZGbin48pL2VNidTF0w4/eASDsxlyspobzU3wZQLOGj7L9gfRe0Jo9/4uud09DsjFNH7winGv8Q== postcss-modules-local-by-default@^4.0.5: - version "4.0.5" - resolved "https://registry.yarnpkg.com/postcss-modules-local-by-default/-/postcss-modules-local-by-default-4.0.5.tgz#f1b9bd757a8edf4d8556e8d0f4f894260e3df78f" - integrity sha512-6MieY7sIfTK0hYfafw1OMEG+2bg8Q1ocHCpoWLqOKj3JXlKu4G7btkmM/B7lFubYkYWmRSPLZi5chid63ZaZYw== + version "4.2.0" + resolved "https://registry.yarnpkg.com/postcss-modules-local-by-default/-/postcss-modules-local-by-default-4.2.0.tgz#d150f43837831dae25e4085596e84f6f5d6ec368" + integrity sha512-5kcJm/zk+GJDSfw+V/42fJ5fhjL5YbFDl8nVdXkJPLLW+Vf9mTD5Xe0wqIaDnLuL2U6cDNpTr+UQ+v2HWIBhzw== dependencies: icss-utils "^5.0.0" - postcss-selector-parser "^6.0.2" + postcss-selector-parser "^7.0.0" postcss-value-parser "^4.1.0" postcss-modules-scope@^3.2.0: - version "3.2.0" - resolved "https://registry.yarnpkg.com/postcss-modules-scope/-/postcss-modules-scope-3.2.0.tgz#a43d28289a169ce2c15c00c4e64c0858e43457d5" - integrity sha512-oq+g1ssrsZOsx9M96c5w8laRmvEu9C3adDSjI8oTcbfkrTE8hx/zfyobUoWIxaKPO8bt6S62kxpw5GqypEw1QQ== + version "3.2.1" + resolved "https://registry.yarnpkg.com/postcss-modules-scope/-/postcss-modules-scope-3.2.1.tgz#1bbccddcb398f1d7a511e0a2d1d047718af4078c" + integrity sha512-m9jZstCVaqGjTAuny8MdgE88scJnCiQSlSrOWcTQgM2t32UBe+MUmFSO5t7VMSfAf/FJKImAxBav8ooCHJXCJA== dependencies: - postcss-selector-parser "^6.0.4" + postcss-selector-parser "^7.0.0" postcss-modules-values@^4.0.0: version "4.0.0" @@ -1808,10 +1795,10 @@ postcss-modules-values@^4.0.0: dependencies: icss-utils "^5.0.0" -postcss-selector-parser@^6.0.2, postcss-selector-parser@^6.0.4: - version "6.1.2" - resolved "https://registry.yarnpkg.com/postcss-selector-parser/-/postcss-selector-parser-6.1.2.tgz#27ecb41fb0e3b6ba7a1ec84fff347f734c7929de" - integrity sha512-Q8qQfPiZ+THO/3ZrOrO0cJJKfpYCagtMUkXbnEfmgUjwXg6z/WBeOyS9APBBPCTSiDV+s4SwQGu8yFsiMRIudg== +postcss-selector-parser@^7.0.0: + version "7.0.0" + resolved "https://registry.yarnpkg.com/postcss-selector-parser/-/postcss-selector-parser-7.0.0.tgz#41bd8b56f177c093ca49435f65731befe25d6b9c" + integrity sha512-9RbEr1Y7FFfptd/1eEdntyjMwLeghW1bHX9GWjXo19vx4ytPQhANltvVxDggzJl7mnWM+dX28kb6cyS/4iQjlQ== dependencies: cssesc "^3.0.0" util-deprecate "^1.0.2" @@ -1822,12 +1809,12 @@ postcss-value-parser@^4.1.0, postcss-value-parser@^4.2.0: integrity sha512-1NNCs6uurfkVbeXG4S8JFT9t19m45ICnif8zWLd5oPSZ50QnwMfK+H3jv408d4jw/7Bttv5axS5IiHoLaVNHeQ== postcss@^8.4.33: - version "8.4.47" - resolved "https://registry.yarnpkg.com/postcss/-/postcss-8.4.47.tgz#5bf6c9a010f3e724c503bf03ef7947dcb0fea365" - integrity sha512-56rxCq7G/XfB4EkXq9Egn5GCqugWvDFjafDOThIdMBsI15iqPqR5r15TfSr1YPYeEI19YeaXMCbY6u88Y76GLQ== + version "8.4.49" + resolved "https://registry.yarnpkg.com/postcss/-/postcss-8.4.49.tgz#4ea479048ab059ab3ae61d082190fabfd994fe19" + integrity sha512-OCVPnIObs4N29kxTjzLfUryOkvZEq+pf8jTF0lg8E7uETuWHA+v7j3c/xJmiqpX450191LlmZfUKkXxkTry7nA== dependencies: nanoid "^3.3.7" - picocolors "^1.1.0" + picocolors "^1.1.1" source-map-js "^1.2.1" punycode@^2.1.0: @@ -1878,15 +1865,15 @@ regenerator-transform@^0.15.2: dependencies: "@babel/runtime" "^7.8.4" -regexpu-core@^6.1.1: - version "6.1.1" - resolved "https://registry.yarnpkg.com/regexpu-core/-/regexpu-core-6.1.1.tgz#b469b245594cb2d088ceebc6369dceb8c00becac" - integrity sha512-k67Nb9jvwJcJmVpw0jPttR1/zVfnKf8Km0IPatrU/zJ5XeG3+Slx0xLXs9HByJSzXzrlz5EDvN6yLNMDc2qdnw== +regexpu-core@^6.2.0: + version "6.2.0" + resolved "https://registry.yarnpkg.com/regexpu-core/-/regexpu-core-6.2.0.tgz#0e5190d79e542bf294955dccabae04d3c7d53826" + integrity sha512-H66BPQMrv+V16t8xtmq+UC0CBpiTBA60V8ibS1QVReIp8T1z8hwFxqcGzm9K6lgsN7sB5edVH8a+ze6Fqm4weA== dependencies: regenerate "^1.4.2" regenerate-unicode-properties "^10.2.0" regjsgen "^0.8.0" - regjsparser "^0.11.0" + regjsparser "^0.12.0" unicode-match-property-ecmascript "^2.0.0" unicode-match-property-value-ecmascript "^2.1.0" @@ -1895,10 +1882,10 @@ regjsgen@^0.8.0: resolved "https://registry.yarnpkg.com/regjsgen/-/regjsgen-0.8.0.tgz#df23ff26e0c5b300a6470cad160a9d090c3a37ab" integrity sha512-RvwtGe3d7LvWiDQXeQw8p5asZUmfU1G/l6WbUXeHta7Y2PEIvBTwH6E2EfmYUK8pxcxEdEmaomqyp0vZZ7C+3Q== -regjsparser@^0.11.0: - version "0.11.2" - resolved "https://registry.yarnpkg.com/regjsparser/-/regjsparser-0.11.2.tgz#7404ad42be00226d72bcf1f003f1f441861913d8" - integrity sha512-3OGZZ4HoLJkkAZx/48mTXJNlmqTGOzc0o9OWQPuWpkOlXXPbyN6OafCcoXUnBqE2D3f/T5L+pWc1kdEmnfnRsA== +regjsparser@^0.12.0: + version "0.12.0" + resolved "https://registry.yarnpkg.com/regjsparser/-/regjsparser-0.12.0.tgz#0e846df6c6530586429377de56e0475583b088dc" + integrity sha512-cnE+y8bz4NhMjISKbgeVJtqNbtf5QpjZP+Bslo+UqkIt9QPnX9q095eiRRASJG1/tz6dlNr6Z5NsBiWYokp6EQ== dependencies: jsesc "~3.0.2" @@ -1934,19 +1921,19 @@ safe-buffer@^5.1.0: integrity sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ== sass-loader@^16.0.0: - version "16.0.3" - resolved "https://registry.yarnpkg.com/sass-loader/-/sass-loader-16.0.3.tgz#17b944fab6702dc7a52c5d2a88cbfa38c39cdc75" - integrity sha512-gosNorT1RCkuCMyihv6FBRR7BMV06oKRAs+l4UMp1mlcVg9rWN6KMmUj3igjQwmYys4mDP3etEYJgiHRbgHCHA== + version "16.0.4" + resolved "https://registry.yarnpkg.com/sass-loader/-/sass-loader-16.0.4.tgz#5c2afb755fbc0a45a004369efa11579518a39a45" + integrity sha512-LavLbgbBGUt3wCiYzhuLLu65+fWXaXLmq7YxivLhEqmiupCFZ5sKUAipK3do6V80YSU0jvSxNhEdT13IXNr3rg== dependencies: neo-async "^2.6.2" sass@^1.53.0: - version "1.80.6" - resolved "https://registry.yarnpkg.com/sass/-/sass-1.80.6.tgz#5d0aa55763984effe41e40019c9571ab73e6851f" - integrity sha512-ccZgdHNiBF1NHBsWvacvT5rju3y1d/Eu+8Ex6c21nHp2lZGLBEtuwc415QfiI1PJa1TpCo3iXwwSRjRpn2Ckjg== + version "1.82.0" + resolved "https://registry.yarnpkg.com/sass/-/sass-1.82.0.tgz#30da277af3d0fa6042e9ceabd0d984ed6d07df70" + integrity sha512-j4GMCTa8elGyN9A7x7bEglx0VgSpNUG4W4wNedQ33wSMdnkqQCT8HTwOaVSV4e6yQovcu/3Oc4coJP/l0xhL2Q== dependencies: chokidar "^4.0.0" - immutable "^4.0.0" + immutable "^5.0.2" source-map-js ">=0.6.2 <2.0.0" optionalDependencies: "@parcel/watcher" "^2.4.1" @@ -1961,9 +1948,9 @@ schema-utils@^3.1.1, schema-utils@^3.2.0: ajv-keywords "^3.5.2" schema-utils@^4.0.0: - version "4.2.0" - resolved "https://registry.yarnpkg.com/schema-utils/-/schema-utils-4.2.0.tgz#70d7c93e153a273a805801882ebd3bff20d89c8b" - integrity sha512-L0jRsrPpjdckP3oPug3/VxNKt2trR8TcabrM6FOAAlvC/9Phcmm+cuAgTlxBqdBR1WJx7Naj9WHw+aOmheSVbw== + version "4.3.0" + resolved "https://registry.yarnpkg.com/schema-utils/-/schema-utils-4.3.0.tgz#3b669f04f71ff2dfb5aba7ce2d5a9d79b35622c0" + integrity sha512-Gf9qqc58SpCA/xdziiHz35F4GNIWYWZrEshUc/G/r5BnLph6xpKuLeoJoQuj5WfBIx/eQLf+hmVPYHaxJu7V2g== dependencies: "@types/json-schema" "^7.0.9" ajv "^8.9.0" @@ -2053,9 +2040,9 @@ terser-webpack-plugin@^5.3.10: terser "^5.26.0" terser@^5.26.0: - version "5.36.0" - resolved "https://registry.yarnpkg.com/terser/-/terser-5.36.0.tgz#8b0dbed459ac40ff7b4c9fd5a3a2029de105180e" - integrity sha512-IYV9eNMuFAV4THUspIRXkLakHnV6XO7FEdtKjf/mDyrnqUg9LnlOn6/RwRvM9SZjR4GUq8Nk8zj67FzVARr74w== + version "5.37.0" + resolved "https://registry.yarnpkg.com/terser/-/terser-5.37.0.tgz#38aa66d1cfc43d0638fab54e43ff8a4f72a21ba3" + integrity sha512-B8wRRkmre4ERucLM/uXx4MOV5cbnOlVAqUst+1+iLKPI0dOgFO28f84ptoQt9HEI537PMzfYa/d+GEPKTRXmYA== dependencies: "@jridgewell/source-map" "^0.3.3" acorn "^8.8.2" @@ -2069,10 +2056,10 @@ to-regex-range@^5.0.1: dependencies: is-number "^7.0.0" -undici-types@~6.19.8: - version "6.19.8" - resolved "https://registry.yarnpkg.com/undici-types/-/undici-types-6.19.8.tgz#35111c9d1437ab83a7cdc0abae2f26d88eda0a02" - integrity sha512-ve2KP6f/JnbPBFyobGHuerC9g1FYGn/F8n1LWTwNxCEzd6IfqTwUQcNXgEtmmQ6DlRrC1hrSrBnCZPokRrDHjw== +undici-types@~6.20.0: + version "6.20.0" + resolved "https://registry.yarnpkg.com/undici-types/-/undici-types-6.20.0.tgz#8171bf22c1f588d1554d55bf204bc624af388433" + integrity sha512-Ny6QZ2Nju20vw1SRHe3d9jVu6gJ+4e3+MMpqu7pqE5HT6WsTSlce++GQmK5UXS8mzV8DSYHrQH+Xrf2jVcuKNg== unicode-canonical-property-names-ecmascript@^2.0.0: version "2.0.1" @@ -2166,15 +2153,15 @@ webpack-sources@^3.2.3: integrity sha512-/DyMEOrDgLKKIG0fmvtz+4dUX/3Ghozwgm6iPp8KRhvn+eQf9+Q7GWxVNMk3+uCPWfdXYC4ExGBckIXdFEfH1w== webpack@^5.94.0: - version "5.96.1" - resolved "https://registry.yarnpkg.com/webpack/-/webpack-5.96.1.tgz#3676d1626d8312b6b10d0c18cc049fba7ac01f0c" - integrity sha512-l2LlBSvVZGhL4ZrPwyr8+37AunkcYj5qh8o6u2/2rzoPc8gxFJkLj1WxNgooi9pnoc06jh0BjuXnamM4qlujZA== + version "5.97.1" + resolved "https://registry.yarnpkg.com/webpack/-/webpack-5.97.1.tgz#972a8320a438b56ff0f1d94ade9e82eac155fa58" + integrity sha512-EksG6gFY3L1eFMROS/7Wzgrii5mBAFe4rIr3r2BTfo7bcc+DWwFZ4OJ/miOuHJO/A85HwyI4eQ0F6IKXesO7Fg== dependencies: "@types/eslint-scope" "^3.7.7" "@types/estree" "^1.0.6" - "@webassemblyjs/ast" "^1.12.1" - "@webassemblyjs/wasm-edit" "^1.12.1" - "@webassemblyjs/wasm-parser" "^1.12.1" + "@webassemblyjs/ast" "^1.14.1" + "@webassemblyjs/wasm-edit" "^1.14.1" + "@webassemblyjs/wasm-parser" "^1.14.1" acorn "^8.14.0" browserslist "^4.24.0" chrome-trace-event "^1.0.2" From 7bb2b18dbbf3e09684b46e73f21b3dcdc79ade62 Mon Sep 17 00:00:00 2001 From: Taketo Takashima Date: Thu, 12 Dec 2024 22:57:55 +0900 Subject: [PATCH 04/13] Update rails 7.2.2.1 --- .gitignore | 6 +- .rubocop.yml | 8 + Gemfile | 10 +- Gemfile.lock | 174 +++++++++++------- app/views/layouts/application.html.slim | 2 +- app/views/pwa/manifest.json.erb | 22 +++ app/views/pwa/service-worker.js | 26 +++ bin/brakeman | 7 + bin/bundle | 109 ----------- bin/rubocop | 8 + bin/setup | 6 +- config/application.rb | 4 +- config/brakeman.yml | 4 + config/environments/development.rb | 17 +- config/environments/production.rb | 8 + config/environments/test.rb | 13 +- config/initializers/assets.rb | 2 +- .../initializers/filter_parameter_logging.rb | 2 +- config/puma.rb | 51 +++-- config/routes.rb | 4 + db/schema.rb | 3 +- public/404.html | 12 +- public/406-unsupported-browser.html | 66 +++++++ public/422.html | 12 +- public/500.html | 12 +- 25 files changed, 342 insertions(+), 246 deletions(-) create mode 100644 .rubocop.yml create mode 100644 app/views/pwa/manifest.json.erb create mode 100644 app/views/pwa/service-worker.js create mode 100755 bin/brakeman delete mode 100755 bin/bundle create mode 100755 bin/rubocop create mode 100644 config/brakeman.yml create mode 100644 public/406-unsupported-browser.html diff --git a/.gitignore b/.gitignore index af9ab3d..d02af8c 100644 --- a/.gitignore +++ b/.gitignore @@ -1,8 +1,8 @@ # See https://help.github.com/articles/ignoring-files for more about ignoring files. # -# If you find yourself ignoring temporary files generated by your text editor -# or operating system, you probably want to add a global ignore instead: -# git config --global core.excludesfile '~/.gitignore_global' +# Temporary files generated by your text editor or operating system +# belong in git's global ignore instead: +# `$XDG_CONFIG_HOME/git/ignore` or `~/.config/git/ignore` # Ignore bundler config. /.bundle diff --git a/.rubocop.yml b/.rubocop.yml new file mode 100644 index 0000000..f9d86d4 --- /dev/null +++ b/.rubocop.yml @@ -0,0 +1,8 @@ +# Omakase Ruby styling for Rails +inherit_gem: { rubocop-rails-omakase: rubocop.yml } + +# Overwrite or add rules to create your own house style +# +# # Use `[a, [b, c]]` not `[ a, [ b, c ] ]` +# Layout/SpaceInsideArrayLiteralBrackets: +# Enabled: false diff --git a/Gemfile b/Gemfile index a8c4d65..c4db7e9 100644 --- a/Gemfile +++ b/Gemfile @@ -1,6 +1,6 @@ source "https://rubygems.org" -gem "rails", "7.1.5" +gem "rails", "7.2.2.1" gem "mysql2" @@ -39,7 +39,13 @@ gem "bootsnap", require: false group :development, :test do # See https://guides.rubyonrails.org/debugging_rails_applications.html#debugging-with-the-debug-gem - gem "debug", platforms: %i[ mri windows ] + gem "debug", platforms: %i[ mri windows ], require: "debug/prelude" + + # Static analysis for security vulnerabilities [https://brakemanscanner.org/] + gem "brakeman", require: false + + # Omakase Ruby styling [https://github.com/rails/rubocop-rails-omakase/] + gem "rubocop-rails-omakase", require: false end # Use Capistrano for deployment diff --git a/Gemfile.lock b/Gemfile.lock index 92db073..f087747 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -1,87 +1,82 @@ GEM remote: https://rubygems.org/ specs: - actioncable (7.1.5) - actionpack (= 7.1.5) - activesupport (= 7.1.5) + actioncable (7.2.2.1) + actionpack (= 7.2.2.1) + activesupport (= 7.2.2.1) nio4r (~> 2.0) websocket-driver (>= 0.6.1) zeitwerk (~> 2.6) - actionmailbox (7.1.5) - actionpack (= 7.1.5) - activejob (= 7.1.5) - activerecord (= 7.1.5) - activestorage (= 7.1.5) - activesupport (= 7.1.5) - mail (>= 2.7.1) - net-imap - net-pop - net-smtp - actionmailer (7.1.5) - actionpack (= 7.1.5) - actionview (= 7.1.5) - activejob (= 7.1.5) - activesupport (= 7.1.5) - mail (~> 2.5, >= 2.5.4) - net-imap - net-pop - net-smtp + actionmailbox (7.2.2.1) + actionpack (= 7.2.2.1) + activejob (= 7.2.2.1) + activerecord (= 7.2.2.1) + activestorage (= 7.2.2.1) + activesupport (= 7.2.2.1) + mail (>= 2.8.0) + actionmailer (7.2.2.1) + actionpack (= 7.2.2.1) + actionview (= 7.2.2.1) + activejob (= 7.2.2.1) + activesupport (= 7.2.2.1) + mail (>= 2.8.0) rails-dom-testing (~> 2.2) - actionpack (7.1.5) - actionview (= 7.1.5) - activesupport (= 7.1.5) + actionpack (7.2.2.1) + actionview (= 7.2.2.1) + activesupport (= 7.2.2.1) nokogiri (>= 1.8.5) racc - rack (>= 2.2.4) + rack (>= 2.2.4, < 3.2) rack-session (>= 1.0.1) rack-test (>= 0.6.3) rails-dom-testing (~> 2.2) rails-html-sanitizer (~> 1.6) - actiontext (7.1.5) - actionpack (= 7.1.5) - activerecord (= 7.1.5) - activestorage (= 7.1.5) - activesupport (= 7.1.5) + useragent (~> 0.16) + actiontext (7.2.2.1) + actionpack (= 7.2.2.1) + activerecord (= 7.2.2.1) + activestorage (= 7.2.2.1) + activesupport (= 7.2.2.1) globalid (>= 0.6.0) nokogiri (>= 1.8.5) - actionview (7.1.5) - activesupport (= 7.1.5) + actionview (7.2.2.1) + activesupport (= 7.2.2.1) builder (~> 3.1) erubi (~> 1.11) rails-dom-testing (~> 2.2) rails-html-sanitizer (~> 1.6) - activejob (7.1.5) - activesupport (= 7.1.5) + activejob (7.2.2.1) + activesupport (= 7.2.2.1) globalid (>= 0.3.6) - activemodel (7.1.5) - activesupport (= 7.1.5) - activerecord (7.1.5) - activemodel (= 7.1.5) - activesupport (= 7.1.5) + activemodel (7.2.2.1) + activesupport (= 7.2.2.1) + activerecord (7.2.2.1) + activemodel (= 7.2.2.1) + activesupport (= 7.2.2.1) timeout (>= 0.4.0) - activestorage (7.1.5) - actionpack (= 7.1.5) - activejob (= 7.1.5) - activerecord (= 7.1.5) - activesupport (= 7.1.5) + activestorage (7.2.2.1) + actionpack (= 7.2.2.1) + activejob (= 7.2.2.1) + activerecord (= 7.2.2.1) + activesupport (= 7.2.2.1) marcel (~> 1.0) - activesupport (7.1.5) + activesupport (7.2.2.1) base64 benchmark (>= 0.3) bigdecimal - concurrent-ruby (~> 1.0, >= 1.0.2) + concurrent-ruby (~> 1.0, >= 1.3.1) connection_pool (>= 2.2.5) drb i18n (>= 1.6, < 2) logger (>= 1.4.2) minitest (>= 5.1) - mutex_m securerandom (>= 0.3) - tzinfo (~> 2.0) + tzinfo (~> 2.0, >= 2.0.5) addressable (2.8.7) public_suffix (>= 2.0.2, < 7.0) airbrussh (1.5.3) sshkit (>= 1.6.1, != 1.7.0) + ast (2.4.2) awesome_print (1.9.2) base64 (0.2.0) bcrypt (3.1.20) @@ -89,6 +84,8 @@ GEM bigdecimal (3.1.8) bootsnap (1.18.4) msgpack (~> 1.2) + brakeman (6.2.2) + racc breadcrumbs_on_rails (4.1.0) railties (>= 5.0) builder (3.3.0) @@ -157,6 +154,7 @@ GEM activesupport (>= 5.0.0) jsbundling-rails (1.3.1) railties (>= 6.0.0) + json (2.9.0) kaminari (1.2.2) activesupport (>= 4.1.0) kaminari-actionview (= 1.2.2) @@ -169,6 +167,7 @@ GEM activerecord kaminari-core (= 1.2.2) kaminari-core (1.2.2) + language_server-protocol (3.17.0.3) logger (1.6.2) loofah (2.23.1) crass (~> 1.0.2) @@ -184,7 +183,6 @@ GEM mini_portile2 (2.8.8) minitest (5.25.4) msgpack (1.7.5) - mutex_m (0.3.0) mysql2 (0.5.6) net-imap (0.5.1) date @@ -206,6 +204,10 @@ GEM racc (~> 1.4) orm_adapter (0.5.0) ostruct (0.6.1) + parallel (1.26.3) + parser (3.3.6.0) + ast (~> 2.4.1) + racc psych (5.2.1) date stringio @@ -222,20 +224,20 @@ GEM rack (>= 1.3) rackup (2.2.1) rack (>= 3) - rails (7.1.5) - actioncable (= 7.1.5) - actionmailbox (= 7.1.5) - actionmailer (= 7.1.5) - actionpack (= 7.1.5) - actiontext (= 7.1.5) - actionview (= 7.1.5) - activejob (= 7.1.5) - activemodel (= 7.1.5) - activerecord (= 7.1.5) - activestorage (= 7.1.5) - activesupport (= 7.1.5) + rails (7.2.2.1) + actioncable (= 7.2.2.1) + actionmailbox (= 7.2.2.1) + actionmailer (= 7.2.2.1) + actionpack (= 7.2.2.1) + actiontext (= 7.2.2.1) + actionview (= 7.2.2.1) + activejob (= 7.2.2.1) + activemodel (= 7.2.2.1) + activerecord (= 7.2.2.1) + activestorage (= 7.2.2.1) + activesupport (= 7.2.2.1) bundler (>= 1.15.0) - railties (= 7.1.5) + railties (= 7.2.2.1) rails-controller-testing (1.0.5) actionpack (>= 5.0.1.rc1) actionview (>= 5.0.1.rc1) @@ -252,14 +254,15 @@ GEM rails-html-sanitizer (1.6.1) loofah (~> 2.21) nokogiri (>= 1.15.7, != 1.16.7, != 1.16.6, != 1.16.5, != 1.16.4, != 1.16.3, != 1.16.2, != 1.16.1, != 1.16.0.rc1, != 1.16.0) - railties (7.1.5) - actionpack (= 7.1.5) - activesupport (= 7.1.5) - irb + railties (7.2.2.1) + actionpack (= 7.2.2.1) + activesupport (= 7.2.2.1) + irb (~> 1.13) rackup (>= 1.0.0) rake (>= 12.2) thor (~> 1.0, >= 1.2.2) zeitwerk (~> 2.6) + rainbow (3.1.1) rake (13.2.1) ransack (4.2.1) activerecord (>= 6.1.5) @@ -291,8 +294,37 @@ GEM rspec-mocks (~> 3.13) rspec-support (~> 3.13) rspec-support (3.13.2) + rubocop (1.69.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.9.3, < 3.0) + rubocop-ast (>= 1.36.2, < 2.0) + ruby-progressbar (~> 1.7) + unicode-display_width (>= 2.4.0, < 4.0) + rubocop-ast (1.36.2) + parser (>= 3.3.1.0) + rubocop-minitest (0.36.0) + rubocop (>= 1.61, < 2.0) + rubocop-ast (>= 1.31.1, < 2.0) + rubocop-performance (1.23.0) + rubocop (>= 1.48.1, < 2.0) + rubocop-ast (>= 1.31.1, < 2.0) + 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-rails-omakase (1.0.0) + rubocop + rubocop-minitest + rubocop-performance + rubocop-rails ruby-graphviz (1.2.5) rexml + ruby-progressbar (1.13.0) rubyzip (2.3.2) securerandom (0.4.0) selenium-webdriver (4.27.0) @@ -329,6 +361,10 @@ GEM timeout (0.4.2) tzinfo (2.0.6) concurrent-ruby (~> 1.0) + unicode-display_width (3.1.2) + unicode-emoji (~> 4.0, >= 4.0.4) + unicode-emoji (4.0.4) + useragent (0.16.11) warden (1.2.9) rack (>= 2.0.9) websocket (1.2.11) @@ -346,6 +382,7 @@ DEPENDENCIES awesome_print bcrypt (~> 3.1.7) bootsnap + brakeman breadcrumbs_on_rails capistrano-bundler capistrano-ext @@ -364,11 +401,12 @@ DEPENDENCIES mysql2 puma (>= 5.0) rack-mini-profiler - rails (= 7.1.5) + rails (= 7.2.2.1) rails-controller-testing rails-erd ransack rspec-rails + rubocop-rails-omakase selenium-webdriver slack-notifier slim-rails diff --git a/app/views/layouts/application.html.slim b/app/views/layouts/application.html.slim index ac17753..06cca42 100644 --- a/app/views/layouts/application.html.slim +++ b/app/views/layouts/application.html.slim @@ -9,7 +9,7 @@ html = stylesheet_link_tag 'application' = javascript_include_tag yield(:js_entrypoint).blank? ? 'application' : yield(:js_entrypoint), type: "module" - = content_for :header + = content_for :head body header diff --git a/app/views/pwa/manifest.json.erb b/app/views/pwa/manifest.json.erb new file mode 100644 index 0000000..c1c2283 --- /dev/null +++ b/app/views/pwa/manifest.json.erb @@ -0,0 +1,22 @@ +{ + "name": "SindanVisualization", + "icons": [ + { + "src": "/icon.png", + "type": "image/png", + "sizes": "512x512" + }, + { + "src": "/icon.png", + "type": "image/png", + "sizes": "512x512", + "purpose": "maskable" + } + ], + "start_url": "/", + "display": "standalone", + "scope": "/", + "description": "SindanVisualization.", + "theme_color": "red", + "background_color": "red" +} diff --git a/app/views/pwa/service-worker.js b/app/views/pwa/service-worker.js new file mode 100644 index 0000000..b3a13fb --- /dev/null +++ b/app/views/pwa/service-worker.js @@ -0,0 +1,26 @@ +// Add a service worker for processing Web Push notifications: +// +// self.addEventListener("push", async (event) => { +// const { title, options } = await event.data.json() +// event.waitUntil(self.registration.showNotification(title, options)) +// }) +// +// self.addEventListener("notificationclick", function(event) { +// event.notification.close() +// event.waitUntil( +// clients.matchAll({ type: "window" }).then((clientList) => { +// for (let i = 0; i < clientList.length; i++) { +// let client = clientList[i] +// let clientPath = (new URL(client.url)).pathname +// +// if (clientPath == event.notification.data.path && "focus" in client) { +// return client.focus() +// } +// } +// +// if (clients.openWindow) { +// return clients.openWindow(event.notification.data.path) +// } +// }) +// ) +// }) diff --git a/bin/brakeman b/bin/brakeman new file mode 100755 index 0000000..ace1c9b --- /dev/null +++ b/bin/brakeman @@ -0,0 +1,7 @@ +#!/usr/bin/env ruby +require "rubygems" +require "bundler/setup" + +ARGV.unshift("--ensure-latest") + +load Gem.bin_path("brakeman", "brakeman") diff --git a/bin/bundle b/bin/bundle deleted file mode 100755 index 42c7fd7..0000000 --- a/bin/bundle +++ /dev/null @@ -1,109 +0,0 @@ -#!/usr/bin/env ruby -# frozen_string_literal: true - -# -# This file was generated by Bundler. -# -# The application 'bundle' is installed as part of a gem, and -# this file is here to facilitate running it. -# - -require "rubygems" - -m = Module.new do - module_function - - def invoked_as_script? - File.expand_path($0) == File.expand_path(__FILE__) - end - - def env_var_version - ENV["BUNDLER_VERSION"] - end - - def cli_arg_version - return unless invoked_as_script? # don't want to hijack other binstubs - return unless "update".start_with?(ARGV.first || " ") # must be running `bundle update` - bundler_version = nil - update_index = nil - ARGV.each_with_index do |a, i| - if update_index && update_index.succ == i && a =~ Gem::Version::ANCHORED_VERSION_PATTERN - bundler_version = a - end - next unless a =~ /\A--bundler(?:[= ](#{Gem::Version::VERSION_PATTERN}))?\z/ - bundler_version = $1 - update_index = i - end - bundler_version - end - - def gemfile - gemfile = ENV["BUNDLE_GEMFILE"] - return gemfile if gemfile && !gemfile.empty? - - File.expand_path("../Gemfile", __dir__) - end - - def lockfile - lockfile = - case File.basename(gemfile) - when "gems.rb" then gemfile.sub(/\.rb$/, ".locked") - else "#{gemfile}.lock" - end - File.expand_path(lockfile) - end - - def lockfile_version - return unless File.file?(lockfile) - lockfile_contents = File.read(lockfile) - return unless lockfile_contents =~ /\n\nBUNDLED WITH\n\s{2,}(#{Gem::Version::VERSION_PATTERN})\n/ - Regexp.last_match(1) - end - - def bundler_requirement - @bundler_requirement ||= - env_var_version || - cli_arg_version || - bundler_requirement_for(lockfile_version) - end - - def bundler_requirement_for(version) - return "#{Gem::Requirement.default}.a" unless version - - bundler_gem_version = Gem::Version.new(version) - - bundler_gem_version.approximate_recommendation - end - - def load_bundler! - ENV["BUNDLE_GEMFILE"] ||= gemfile - - activate_bundler - end - - def activate_bundler - gem_error = activation_error_handling do - gem "bundler", bundler_requirement - end - return if gem_error.nil? - require_error = activation_error_handling do - require "bundler/version" - end - return if require_error.nil? && Gem::Requirement.new(bundler_requirement).satisfied_by?(Gem::Version.new(Bundler::VERSION)) - warn "Activating bundler (#{bundler_requirement}) failed:\n#{gem_error.message}\n\nTo install the version of bundler this project requires, run `gem install bundler -v '#{bundler_requirement}'`" - exit 42 - end - - def activation_error_handling - yield - nil - rescue StandardError, LoadError => e - e - end -end - -m.load_bundler! - -if m.invoked_as_script? - load Gem.bin_path("bundler", "bundle") -end diff --git a/bin/rubocop b/bin/rubocop new file mode 100755 index 0000000..40330c0 --- /dev/null +++ b/bin/rubocop @@ -0,0 +1,8 @@ +#!/usr/bin/env ruby +require "rubygems" +require "bundler/setup" + +# explicit rubocop config increases performance slightly while avoiding config confusion. +ARGV.unshift("--config", File.expand_path("../.rubocop.yml", __dir__)) + +load Gem.bin_path("rubocop", "rubocop") diff --git a/bin/setup b/bin/setup index d38bf9f..54bf636 100755 --- a/bin/setup +++ b/bin/setup @@ -1,8 +1,8 @@ #!/usr/bin/env ruby require "fileutils" -# path to your application root. APP_ROOT = File.expand_path("..", __dir__) +APP_NAME = "sindan-visualization" def system!(*args) system(*args, exception: true) @@ -33,4 +33,8 @@ FileUtils.chdir APP_ROOT do puts "\n== Restarting application server ==" system! "bin/rails restart" + + # puts "\n== Configuring puma-dev ==" + # system "ln -nfs #{APP_ROOT} ~/.puma-dev/#{APP_NAME}" + # system "curl -Is https://#{APP_NAME}.test/up | head -n 1" end diff --git a/config/application.rb b/config/application.rb index 726d00b..7649712 100644 --- a/config/application.rb +++ b/config/application.rb @@ -21,7 +21,7 @@ module SindanVisualization class Application < Rails::Application # Initialize configuration defaults for originally generated Rails version. - config.load_defaults 7.1 + config.load_defaults 7.2 Rails.application.config.active_record.belongs_to_required_by_default = false Rails.application.config.active_record.default_column_serializer = YAML @@ -29,7 +29,7 @@ class Application < Rails::Application # Please, add to the `ignore` list any other `lib` subdirectories that do # not contain `.rb` files, or that should not be reloaded or eager loaded. # Common ones are `templates`, `generators`, or `middleware`, for example. - config.autoload_lib(ignore: %w(assets tasks)) + config.autoload_lib(ignore: %w[assets tasks]) # Configuration for the application, engines, and railties goes here. # diff --git a/config/brakeman.yml b/config/brakeman.yml new file mode 100644 index 0000000..526cf1a --- /dev/null +++ b/config/brakeman.yml @@ -0,0 +1,4 @@ +--- +:pager: false +:safe_methods: +- :hbr diff --git a/config/environments/development.rb b/config/environments/development.rb index cb7580b..f6502d8 100644 --- a/config/environments/development.rb +++ b/config/environments/development.rb @@ -14,7 +14,7 @@ # Show full error reports. config.consider_all_requests_local = true - # Enable server timing + # Enable server timing. config.server_timing = true # Enable/disable caching. By default caching is disabled. @@ -24,9 +24,7 @@ config.action_controller.enable_fragment_cache_logging = true config.cache_store = :memory_store - config.public_file_server.headers = { - "Cache-Control" => "public, max-age=#{2.days.to_i}" - } + config.public_file_server.headers = { "Cache-Control" => "public, max-age=#{2.days.to_i}" } else config.action_controller.perform_caching = false @@ -39,9 +37,11 @@ # Don't care if the mailer can't send. config.action_mailer.raise_delivery_errors = false + # Disable caching for Action Mailer templates even if Action Controller + # caching is enabled. config.action_mailer.perform_caching = false - config.action_mailer.default_url_options = { host: 'localhost', port: 3000 } + config.action_mailer.default_url_options = { host: "localhost", port: 3000 } # Print deprecation notices to the Rails logger. config.active_support.deprecation = :log @@ -68,14 +68,17 @@ # config.i18n.raise_on_missing_translations = true # Annotate rendered view with file names. - # config.action_view.annotate_rendered_view_with_filenames = true + config.action_view.annotate_rendered_view_with_filenames = true # Uncomment if you wish to allow Action Cable access from any origin. # config.action_cable.disable_request_forgery_protection = true - # Raise error when a before_action's only/except options reference missing actions + # Raise error when a before_action's only/except options reference missing actions. config.action_controller.raise_on_missing_callback_actions = true + # Apply autocorrection by RuboCop to files generated by `bin/rails generate`. + # config.generators.apply_rubocop_autocorrect_after_generate! + # for ruby deprecated warning Warning[:deprecated] = true end diff --git a/config/environments/production.rb b/config/environments/production.rb index 07b7118..1139d5f 100644 --- a/config/environments/production.rb +++ b/config/environments/production.rb @@ -53,6 +53,9 @@ # Force all access to the app over SSL, use Strict-Transport-Security, and use secure cookies. config.force_ssl = false + # Skip http-to-https redirect for the default health check endpoint. + # config.ssl_options = { redirect: { exclude: ->(request) { request.path == "/up" } } } + # Log to STDOUT by default #config.logger = ActiveSupport::Logger.new(STDOUT) # .tap { |logger| logger.formatter = ::Logger::Formatter.new } @@ -73,6 +76,8 @@ # config.active_job.queue_adapter = :resque # config.active_job.queue_name_prefix = "sindan_visualization_production" + # Disable caching for Action Mailer templates even if Action Controller + # caching is enabled. config.action_mailer.perform_caching = false # Ignore bad email addresses and do not raise email delivery errors. @@ -89,6 +94,9 @@ # Do not dump schema after migrations. config.active_record.dump_schema_after_migration = false + # Only use :id for inspections in production. + config.active_record.attributes_for_inspect = [ :id ] + # Enable DNS rebinding protection and other `Host` header attacks. # config.hosts = [ # "example.com", # Allow requests from example.com diff --git a/config/environments/test.rb b/config/environments/test.rb index 61cff10..b92a6b4 100644 --- a/config/environments/test.rb +++ b/config/environments/test.rb @@ -18,10 +18,7 @@ config.eager_load = ENV["CI"].present? # Configure public file server for tests with Cache-Control for performance. - config.public_file_server.enabled = true - config.public_file_server.headers = { - "Cache-Control" => "public, max-age=#{1.hour.to_i}" - } + config.public_file_server.headers = { "Cache-Control" => "public, max-age=#{1.hour.to_i}" } # Show full error reports and disable caching. config.consider_all_requests_local = true @@ -37,6 +34,8 @@ # Store uploaded files on the local file system in a temporary directory. config.active_storage.service = :test + # Disable caching for Action Mailer templates even if Action Controller + # caching is enabled. config.action_mailer.perform_caching = false # Tell Action Mailer not to deliver emails to the real world. @@ -44,6 +43,10 @@ # ActionMailer::Base.deliveries array. config.action_mailer.delivery_method = :test + # Unlike controllers, the mailer instance doesn't have any context about the + # incoming request so you'll need to provide the :host parameter yourself. + config.action_mailer.default_url_options = { host: "www.example.com" } + # Print deprecation notices to the stderr. config.active_support.deprecation = :stderr @@ -59,7 +62,7 @@ # Annotate rendered view with file names. # config.action_view.annotate_rendered_view_with_filenames = true - # Raise error when a before_action's only/except options reference missing actions + # Raise error when a before_action's only/except options reference missing actions. config.action_controller.raise_on_missing_callback_actions = true # for ruby deprecated warning diff --git a/config/initializers/assets.rb b/config/initializers/assets.rb index 2eeef96..bd5bcd2 100644 --- a/config/initializers/assets.rb +++ b/config/initializers/assets.rb @@ -9,4 +9,4 @@ # Precompile additional assets. # application.js, application.css, and all non-JS/CSS in the app/assets # folder are already added. -# Rails.application.config.assets.precompile += %w( admin.js admin.css ) +# Rails.application.config.assets.precompile += %w[ admin.js admin.css ] diff --git a/config/initializers/filter_parameter_logging.rb b/config/initializers/filter_parameter_logging.rb index c2d89e2..c010b83 100644 --- a/config/initializers/filter_parameter_logging.rb +++ b/config/initializers/filter_parameter_logging.rb @@ -4,5 +4,5 @@ # Use this to limit dissemination of sensitive information. # See the ActiveSupport::ParameterFilter documentation for supported notations and behaviors. Rails.application.config.filter_parameters += [ - :passw, :secret, :token, :_key, :crypt, :salt, :certificate, :otp, :ssn + :passw, :email, :secret, :token, :_key, :crypt, :salt, :certificate, :otp, :ssn ] diff --git a/config/puma.rb b/config/puma.rb index afa809b..03c166f 100644 --- a/config/puma.rb +++ b/config/puma.rb @@ -2,34 +2,33 @@ # are invoked here are part of Puma's configuration DSL. For more information # about methods provided by the DSL, see https://puma.io/puma/Puma/DSL.html. -# Puma can serve each request in a thread from an internal thread pool. -# The `threads` method setting takes two numbers: a minimum and maximum. -# Any libraries that use thread pools should be configured to match -# the maximum value specified for Puma. Default is set to 5 threads for minimum -# and maximum; this matches the default thread size of Active Record. -max_threads_count = ENV.fetch("RAILS_MAX_THREADS") { 5 } -min_threads_count = ENV.fetch("RAILS_MIN_THREADS") { max_threads_count } -threads min_threads_count, max_threads_count - -# Specifies that the worker count should equal the number of processors in production. -if ENV["RAILS_ENV"] == "production" - require "concurrent-ruby" - worker_count = Integer(ENV.fetch("WEB_CONCURRENCY") { Concurrent.physical_processor_count }) - workers worker_count if worker_count > 1 -end - -# Specifies the `worker_timeout` threshold that Puma will use to wait before -# terminating a worker in development environments. -worker_timeout 3600 if ENV.fetch("RAILS_ENV", "development") == "development" +# Puma starts a configurable number of processes (workers) and each process +# serves each request in a thread from an internal thread pool. +# +# The ideal number of threads per worker depends both on how much time the +# application spends waiting for IO operations and on how much you wish to +# to prioritize throughput over latency. +# +# As a rule of thumb, increasing the number of threads will increase how much +# traffic a given process can handle (throughput), but due to CRuby's +# Global VM Lock (GVL) it has diminishing returns and will degrade the +# response time (latency) of the application. +# +# The default is set to 3 threads as it's deemed a decent compromise between +# throughput and latency for the average Rails application. +# +# Any libraries that use a connection pool or another resource pool should +# be configured to provide at least as many connections as the number of +# threads. This includes Active Record's `pool` parameter in `database.yml`. +threads_count = ENV.fetch("RAILS_MAX_THREADS", 3) +threads threads_count, threads_count # Specifies the `port` that Puma will listen on to receive requests; default is 3000. -port ENV.fetch("PORT") { 3000 } - -# Specifies the `environment` that Puma will run in. -environment ENV.fetch("RAILS_ENV") { "development" } - -# Specifies the `pidfile` that Puma will use. -pidfile ENV.fetch("PIDFILE") { "tmp/pids/server.pid" } +port ENV.fetch("PORT", 3000) # Allow puma to be restarted by `bin/rails restart` command. plugin :tmp_restart + +# Specify the PID file. Defaults to tmp/pids/server.pid in development. +# In other environments, only set the PID file if requested. +pidfile ENV["PIDFILE"] if ENV["PIDFILE"] diff --git a/config/routes.rb b/config/routes.rb index 3a5dac9..ef1d23d 100644 --- a/config/routes.rb +++ b/config/routes.rb @@ -24,4 +24,8 @@ # Reveal health status on /up that returns 200 if the app boots with no exceptions, otherwise 500. # Can be used by load balancers and uptime monitors to verify that the app is live. get "up" => "rails/health#show", as: :rails_health_check + + # Render dynamic PWA files from app/views/pwa/* + # get "service-worker" => "rails/pwa#service_worker", as: :pwa_service_worker + # get "manifest" => "rails/pwa#manifest", as: :pwa_manifest end diff --git a/db/schema.rb b/db/schema.rb index b0cc5fc..15c5bc0 100644 --- a/db/schema.rb +++ b/db/schema.rb @@ -10,7 +10,7 @@ # # It's strongly recommended that you check this file into your version control system. -ActiveRecord::Schema[7.1].define(version: 2020_09_29_043200) do +ActiveRecord::Schema[7.2].define(version: 2020_09_29_043200) do create_table "diagnosis_logs", id: :integer, charset: "utf8mb3", force: :cascade do |t| t.string "layer" t.string "log_type" @@ -67,5 +67,4 @@ t.index ["login"], name: "index_users_on_login", unique: true t.index ["reset_password_token"], name: "index_users_on_reset_password_token", unique: true end - end diff --git a/public/404.html b/public/404.html index b612547..2be3af2 100644 --- a/public/404.html +++ b/public/404.html @@ -4,7 +4,7 @@ The page you were looking for doesn't exist (404) - +
diff --git a/public/406-unsupported-browser.html b/public/406-unsupported-browser.html new file mode 100644 index 0000000..7cf1e16 --- /dev/null +++ b/public/406-unsupported-browser.html @@ -0,0 +1,66 @@ + + + + Your browser is not supported (406) + + + + + + +
+
+

Your browser is not supported.

+

Please upgrade your browser to continue.

+
+
+ + diff --git a/public/422.html b/public/422.html index a21f82b..c08eac0 100644 --- a/public/422.html +++ b/public/422.html @@ -4,7 +4,7 @@ The change you wanted was rejected (422) - +
diff --git a/public/500.html b/public/500.html index 061abc5..78a030a 100644 --- a/public/500.html +++ b/public/500.html @@ -4,7 +4,7 @@ We're sorry, but something went wrong (500) - +
From 7747a3bba48e16ec2211596f7c5f3d8a48ba8a03 Mon Sep 17 00:00:00 2001 From: Taketo Takashima Date: Thu, 12 Dec 2024 23:04:31 +0900 Subject: [PATCH 05/13] Fix PRECATION WARNING: Defining enums with keyword arguments is deprecated and will be removed in Rails 8.0 --- app/models/diagnosis_log.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/models/diagnosis_log.rb b/app/models/diagnosis_log.rb index efe3746..da2e96f 100644 --- a/app/models/diagnosis_log.rb +++ b/app/models/diagnosis_log.rb @@ -1,7 +1,7 @@ class DiagnosisLog < ApplicationRecord belongs_to :log_campaign, foreign_key: :log_campaign_uuid, primary_key: :log_campaign_uuid, touch: true - enum result: { + enum :result, { fail: 0, success: 1, information: 10, From c2324f23311f9d1dbb06816fe1e3a8a9b6644585 Mon Sep 17 00:00:00 2001 From: Taketo Takashima Date: Thu, 12 Dec 2024 23:06:08 +0900 Subject: [PATCH 06/13] Update rspec config --- spec/rails_helper.rb | 25 +++++++++++++++---------- 1 file changed, 15 insertions(+), 10 deletions(-) diff --git a/spec/rails_helper.rb b/spec/rails_helper.rb index af5e595..ec8fed9 100644 --- a/spec/rails_helper.rb +++ b/spec/rails_helper.rb @@ -4,6 +4,9 @@ require_relative '../config/environment' # Prevent database truncation if the environment is production abort("The Rails environment is running in production mode!") if Rails.env.production? +# Uncomment the line below in case you have `--require rails_helper` in the `.rspec` file +# that will avoid rails generators crashing because migrations haven't been run yet +# return unless Rails.env.test? require 'rspec/rails' # Add additional requires below this line. Rails is not loaded until this point! @@ -20,7 +23,7 @@ # directory. Alternatively, in the individual `*_spec.rb` files, manually # require only the support files necessary. # -Rails.root.glob('spec/support/**/*.rb').sort.each { |f| require f } +Rails.root.glob('spec/support/**/*.rb').sort_by(&:to_s).each { |f| require f } # Checks for pending migrations and applies them before tests are run. # If you are not using ActiveRecord, you can remove these lines. @@ -43,20 +46,22 @@ # You can uncomment this line to turn off ActiveRecord support entirely. # config.use_active_record = false - # RSpec Rails can automatically mix in different behaviours to your tests - # based on their file location, for example enabling you to call `get` and - # `post` in specs under `spec/controllers`. + # RSpec Rails uses metadata to mix in different behaviours to your tests, + # for example enabling you to call `get` and `post` in request specs. e.g.: # - # You can disable this behaviour by removing the line below, and instead - # explicitly tag your specs with their type, e.g.: - # - # RSpec.describe UsersController, type: :controller do + # RSpec.describe UsersController, type: :request do # # ... # end # # The different available types are documented in the features, such as in - # https://rspec.info/features/6-0/rspec-rails - config.infer_spec_type_from_file_location! + # https://rspec.info/features/7-0/rspec-rails + # + # You can also this infer these behaviours automatically by location, e.g. + # /spec/models would pull in the same behaviour as `type: :model` but this + # behaviour is considered legacy and will be removed in a future version. + # + # To enable this behaviour uncomment the line below. + # config.infer_spec_type_from_file_location! # Filter lines from Rails gems in backtraces. config.filter_rails_from_backtrace! From 0fe659718625448918fd5723f32cd4c1237885d3 Mon Sep 17 00:00:00 2001 From: Taketo Takashima Date: Thu, 12 Dec 2024 23:12:08 +0900 Subject: [PATCH 07/13] Update jsbundling-rails --- bin/dev | 2 +- package.json | 9 +++++---- config/webpack/webpack.config.js => webpack.config.js | 8 ++++---- 3 files changed, 10 insertions(+), 9 deletions(-) rename config/webpack/webpack.config.js => webpack.config.js (82%) diff --git a/bin/dev b/bin/dev index eda330c..d80a02d 100755 --- a/bin/dev +++ b/bin/dev @@ -8,4 +8,4 @@ fi # Default to port 3000 if not specified export PORT="${PORT:-3000}" -exec foreman start -f Procfile.dev "$@" +exec foreman start -f Procfile.dev --env /dev/null "$@" diff --git a/package.json b/package.json index e0a8acc..b40a5ba 100644 --- a/package.json +++ b/package.json @@ -1,4 +1,9 @@ { + "name": "sindan_visualization", + "private": true, + "scripts": { + "build": "webpack --config webpack.config.js" + }, "dependencies": { "@babel/core": "^7.18.6", "@babel/preset-env": "^7.18.6", @@ -17,9 +22,5 @@ "webpack": "^5.94.0", "webpack-cli": "^5.0.0", "webpack-remove-empty-scripts": "^1.0.0" - }, - "devDependencies": {}, - "scripts": { - "build": "webpack --config ./config/webpack/webpack.config.js" } } diff --git a/config/webpack/webpack.config.js b/webpack.config.js similarity index 82% rename from config/webpack/webpack.config.js rename to webpack.config.js index da978a3..c20cab1 100644 --- a/config/webpack/webpack.config.js +++ b/webpack.config.js @@ -24,7 +24,7 @@ module.exports = { filename: "[name].js", sourceMapFilename: "[file].map", chunkFormat: "module", - path: path.resolve(__dirname, "..", "..", "app/assets/builds"), + path: path.resolve(__dirname, "app/assets/builds"), }, plugins: [ new webpack.optimize.LimitChunkCountPlugin({ @@ -62,9 +62,9 @@ module.exports = { // Add additional file types extensions: ['.js', '.jsx', '.scss', '.css'], alias: { - '@js': path.resolve(__dirname, '..', '..', 'app/frontend', 'javascripts'), - '@components': path.resolve(__dirname, '..', '..', 'app/frontend', 'javascripts', 'components'), - '@css': path.resolve(__dirname, '..', '..', 'app/frontend', 'stylesheets') + '@js': path.resolve(__dirname, 'app/frontend', 'javascripts'), + '@components': path.resolve(__dirname, 'app/frontend', 'javascripts', 'components'), + '@css': path.resolve(__dirname, 'app/frontend', 'stylesheets') } } } From 6c334f41f9fbbfcd8c17126742a87563fe20afee Mon Sep 17 00:00:00 2001 From: Taketo Takashima Date: Thu, 12 Dec 2024 23:12:37 +0900 Subject: [PATCH 08/13] Update locale --- config/locales/en.yml | 15 +++++++++------ config/locales/ja.yml | 3 ++- 2 files changed, 11 insertions(+), 7 deletions(-) diff --git a/config/locales/en.yml b/config/locales/en.yml index 7f476f9..7d6882a 100644 --- a/config/locales/en.yml +++ b/config/locales/en.yml @@ -20,7 +20,7 @@ en: - Fri - Sat abbr_month_names: - - + - - Jan - Feb - Mar @@ -46,7 +46,7 @@ en: long: "%B %d, %Y" short: "%b %d" month_names: - - + - - January - February - March @@ -60,9 +60,9 @@ en: - November - December order: - - :year - - :month - - :day + - year + - month + - day datetime: distance_in_words: about_x_hours: @@ -103,7 +103,7 @@ en: one: "%{count} year" other: "%{count} years" prompts: - second: Second + second: Seconds minute: Minute hour: Hour day: Day @@ -131,6 +131,7 @@ en: not_an_integer: must be an integer odd: must be odd other_than: must be other than %{count} + password_too_long: is too long present: must be blank required: must exist taken: has already been taken @@ -160,6 +161,7 @@ en: format: delimiter: "," format: "%u%n" + negative_format: "-%u%n" precision: 2 separator: "." significant: false @@ -199,6 +201,7 @@ en: mb: MB pb: PB tb: TB + zb: ZB percentage: format: delimiter: '' diff --git a/config/locales/ja.yml b/config/locales/ja.yml index 3bc21a5..c51f302 100644 --- a/config/locales/ja.yml +++ b/config/locales/ja.yml @@ -180,7 +180,8 @@ ja: time: am: 午前 formats: + #default: "%Y年%m月%d日(%a) %H時%M分%S秒 %z" default: "%Y/%m/%d %H:%M:%S" - long: "%Y年%m月%d日(%a) %H時%M分%S秒 %z" + long: "%Y/%m/%d %H:%M" short: "%m/%d %H:%M" pm: 午後 From 9cbc3b32378d422341d66d3af8b58f500047b0c1 Mon Sep 17 00:00:00 2001 From: Taketo Takashima Date: Thu, 12 Dec 2024 23:14:05 +0900 Subject: [PATCH 09/13] Replace from @rails/ujs to alt-ujs --- app/frontend/javascripts/common.js | 6 +++--- package.json | 2 +- yarn.lock | 17 ++++++++++++----- 3 files changed, 16 insertions(+), 9 deletions(-) diff --git a/app/frontend/javascripts/common.js b/app/frontend/javascripts/common.js index 495e7b9..8549d93 100644 --- a/app/frontend/javascripts/common.js +++ b/app/frontend/javascripts/common.js @@ -3,10 +3,10 @@ // a relevant structure within app/javascript and only use these pack files to reference // that code so it'll be compiled. -import Rails from "@rails/ujs" -//import * as ActiveStorage from "@rails/activestorage" +import AltUjs from "alt-ujs" +AltUjs.start() -Rails.start() +//import * as ActiveStorage from "@rails/activestorage" //ActiveStorage.start() // lib diff --git a/package.json b/package.json index b40a5ba..b5e595f 100644 --- a/package.json +++ b/package.json @@ -10,7 +10,7 @@ "@eonasdan/tempus-dominus": "^6.9.10", "@fortawesome/fontawesome-free": "^5.15.3", "@popperjs/core": "^2.9.2", - "@rails/ujs": "7.1.500", + "alt-ujs": "^1.0.0", "babel-loader": "^9.0.0", "bootstrap": "^5.0.1", "css-loader": "^7.0.0", diff --git a/yarn.lock b/yarn.lock index 793782f..b2d780a 100644 --- a/yarn.lock +++ b/yarn.lock @@ -932,11 +932,6 @@ resolved "https://registry.yarnpkg.com/@popperjs/core/-/core-2.11.8.tgz#6b79032e760a0899cd4204710beede972a3a185f" integrity sha512-P1st0aksCrn9sGZhp8GMYwBnQsbvAWsZAX44oXNNvLHGqAOcoVxmjZiohstwQ7SqKnbR47akdNi+uleWD8+g6A== -"@rails/ujs@7.1.500": - version "7.1.500" - resolved "https://registry.yarnpkg.com/@rails/ujs/-/ujs-7.1.500.tgz#84bb037b6a823ec7fb7782a2ac03452deb505128" - integrity sha512-PfPtQrxFOn55RlJ4ygXkcIHFkoPO1JMTRJcSdPb0EavcSZ3Ekl9ujAAPrrqj2zKwkbe0pGGR79RJhnUr5ngQjw== - "@types/eslint-scope@^3.7.7": version "3.7.7" resolved "https://registry.yarnpkg.com/@types/eslint-scope/-/eslint-scope-3.7.7.tgz#3108bd5f18b0cdb277c867b3dd449c9ed7079ac5" @@ -1160,6 +1155,13 @@ ajv@^8.0.0, ajv@^8.9.0: json-schema-traverse "^1.0.0" require-from-string "^2.0.2" +alt-ujs@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/alt-ujs/-/alt-ujs-1.0.0.tgz#a11a340a568550eac9e7373830d7e6b1d5f38d39" + integrity sha512-rUWRXofJJ0wmTfB9KM2yZWHLI+FmAjszC6dzXulK0gfH//gUBZQeQ453yu1A27Oa+kS8Udmm2el67cv747GvGw== + dependencies: + urijs "^1.19.11" + ansis@1.5.2: version "1.5.2" resolved "https://registry.yarnpkg.com/ansis/-/ansis-1.5.2.tgz#c9bada6ff5dd88b0b979ab8df0b51096b9dda4bb" @@ -2099,6 +2101,11 @@ uri-js@^4.2.2: dependencies: punycode "^2.1.0" +urijs@^1.19.11: + version "1.19.11" + resolved "https://registry.yarnpkg.com/urijs/-/urijs-1.19.11.tgz#204b0d6b605ae80bea54bea39280cdb7c9f923cc" + integrity sha512-HXgFDgDommxn5/bIv0cnQZsPhHDA90NPHD6+c/v21U5+Sx5hoP8+dP9IZXBU1gIfvdRfhG8cel9QNPeionfcCQ== + util-deprecate@^1.0.2: version "1.0.2" resolved "https://registry.yarnpkg.com/util-deprecate/-/util-deprecate-1.0.2.tgz#450d4dc9fa70de732762fbd2d4a28981419a0ccf" From 039d5ce6efb3c218a09d37c175614229ea946f07 Mon Sep 17 00:00:00 2001 From: Taketo Takashima Date: Thu, 12 Dec 2024 23:37:52 +0900 Subject: [PATCH 10/13] Add dotenv-rails --- .env.example | 20 +++++++++++++++++++ .gitignore | 4 +--- Gemfile | 2 ++ Gemfile.lock | 5 +++++ config/{database.yml.example => database.yml} | 13 +++++++----- 5 files changed, 36 insertions(+), 8 deletions(-) create mode 100644 .env.example rename config/{database.yml.example => database.yml} (79%) diff --git a/.env.example b/.env.example new file mode 100644 index 0000000..4961f2f --- /dev/null +++ b/.env.example @@ -0,0 +1,20 @@ +# Usage .env +# SAMPLE_VAR=XXXXXX +# + +# DB +STATUS_MONITORING_DATABASE_USERNAME_DEV=root +STATUS_MONITORING_DATABASE_PASSWORD_DEV= +STATUS_MONITORING_DATABASE_USERNAME=sindan +STATUS_MONITORING_DATABASE_PASSWORD= +#STATUS_MONITORING_DATABASE_HOSTNAME= + +#MYSQL_SOCKET=/var/lib/mysql/mysql.sock +#REDIS_URL= + +## for production env +# Secret +#SECRET_KEY_BASE= + +# environments +RAILS_LOG_LEVEL=debug diff --git a/.gitignore b/.gitignore index d02af8c..af08f81 100644 --- a/.gitignore +++ b/.gitignore @@ -8,12 +8,10 @@ /.bundle vendor/bundle -# config -config/database.yml - # Ignore all environment files (except templates). /.env* !/.env*.erb +!/.env.example # Ignore all logfiles and tempfiles. /log/* diff --git a/Gemfile b/Gemfile index c4db7e9..1166238 100644 --- a/Gemfile +++ b/Gemfile @@ -8,6 +8,8 @@ gem "puma", ">= 5.0" gem "devise" +gem "dotenv-rails" + gem "sprockets-rails" gem "jsbundling-rails" diff --git a/Gemfile.lock b/Gemfile.lock index f087747..016fe40 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -133,6 +133,10 @@ GEM responders warden (~> 1.2.3) diff-lcs (1.5.1) + dotenv (3.1.4) + dotenv-rails (3.1.4) + dotenv (= 3.1.4) + railties (>= 6.1) drb (2.2.1) erubi (1.13.0) factory_bot (6.5.0) @@ -393,6 +397,7 @@ DEPENDENCIES capybara debug devise + dotenv-rails factory_bot_rails foreman jbuilder diff --git a/config/database.yml.example b/config/database.yml similarity index 79% rename from config/database.yml.example rename to config/database.yml index f2f7325..08c46c2 100644 --- a/config/database.yml.example +++ b/config/database.yml @@ -13,13 +13,13 @@ default: &default adapter: mysql2 encoding: utf8 pool: <%= ENV.fetch("RAILS_MAX_THREADS") { 5 } %> - username: mysql - password: - socket: <%= ENV.fetch("MYSQL_SOCKET") { '/tmp/mysql.sock' } %> + socket: <%= ENV['MYSQL_SOCKET'] %> development: <<: *default database: sindan_development + username: <%= ENV['SINDAN_DATABASE_USERNAME_DEV'] %> + password: <%= ENV['SINDAN_DATABASE_PASSWORD_DEV'] %> # Warning: The database defined as "test" will be erased and # re-generated from your development database when you run "rake". @@ -27,6 +27,9 @@ development: test: <<: *default database: sindan_test + username: <%= ENV['SINDAN_DATABASE_USERNAME_DEV'] %> + password: <%= ENV['SINDAN_DATABASE_PASSWORD_DEV'] %> + host: <%= ENV['SINDAN_DATABASE_DATABASE_HOSTNAME'] %> # for CI # As with config/credentials.yml, you never want to store sensitive information, # like your database password, in your source code. If your source code is @@ -51,5 +54,5 @@ test: production: <<: *default database: sindan_production - username: sindan - password: <%= ENV['SINDAN_VISUALIZATION_DATABASE_PASSWORD'] %> + username: <%= ENV['SINDAN_DATABASE_USERNAME'] %> + password: <%= ENV['SINDAN_DATABASE_PASSWORD'] %> From b145d5db1e3a70778199e0cb21c1cd6a6fe02d2a Mon Sep 17 00:00:00 2001 From: Taketo Takashima Date: Thu, 12 Dec 2024 23:50:40 +0900 Subject: [PATCH 11/13] Add CI --- .github/workflows/ci.yml | 84 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 84 insertions(+) create mode 100644 .github/workflows/ci.yml diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 0000000..754fb86 --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,84 @@ +name: CI + +on: + pull_request: + push: + branches: [ master, develop ] + +jobs: + scan_ruby: + runs-on: ubuntu-latest + + steps: + - name: Checkout code + uses: actions/checkout@v4 + + - name: Set up Ruby + uses: ruby/setup-ruby@v1 + with: + ruby-version: .ruby-version + bundler-cache: true + + - name: Scan for common Rails security vulnerabilities using static analysis + run: bin/brakeman --no-pager + + lint: + runs-on: ubuntu-latest + steps: + - name: Checkout code + uses: actions/checkout@v4 + + - name: Set up Ruby + uses: ruby/setup-ruby@v1 + with: + ruby-version: .ruby-version + bundler-cache: true + + - name: Lint code for consistent style + run: bin/rubocop -f github + + test: + runs-on: ubuntu-latest + + services: + mysql: + image: mysql + env: + MYSQL_ROOT_PASSWORD: + MYSQL_ROOT_HOST: '%' + MYSQL_ALLOW_EMPTY_PASSWORD: "yes" + ports: + - 3306:3306 + options: --health-cmd "mysqladmin ping -h 127.0.0.1" --health-interval 20s --health-timeout 10s --health-retries 10 + redis: + image: redis + ports: + - 6379:6379 + options: --health-cmd "redis-cli ping" --health-interval 10s --health-timeout 5s --health-retries 5 + steps: + - name: Checkout code + uses: actions/checkout@v4 + + - name: Set up Ruby + uses: ruby/setup-ruby@v1 + with: + ruby-version: .ruby-version + bundler-cache: true + + - name: Set up Node.js + uses: actions/setup-node@v4 + with: + node-version-file: .node-version + - name: Install dependencies for npm + run: yarn install + + - name: Run tests + env: + RAILS_ENV: test + REDIS_URL: redis://localhost:6379/0 + SINDAN_DATABASE_USERNAME_DEV: root + SINDAN_DATABASE_PASSWORD_DEV: + SINDAN_DATABASE_HOSTNAME: 127.0.0.1 + MYSQL_SOCKET: + run: bin/rails db:test:prepare spec + From 6f561ef334ceabc75b897af05cd1503676a89562 Mon Sep 17 00:00:00 2001 From: Taketo Takashima Date: Thu, 12 Dec 2024 23:56:06 +0900 Subject: [PATCH 12/13] Fix database config for test --- config/database.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/config/database.yml b/config/database.yml index 08c46c2..20de552 100644 --- a/config/database.yml +++ b/config/database.yml @@ -29,7 +29,7 @@ test: database: sindan_test username: <%= ENV['SINDAN_DATABASE_USERNAME_DEV'] %> password: <%= ENV['SINDAN_DATABASE_PASSWORD_DEV'] %> - host: <%= ENV['SINDAN_DATABASE_DATABASE_HOSTNAME'] %> # for CI + host: <%= ENV['SINDAN_DATABASE_HOSTNAME'] %> # for CI # As with config/credentials.yml, you never want to store sensitive information, # like your database password, in your source code. If your source code is From 80da512c87a2436461ed197ed3e5ead28bc39245 Mon Sep 17 00:00:00 2001 From: Taketo Takashima Date: Thu, 12 Dec 2024 23:54:22 +0900 Subject: [PATCH 13/13] Fix lint --- app/controllers/diagnosis_logs_controller.rb | 8 +-- .../ignore_error_results_controller.rb | 24 +++---- app/controllers/log_campaigns_controller.rb | 9 +-- app/helpers/application_helper.rb | 12 ++-- app/models/diagnosis_log.rb | 36 +++++------ app/models/log_campaign.rb | 16 ++--- app/views/diagnosis_logs/index.json.jbuilder | 2 +- .../ignore_error_results/index.json.jbuilder | 2 +- config/deploy.rb | 64 +++++++++---------- config/deploy/development.rb | 10 +-- config/deploy/production.rb | 4 +- config/deploy/staging.rb | 10 +-- config/environments/production.rb | 2 +- config/initializers/devise.rb | 12 ++-- config/initializers/hosts.rb | 4 +- config/initializers/kaminari_config.rb | 1 + config/initializers/locale.rb | 2 +- config/initializers/ransack.rb | 4 +- config/routes.rb | 4 +- .../diagnosis_logs_controller_spec.rb | 9 ++- .../ignore_error_results_controller_spec.rb | 25 ++++---- .../log_campaigns_controller_spec.rb | 11 ++-- .../static_pages_controller_spec.rb | 1 - spec/controllers/statuses_controller_spec.rb | 1 - spec/factories/ignore_error_results.rb | 2 +- spec/factories/log_campaigns.rb | 1 - spec/helpers/application_helper_spec.rb | 2 +- spec/models/diagnosis_log_spec.rb | 2 +- spec/models/ignore_error_result_spec.rb | 2 +- spec/models/log_campaign_spec.rb | 2 +- spec/routing/diagnosis_logs_routing_spec.rb | 18 +++--- .../ignore_error_results_routing_spec.rb | 18 +++--- spec/routing/log_campaigns_routing_spec.rb | 26 ++++---- spec/routing/static_pages_routing_spec.rb | 4 +- spec/routing/status_pages_routing_spec.rb | 4 +- spec/spec_helper.rb | 8 +-- spec/support/controller_macros.rb | 2 +- .../diagnosis_logs/edit.html.slim_spec.rb | 15 ++--- .../diagnosis_logs/index.html.slim_spec.rb | 40 ++++++------ .../diagnosis_logs/new.html.slim_spec.rb | 15 ++--- .../diagnosis_logs/show.html.slim_spec.rb | 14 ++-- .../index.html.slim_spec.rb | 6 +- .../log_campaigns/edit.html.slim_spec.rb | 13 ++-- .../log_campaigns/index.html.slim_spec.rb | 34 +++++----- .../views/log_campaigns/new.html.slim_spec.rb | 13 ++-- .../log_campaigns/search.html.slim_spec.rb | 34 +++++----- .../log_campaigns/show.html.slim_spec.rb | 42 ++++++------ 47 files changed, 284 insertions(+), 306 deletions(-) diff --git a/app/controllers/diagnosis_logs_controller.rb b/app/controllers/diagnosis_logs_controller.rb index 0e5a621..ca1224d 100644 --- a/app/controllers/diagnosis_logs_controller.rb +++ b/app/controllers/diagnosis_logs_controller.rb @@ -1,7 +1,7 @@ class DiagnosisLogsController < ApplicationController before_action :authenticate_user! - before_action :set_diagnosis_log, only: [:show, :edit, :update, :destroy] + before_action :set_diagnosis_log, only: [ :show, :edit, :update, :destroy ] # GET /diagnosis_logs # GET /diagnosis_logs.json @@ -39,7 +39,7 @@ def create respond_to do |format| if @diagnosis_log.save - format.html { redirect_to @diagnosis_log, notice: 'Diagnosis log was successfully created.' } + format.html { redirect_to @diagnosis_log, notice: "Diagnosis log was successfully created." } format.json { render :show, status: :created, location: @diagnosis_log } else format.html { render :new, status: :unprocessable_entity } @@ -53,7 +53,7 @@ def create def update respond_to do |format| if @diagnosis_log.update(diagnosis_log_params) - format.html { redirect_to @diagnosis_log, notice: 'Diagnosis log was successfully updated.' } + format.html { redirect_to @diagnosis_log, notice: "Diagnosis log was successfully updated." } format.json { render :show, status: :ok, location: @diagnosis_log } else format.html { render :edit, status: :unprocessable_entity } @@ -67,7 +67,7 @@ def update def destroy @diagnosis_log.destroy respond_to do |format| - format.html { redirect_to diagnosis_logs_url, status: :see_other, notice: 'Diagnosis log was successfully destroyed.' } + format.html { redirect_to diagnosis_logs_url, status: :see_other, notice: "Diagnosis log was successfully destroyed." } format.json { head :no_content } end end diff --git a/app/controllers/ignore_error_results_controller.rb b/app/controllers/ignore_error_results_controller.rb index 3775344..93701e7 100644 --- a/app/controllers/ignore_error_results_controller.rb +++ b/app/controllers/ignore_error_results_controller.rb @@ -1,25 +1,25 @@ class IgnoreErrorResultsController < ApplicationController before_action :authenticate_user! - before_action :set_ignore_error_result, only: [:show, :edit, :update, :destroy] + before_action :set_ignore_error_result, only: [ :show, :edit, :update, :destroy ] concerning :BreadcrumbFeature do included do - before_action only: [:index, :show, :new, :create, :edit, :update] do |controller| - add_breadcrumb I18n.t('views.settings.index.title'), '' - add_breadcrumb I18n.t('views.ignore_error_results.index.title'), ignore_error_results_path + before_action only: [ :index, :show, :new, :create, :edit, :update ] do |controller| + add_breadcrumb I18n.t("views.settings.index.title"), "" + add_breadcrumb I18n.t("views.ignore_error_results.index.title"), ignore_error_results_path end - before_action only: [:show, :edit, :update] do |controller| + before_action only: [ :show, :edit, :update ] do |controller| add_breadcrumb "#{@ignore_error_result.ssid}", ignore_error_result_path(@ignore_error_result) end - before_action only: [:new, :create] do |controller| - add_breadcrumb I18n.t('views.ignore_error_results.new.title'), new_ignore_error_result_path + before_action only: [ :new, :create ] do |controller| + add_breadcrumb I18n.t("views.ignore_error_results.new.title"), new_ignore_error_result_path end - before_action only: [:edit, :update] do |controller| - add_breadcrumb I18n.t('views.ignore_error_results.edit.title'), edit_ignore_error_result_path(@ignore_error_result) + before_action only: [ :edit, :update ] do |controller| + add_breadcrumb I18n.t("views.ignore_error_results.edit.title"), edit_ignore_error_result_path(@ignore_error_result) end end end @@ -51,7 +51,7 @@ def create respond_to do |format| if @ignore_error_result.save - format.html { redirect_to @ignore_error_result, notice: 'Ignore error result was successfully created.' } + format.html { redirect_to @ignore_error_result, notice: "Ignore error result was successfully created." } format.json { render :show, status: :created, location: @ignore_error_result } else format.html { render :new, status: :unprocessable_entity } @@ -65,7 +65,7 @@ def create def update respond_to do |format| if @ignore_error_result.update(ignore_error_result_params) - format.html { redirect_to @ignore_error_result, notice: 'Ignore error result was successfully updated.' } + format.html { redirect_to @ignore_error_result, notice: "Ignore error result was successfully updated." } format.json { render :show, status: :ok, location: @ignore_error_result } else format.html { render :edit, status: :unprocessable_entity } @@ -79,7 +79,7 @@ def update def destroy @ignore_error_result.destroy respond_to do |format| - format.html { redirect_to ignore_error_results_url, status: :see_other, notice: 'Ignore error result was successfully destroyed.' } + format.html { redirect_to ignore_error_results_url, status: :see_other, notice: "Ignore error result was successfully destroyed." } format.json { head :no_content } end end diff --git a/app/controllers/log_campaigns_controller.rb b/app/controllers/log_campaigns_controller.rb index a890b10..26881b3 100644 --- a/app/controllers/log_campaigns_controller.rb +++ b/app/controllers/log_campaigns_controller.rb @@ -1,8 +1,9 @@ # coding: utf-8 + class LogCampaignsController < ApplicationController before_action :authenticate_user! - before_action :set_log_campaign, only: [:show, :all, :log, :error, :edit, :update, :destroy] + before_action :set_log_campaign, only: [ :show, :all, :log, :error, :edit, :update, :destroy ] # GET /log_campaigns # GET /log_campaigns.json @@ -93,7 +94,7 @@ def create respond_to do |format| if @log_campaign.save - format.html { redirect_to @log_campaign, notice: 'Log campaign was successfully created.' } + format.html { redirect_to @log_campaign, notice: "Log campaign was successfully created." } format.json { render :show, status: :created, location: @log_campaign } else format.html { render :new, status: :unprocessable_entity } @@ -107,7 +108,7 @@ def create def update respond_to do |format| if @log_campaign.update(log_campaign_params) - format.html { redirect_to @log_campaign, notice: 'Log campaign was successfully updated.' } + format.html { redirect_to @log_campaign, notice: "Log campaign was successfully updated." } format.json { render :show, status: :ok, location: @log_campaign } else format.html { render :edit, status: :unprocessable_entity } @@ -121,7 +122,7 @@ def update def destroy @log_campaign.destroy respond_to do |format| - format.html { redirect_to log_campaigns_url, status: :see_other, notice: 'Log campaign was successfully destroyed.' } + format.html { redirect_to log_campaigns_url, status: :see_other, notice: "Log campaign was successfully destroyed." } format.json { head :no_content } end end diff --git a/app/helpers/application_helper.rb b/app/helpers/application_helper.rb index 2498057..0b20f91 100644 --- a/app/helpers/application_helper.rb +++ b/app/helpers/application_helper.rb @@ -1,6 +1,6 @@ module ApplicationHelper def full_title(page_title = nil) - base_title = t('common.site_title') + base_title = t("common.site_title") if page_title.blank? base_title @@ -20,18 +20,18 @@ def hbr(str) def datetime_view(datetime) return nil if datetime.blank? - datetime.strftime(t('time.formats.default')) + datetime.strftime(t("time.formats.default")) end def date_view(date) return nil if date.blank? - date.strftime(t('date.formats.default')) + date.strftime(t("date.formats.default")) end # CSS Class def current_class(target_path) if current_page?(target_path) - 'active' + "active" end end @@ -40,10 +40,10 @@ def current_class(target_path) # parent - The Resource that has_* child # child - The Resource that belongs_to parent. def shallow_args(parent, child) - params[:action] == 'new' ? [parent, child] : child + params[:action] == "new" ? [ parent, child ] : child end def shallow_deep_args(parent, child, grandchild) - params[:action] == 'new' ? [parent, child, grandchild] : grandchild + params[:action] == "new" ? [ parent, child, grandchild ] : grandchild end end diff --git a/app/models/diagnosis_log.rb b/app/models/diagnosis_log.rb index da2e96f..5f60865 100644 --- a/app/models/diagnosis_log.rb +++ b/app/models/diagnosis_log.rb @@ -4,19 +4,19 @@ class DiagnosisLog < ApplicationRecord enum :result, { fail: 0, success: 1, - information: 10, + information: 10 } cattr_reader :layer_defs @@layer_defs = { - hardware: 'ハードウェア層', - datalink: 'データリンク層', - interface: 'インタフェース設定層', - localnet: 'ローカルネットワーク層', - globalnet: 'グローバルネットワーク層', - dns: '名前解決層', - web: 'ウェブアプリケーション層', - app: 'アプリケーション層', + hardware: "ハードウェア層", + datalink: "データリンク層", + interface: "インタフェース設定層", + localnet: "ローカルネットワーク層", + globalnet: "グローバルネットワーク層", + dns: "名前解決層", + web: "ウェブアプリケーション層", + app: "アプリケーション層" } cattr_reader :log_type_defs @@ -28,7 +28,7 @@ class DiagnosisLog < ApplicationRecord "v6autoconf", "ra_prefixes", "ra_flags", "v4ifconf", "v6ifconf", "v4nameservers", "v4routers", "v4autoconf", "v4addr", "netmask", "v6lladdr", "rate", "channel", "ifstatus", "ssid", - "iftype", "rssi", "bssid", "noise", "ifmtu", + "iftype", "rssi", "bssid", "noise", "ifmtu" ] default_scope { order(occurred_at: :desc) } @@ -57,24 +57,24 @@ def layer_label def result_label if self.result.nil? - return '' + return "" end ignore_log_types = IgnoreErrorResult.ignore_log_types_by_ssid(self.log_campaign.try(:ssid)) || Array.new if ignore_log_types.include?(self.log_type) - return 'table-warning' + return "table-warning" end if self.fail? - return 'table-danger' + return "table-danger" end if self.success? return "table-success" end - return "" + "" end def log @@ -82,14 +82,14 @@ def log end def self.date_list - return [] - #Rails.cache.fetch("date_list") do + [] + # Rails.cache.fetch("date_list") do # DiagnosisLog.occurred_after(DateTime.now - 10.days).pluck(:occurred_at).map{ |occurred_at| occurred_at.to_date.to_s unless occurred_at.blank? }.uniq - #end + # end end # for ransacker ransacker :occurred_at do - Arel.sql('date(occurred_at)') + Arel.sql("date(occurred_at)") end end diff --git a/app/models/log_campaign.rb b/app/models/log_campaign.rb index 242359e..63fbb92 100644 --- a/app/models/log_campaign.rb +++ b/app/models/log_campaign.rb @@ -13,36 +13,36 @@ def result ignore_log_types = IgnoreErrorResult.ignore_log_types_by_ssid(self.ssid) if self.diagnosis_logs.fail.where(log_type: ignore_log_types).count > 0 - return 'warning' + return "warning" end if self.diagnosis_logs.fail.count > 0 - return 'fail' + return "fail" end if self.diagnosis_logs.success.count > 0 - return 'success' + return "success" end - return 'information' + "information" end def result_label ignore_log_types = IgnoreErrorResult.ignore_log_types_by_ssid(self.ssid) if self.diagnosis_logs.fail.where(log_type: ignore_log_types).count > 0 - return 'table-warning' + return "table-warning" end if self.diagnosis_logs.fail.count > 0 - return 'table-danger' + return "table-danger" end if self.diagnosis_logs.success.count > 0 - return 'table-success' + return "table-success" end - return '' + "" end def self.ssid_list diff --git a/app/views/diagnosis_logs/index.json.jbuilder b/app/views/diagnosis_logs/index.json.jbuilder index d60707a..3e69cb2 100644 --- a/app/views/diagnosis_logs/index.json.jbuilder +++ b/app/views/diagnosis_logs/index.json.jbuilder @@ -1,4 +1,4 @@ json.array!(@diagnosis_logs) do |diagnosis_log| - json.extract! diagnosis_log, :id, :layer, :log_group, :log_type, :log_campaign_uuid: :target, :result, :detail, :occurred_at + json.extract! diagnosis_log, :id, :layer, :log_group, :log_type, :log_campaign_uuid, :target, :result, :detail, :occurred_at json.url diagnosis_log_url(diagnosis_log, format: :json) end diff --git a/app/views/ignore_error_results/index.json.jbuilder b/app/views/ignore_error_results/index.json.jbuilder index 7cbfb1f..0c382b6 100644 --- a/app/views/ignore_error_results/index.json.jbuilder +++ b/app/views/ignore_error_results/index.json.jbuilder @@ -1 +1 @@ -json.array! @ignore_error_results, partial: 'ignore_error_results/ignore_error_result', as: :ignore_error_result +json.array! @ignore_error_results, partial: "ignore_error_results/ignore_error_result", as: :ignore_error_result diff --git a/config/deploy.rb b/config/deploy.rb index be95638..bb35225 100644 --- a/config/deploy.rb +++ b/config/deploy.rb @@ -1,36 +1,36 @@ # config valid for current version and patch releases of Capistrano -#lock "~> 3.14.1" +# lock "~> 3.14.1" # slack -require 'slack-notifier' +require "slack-notifier" set :slack_team, "" set :slack_webhook_url, "" -set :slack_channel, '#dev-ops' -set :slack_username, 'Slack notifier' +set :slack_channel, "#dev-ops" +set :slack_username, "Slack notifier" -set :application, 'sindan_visualization' +set :application, "sindan_visualization" -set :repo_url, 'git@github.com:SINDAN/sindan-visualization.git' +set :repo_url, "git@github.com:SINDAN/sindan-visualization.git" set :branch, :master # ask :branch, `git rev-parse --abbrev-ref HEAD`.chomp -set :user, 'deploy' -set :deploy_to, '/var/www/sindan-production' +set :user, "deploy" +set :deploy_to, "/var/www/sindan-production" # Set the ruby version set :rbenv_type, :system -set :rbenv_ruby, '3.3.5' +set :rbenv_ruby, "3.3.5" # Set the node version set :nodenv_type, :system -set :nodenv_node, '20.15.1' +set :nodenv_node, "20.15.1" set :nodenv_prefix, "NODENV_ROOT=#{fetch(:nodenv_path)} NODENV_VERSION=#{fetch(:nodenv_node)} #{fetch(:nodenv_path)}/bin/nodenv exec" -set :nodenv_map_bins, %w{node npm} +set :nodenv_map_bins, %w[node npm] # server alias set :sindan, "" set :sindandev, "" -set :vagrant, '127.0.0.1' +set :vagrant, "127.0.0.1" # Default value for :format is :airbrussh. set :format, :airbrussh @@ -46,7 +46,7 @@ # set :pty, true # Default value for :linked_files is [] -append :linked_files, 'config/database.yml', 'config/secrets.yml' +append :linked_files, "config/database.yml", "config/secrets.yml" # Default value for linked_dirs is [] append :linked_dirs, "log", "tmp/pids", "tmp/cache", "tmp/sockets", "public/system", "node_modules" @@ -56,9 +56,9 @@ set :default_env, { path: "#{fetch(:nodenv_path)}/shims:#{fetch(:nodenv_path)}/bin:$PATH" } set :ssh_options, { - keys: [File.expand_path('~/.ssh/id_rsa')], + keys: [ File.expand_path("~/.ssh/id_rsa") ], forward_agent: true, - auth_methods: %w(publickey) + auth_methods: %w[publickey] } # passenger @@ -68,7 +68,6 @@ set :keep_releases, 5 namespace :deploy do - after :restart, :clear_cache do on roles(:web), in: :groups, limit: 3, wait: 10 do # Here we can do anything such as: @@ -78,26 +77,25 @@ end end - desc 'upload important files' + desc "upload important files" task :config do on roles(:app) do |host| - upload!('config/secrets.yml',"#{shared_path}/config/secrets.yml") + upload!("config/secrets.yml", "#{shared_path}/config/secrets.yml") end end end namespace :db do - - desc 'upload important files' + desc "upload important files" task :config do on roles(:app) do |host| - upload!('config/database.yml',"#{shared_path}/config/database.yml") + upload!("config/database.yml", "#{shared_path}/config/database.yml") end end - after 'deploy:config', 'db:config' + after "deploy:config", "db:config" - desc 'reset databse' + desc "reset databse" task :reset do on roles(:db) do within release_path do @@ -109,7 +107,7 @@ end end - desc 'add seed data' + desc "add seed data" task :seed do on roles(:db) do within release_path do @@ -120,7 +118,7 @@ end end - desc 'display a list of pending migrations' + desc "display a list of pending migrations" task :pending_migrations do on roles(:app) do within release_path do @@ -133,37 +131,35 @@ end namespace :log do - desc "tail -f accees_log" task :tail do on roles(:web) do env = fetch(:rails_env) - env = 'develoment' if env == 'staging' + env = "develoment" if env == "staging" execute "tail -f #{shared_path}/log/#{env}.log" end end end namespace :slack_notify do - notifier = Slack::Notifier.new fetch(:slack_webhook_url), channel: fetch(:slack_channel), username: fetch(:slack_username) - desc 'notify start deploy for slack' + desc "notify start deploy for slack" task :deploy_started do notifier.ping "#{ENV['USER'] || ENV['USERNAME']} started deploying branch #{fetch :application}/#{fetch :branch} to #{fetch :stage} (#{fetch :rails_env, 'production'})." end - desc 'notify finish deploy for slack' + desc "notify finish deploy for slack" task :deploy_finished do notifier.ping "#{ENV['USER'] || ENV['USERNAME']} finished deploying branch #{fetch :application}/#{fetch :branch} to #{fetch :stage} (#{fetch :rails_env, 'production'})." end - desc 'notify fail deploy for slack' + desc "notify fail deploy for slack" task :deploy_failed do notifier.ping "*ERROR!* #{ENV['USER'] || ENV['USERNAME']} failed to deploy branch #{fetch :application}/#{fetch :branch} to #{fetch :stage} (#{fetch :rails_env, 'production'})." end - before 'deploy:starting', 'slack_notify:deploy_started' - after :deploy, 'slack_notify:deploy_finished' - before 'deploy:finishing_rollback', 'slack_notify:deploy_failed' + before "deploy:starting", "slack_notify:deploy_started" + after :deploy, "slack_notify:deploy_finished" + before "deploy:finishing_rollback", "slack_notify:deploy_failed" end diff --git a/config/deploy/development.rb b/config/deploy/development.rb index 95d6366..4142bad 100644 --- a/config/deploy/development.rb +++ b/config/deploy/development.rb @@ -1,10 +1,10 @@ set :stage, :development -set :branch, 'develop' -set :deploy_to, '/var/www/sindan-staging' -set :rails_env, 'development' -set :migration_role, 'db' +set :branch, "develop" +set :deploy_to, "/var/www/sindan-staging" +set :rails_env, "development" +set :migration_role, "db" -server fetch(:vagrant), user: fetch(:user), roles: %w{web app db}, ssh_options: { +server fetch(:vagrant), user: fetch(:user), roles: %w[web app db], ssh_options: { port: 2222 } diff --git a/config/deploy/production.rb b/config/deploy/production.rb index 41ce570..07118e4 100644 --- a/config/deploy/production.rb +++ b/config/deploy/production.rb @@ -3,6 +3,6 @@ set :branch, "master" set :deploy_to, "/var/www/sindan-production" set :rails_env, "production" -set :migration_role, 'db' +set :migration_role, "db" -server fetch(:sindan), user: fetch(:user), roles: %w{web app db} +server fetch(:sindan), user: fetch(:user), roles: %w[web app db] diff --git a/config/deploy/staging.rb b/config/deploy/staging.rb index 3b9c9aa..34211e2 100644 --- a/config/deploy/staging.rb +++ b/config/deploy/staging.rb @@ -1,8 +1,8 @@ set :stage, :staging -set :branch, 'develop' -set :deploy_to, '/var/www/sindan-staging' -set :rails_env, 'development' -set :migration_role, 'db' +set :branch, "develop" +set :deploy_to, "/var/www/sindan-staging" +set :rails_env, "development" +set :migration_role, "db" -server fetch(:sindandev), user: fetch(:user), roles: %w{web app db} +server fetch(:sindandev), user: fetch(:user), roles: %w[web app db] diff --git a/config/environments/production.rb b/config/environments/production.rb index 1139d5f..6db6d8e 100644 --- a/config/environments/production.rb +++ b/config/environments/production.rb @@ -57,7 +57,7 @@ # config.ssl_options = { redirect: { exclude: ->(request) { request.path == "/up" } } } # Log to STDOUT by default - #config.logger = ActiveSupport::Logger.new(STDOUT) + # config.logger = ActiveSupport::Logger.new(STDOUT) # .tap { |logger| logger.formatter = ::Logger::Formatter.new } # .then { |logger| ActiveSupport::TaggedLogging.new(logger) } diff --git a/config/initializers/devise.rb b/config/initializers/devise.rb index 664c7b5..6368aad 100644 --- a/config/initializers/devise.rb +++ b/config/initializers/devise.rb @@ -27,7 +27,7 @@ # Configure the e-mail address which will be shown in Devise::Mailer, # note that it will be overwritten if you use your own mailer class # with default "from" parameter. - config.mailer_sender = 'sindan@ml.kanazawa-u.ac.jp' + config.mailer_sender = "sindan@ml.kanazawa-u.ac.jp" # Configure the class responsible to send e-mails. # config.mailer = 'Devise::Mailer' @@ -39,7 +39,7 @@ # Load and configure the ORM. Supports :active_record (default) and # :mongoid (bson_ext recommended) by default. Other ORMs may be # available as additional gems. - require 'devise/orm/active_record' + require "devise/orm/active_record" # ==> Configuration for any authentication mechanism # Configure which keys are used when authenticating a user. The default is @@ -49,7 +49,7 @@ # session. If you need permissions, you should implement that in a before filter. # You can also supply a hash where the value is a boolean determining whether # or not authentication should be aborted when the value is not present. - config.authentication_keys = [:login] + config.authentication_keys = [ :login ] # Configure parameters from the request object used for authentication. Each entry # given should be a request method and it will automatically be passed to the @@ -61,12 +61,12 @@ # Configure which authentication keys should be case-insensitive. # These keys will be downcased upon creating or modifying a user and when used # to authenticate or find a user. Default is :email. - config.case_insensitive_keys = [:email] + config.case_insensitive_keys = [ :email ] # Configure which authentication keys should have whitespace stripped. # These keys will have whitespace before and after removed upon creating or # modifying a user and when used to authenticate or find a user. Default is :email. - config.strip_whitespace_keys = [:email] + config.strip_whitespace_keys = [ :email ] # Tell if authentication through request.params is enabled. True by default. # It can be set to an array that will enable params authentication only for the @@ -100,7 +100,7 @@ # Notice that if you are skipping storage for all authentication paths, you # may want to disable generating routes to Devise's sessions controller by # passing skip: :sessions to `devise_for` in your config/routes.rb - config.skip_session_storage = [:http_auth] + config.skip_session_storage = [ :http_auth ] # By default, Devise cleans up the CSRF token on authentication to # avoid CSRF token fixation attacks. This means that, when using AJAX diff --git a/config/initializers/hosts.rb b/config/initializers/hosts.rb index 74848c5..1d8438d 100644 --- a/config/initializers/hosts.rb +++ b/config/initializers/hosts.rb @@ -1,7 +1,7 @@ # HostAuthorization # for spec -Rails.application.config.hosts << '.example.com' +Rails.application.config.hosts << ".example.com" # for production -#Rails.application.config.hosts << 'fluentd.sindan-net.com' +# Rails.application.config.hosts << 'fluentd.sindan-net.com' Rails.application.config.hosts << /.*/ diff --git a/config/initializers/kaminari_config.rb b/config/initializers/kaminari_config.rb index 8ef36b3..4fbb8fa 100644 --- a/config/initializers/kaminari_config.rb +++ b/config/initializers/kaminari_config.rb @@ -1,4 +1,5 @@ # frozen_string_literal: true + Kaminari.configure do |config| config.default_per_page = 50 # config.max_per_page = nil diff --git a/config/initializers/locale.rb b/config/initializers/locale.rb index 9a46361..4c2868a 100644 --- a/config/initializers/locale.rb +++ b/config/initializers/locale.rb @@ -1,5 +1,5 @@ # The default locale is :en and all translations from config/locales/*.rb,yml are auto loaded. # config.i18n.load_path += Dir[Rails.root.join('my', 'locales', '*.{rb,yml}').to_s] # config.i18n.default_locale = :de -Rails.application.config.i18n.load_path += Dir[Rails.root.join('config', 'locales', '*.{rb,yml}').to_s] +Rails.application.config.i18n.load_path += Dir[Rails.root.join("config", "locales", "*.{rb,yml}").to_s] Rails.application.config.i18n.default_locale = :ja diff --git a/config/initializers/ransack.rb b/config/initializers/ransack.rb index b71f582..842578b 100644 --- a/config/initializers/ransack.rb +++ b/config/initializers/ransack.rb @@ -1,6 +1,6 @@ Ransack.configure do |config| - config.add_predicate 'date_eq', - arel_predicate: 'eq', + config.add_predicate "date_eq", + arel_predicate: "eq", formatter: proc { |v| v.to_date }, validator: proc { |v| v.present? }, type: :string diff --git a/config/routes.rb b/config/routes.rb index ef1d23d..54f341c 100644 --- a/config/routes.rb +++ b/config/routes.rb @@ -1,5 +1,5 @@ Rails.application.routes.draw do - root to: 'log_campaigns#index' + root to: "log_campaigns#index" devise_for :users, only: [ :session ] @@ -19,7 +19,7 @@ resources :ignore_error_results - get 'about', to: 'static_pages#about' + get "about", to: "static_pages#about" # Reveal health status on /up that returns 200 if the app boots with no exceptions, otherwise 500. # Can be used by load balancers and uptime monitors to verify that the app is live. diff --git a/spec/controllers/diagnosis_logs_controller_spec.rb b/spec/controllers/diagnosis_logs_controller_spec.rb index 556878f..1286e10 100644 --- a/spec/controllers/diagnosis_logs_controller_spec.rb +++ b/spec/controllers/diagnosis_logs_controller_spec.rb @@ -19,7 +19,6 @@ # that an instance is receiving a specific message. RSpec.describe DiagnosisLogsController, type: :controller do - # This should return the minimal set of attributes required to create a valid # DiagnosisLog. As you add validations to DiagnosisLog, be sure to # adjust the attributes here as well. @@ -43,14 +42,14 @@ it "assigns all diagnosis_logs as @diagnosis_logs" do diagnosis_log = DiagnosisLog.create! valid_attributes get :index, params: {}, session: valid_session - expect(assigns(:diagnosis_logs)).to eq([diagnosis_log]) + expect(assigns(:diagnosis_logs)).to eq([ diagnosis_log ]) end context "with date param" do it "assigns all diagnosis_logs as @diagnosis_logs" do diagnosis_log = DiagnosisLog.create!(occurred_at: '2015-07-31 19:24:42') get :index, params: { date: '20150731' }, session: valid_session - expect(assigns(:diagnosis_logs)).to eq([diagnosis_log]) + expect(assigns(:diagnosis_logs)).to eq([ diagnosis_log ]) end it "assigns no diagnosis_logs as @diagnosis_logs" do @@ -64,7 +63,7 @@ describe "GET #show" do it "assigns the requested diagnosis_log as @diagnosis_log" do diagnosis_log = DiagnosisLog.create! valid_attributes - get :show, params: {:id => diagnosis_log.to_param}, session: valid_session + get :show, params: { id: diagnosis_log.to_param }, session: valid_session expect(assigns(:diagnosis_log)).to eq(diagnosis_log) end end @@ -146,7 +145,7 @@ context "with invalid params" do it "returns a response with 422 response (i.e. to display the 'edit' template)" do diagnosis_log = DiagnosisLog.create! valid_attributes - put :update, params: { id: diagnosis_log.to_param, diagnosis_log: invalid_attributes}, session: valid_session + put :update, params: { id: diagnosis_log.to_param, diagnosis_log: invalid_attributes }, session: valid_session expect(response).to have_http_status(422) end diff --git a/spec/controllers/ignore_error_results_controller_spec.rb b/spec/controllers/ignore_error_results_controller_spec.rb index ed24a4f..8956349 100644 --- a/spec/controllers/ignore_error_results_controller_spec.rb +++ b/spec/controllers/ignore_error_results_controller_spec.rb @@ -24,7 +24,6 @@ # `rails-controller-testing` gem. RSpec.describe IgnoreErrorResultsController, type: :controller do - # This should return the minimal set of attributes required to create a valid # IgnoreErrorResult. As you add validations to IgnoreErrorResult, be sure to # adjust the attributes here as well. @@ -55,7 +54,7 @@ describe "GET #show" do it "returns a success response" do ignore_error_result = IgnoreErrorResult.create! valid_attributes - get :show, params: {id: ignore_error_result.to_param}, session: valid_session + get :show, params: { id: ignore_error_result.to_param }, session: valid_session expect(response).to be_successful end end @@ -70,7 +69,7 @@ describe "GET #edit" do it "returns a success response" do ignore_error_result = IgnoreErrorResult.create! valid_attributes - get :edit, params: {id: ignore_error_result.to_param}, session: valid_session + get :edit, params: { id: ignore_error_result.to_param }, session: valid_session expect(response).to be_successful end end @@ -79,24 +78,24 @@ context "with valid params" do it "creates a new IgnoreErrorResult" do expect { - post :create, params: {ignore_error_result: valid_attributes}, session: valid_session + post :create, params: { ignore_error_result: valid_attributes }, session: valid_session }.to change(IgnoreErrorResult, :count).by(1) end it "redirects to the created ignore_error_result" do - post :create, params: {ignore_error_result: valid_attributes}, session: valid_session + post :create, params: { ignore_error_result: valid_attributes }, session: valid_session expect(response).to redirect_to(IgnoreErrorResult.last) end end context "with invalid params" do it "returns a response with 422 response (i.e. to display the 'new' template)" do - post :create, params: {ignore_error_result: invalid_attributes}, session: valid_session + post :create, params: { ignore_error_result: invalid_attributes }, session: valid_session expect(response).to have_http_status(422) end it "re-renders the 'new' template" do - post :create, params: {ignore_error_result: invalid_attributes}, session: valid_session + post :create, params: { ignore_error_result: invalid_attributes }, session: valid_session expect(response).to render_template("new") end end @@ -110,14 +109,14 @@ it "updates the requested ignore_error_result" do ignore_error_result = IgnoreErrorResult.create! valid_attributes - put :update, params: {id: ignore_error_result.to_param, ignore_error_result: new_attributes}, session: valid_session + put :update, params: { id: ignore_error_result.to_param, ignore_error_result: new_attributes }, session: valid_session ignore_error_result.reload expect(ignore_error_result.ssid).to eq new_attributes[:ssid] end it "redirects to the ignore_error_result" do ignore_error_result = IgnoreErrorResult.create! valid_attributes - put :update, params: {id: ignore_error_result.to_param, ignore_error_result: new_attributes}, session: valid_session + put :update, params: { id: ignore_error_result.to_param, ignore_error_result: new_attributes }, session: valid_session expect(response).to redirect_to(ignore_error_result) end end @@ -125,13 +124,13 @@ context "with invalid params" do it "returns a response with 422 response (i.e. to display the 'edit' template)" do ignore_error_result = IgnoreErrorResult.create! valid_attributes - put :update, params: {id: ignore_error_result.to_param, ignore_error_result: invalid_attributes}, session: valid_session + put :update, params: { id: ignore_error_result.to_param, ignore_error_result: invalid_attributes }, session: valid_session expect(response).to have_http_status(422) end it "re-renders the 'edit' template" do ignore_error_result = IgnoreErrorResult.create! valid_attributes - put :update, params: {id: ignore_error_result.to_param, ignore_error_result: invalid_attributes}, session: valid_session + put :update, params: { id: ignore_error_result.to_param, ignore_error_result: invalid_attributes }, session: valid_session expect(response).to render_template("edit") end end @@ -141,13 +140,13 @@ it "destroys the requested ignore_error_result" do ignore_error_result = IgnoreErrorResult.create! valid_attributes expect { - delete :destroy, params: {id: ignore_error_result.to_param}, session: valid_session + delete :destroy, params: { id: ignore_error_result.to_param }, session: valid_session }.to change(IgnoreErrorResult, :count).by(-1) end it "redirects to the ignore_error_results list" do ignore_error_result = IgnoreErrorResult.create! valid_attributes - delete :destroy, params: {id: ignore_error_result.to_param}, session: valid_session + delete :destroy, params: { id: ignore_error_result.to_param }, session: valid_session expect(response).to redirect_to(ignore_error_results_url) end end diff --git a/spec/controllers/log_campaigns_controller_spec.rb b/spec/controllers/log_campaigns_controller_spec.rb index 4d82be2..099fc9a 100644 --- a/spec/controllers/log_campaigns_controller_spec.rb +++ b/spec/controllers/log_campaigns_controller_spec.rb @@ -19,7 +19,6 @@ # that an instance is receiving a specific message. RSpec.describe LogCampaignsController, type: :controller do - # This should return the minimal set of attributes required to create a valid # LogCampaign. As you add validations to LogCampaign, be sure to # adjust the attributes here as well. @@ -43,7 +42,7 @@ it "assigns all log_campaigns as @log_campaigns" do log_campaign = LogCampaign.create! valid_attributes get :index, params: {}, session: valid_session - expect(assigns(:log_campaigns)).to eq([log_campaign]) + expect(assigns(:log_campaigns)).to eq([ log_campaign ]) end end @@ -51,7 +50,7 @@ it "assigns all log_campaigns as @log_campaigns" do log_campaign = LogCampaign.create! valid_attributes get :search, params: {}, session: valid_session - expect(assigns(:log_campaigns)).to eq([log_campaign]) + expect(assigns(:log_campaigns)).to eq([ log_campaign ]) end end @@ -76,7 +75,7 @@ it "assigns the requested diagnosis_logs as @diagnosis_logs" do get :all, params: { id: @log_campaign.to_param }, session: valid_session - expect(assigns(:diagnosis_logs)).to eq([@diagnosis_log]) + expect(assigns(:diagnosis_logs)).to eq([ @diagnosis_log ]) end end @@ -93,7 +92,7 @@ it "assigns the requested diagnosis_logs as @diagnosis_logs" do get :log, params: { id: @log_campaign.to_param }, session: valid_session - expect(assigns(:diagnosis_logs)).to eq([@diagnosis_log]) + expect(assigns(:diagnosis_logs)).to eq([ @diagnosis_log ]) end end @@ -110,7 +109,7 @@ it "assigns the requested diagnosis_logs as @diagnosis_logs" do get :error, params: { id: @log_campaign.to_param }, session: valid_session - expect(assigns(:diagnosis_logs)).to eq([@diagnosis_log]) + expect(assigns(:diagnosis_logs)).to eq([ @diagnosis_log ]) end end diff --git a/spec/controllers/static_pages_controller_spec.rb b/spec/controllers/static_pages_controller_spec.rb index 49a14d1..7d6a7fb 100644 --- a/spec/controllers/static_pages_controller_spec.rb +++ b/spec/controllers/static_pages_controller_spec.rb @@ -1,7 +1,6 @@ require 'rails_helper' RSpec.describe StaticPagesController, type: :controller do - describe "GET #about" do it "returns http success" do get :about, params: {} diff --git a/spec/controllers/statuses_controller_spec.rb b/spec/controllers/statuses_controller_spec.rb index 1f53cd2..6d9d323 100644 --- a/spec/controllers/statuses_controller_spec.rb +++ b/spec/controllers/statuses_controller_spec.rb @@ -19,7 +19,6 @@ # that an instance is receiving a specific message. RSpec.describe StatusesController, type: :controller do - # This should return the minimal set of attributes required to create a valid # DiagnosisLog. As you add validations to DiagnosisLog, be sure to # adjust the attributes here as well. diff --git a/spec/factories/ignore_error_results.rb b/spec/factories/ignore_error_results.rb index 3729d42..eb32d0e 100644 --- a/spec/factories/ignore_error_results.rb +++ b/spec/factories/ignore_error_results.rb @@ -1,6 +1,6 @@ FactoryBot.define do factory :ignore_error_result do ssid { "MySSID" } - ignore_log_types { %w( v4http_srv ) } + ignore_log_types { %w[ v4http_srv ] } end end diff --git a/spec/factories/log_campaigns.rb b/spec/factories/log_campaigns.rb index 38f223a..7edae84 100644 --- a/spec/factories/log_campaigns.rb +++ b/spec/factories/log_campaigns.rb @@ -8,5 +8,4 @@ version { "MyString" } occurred_at { "2015-08-01 01:15:59" } end - end diff --git a/spec/helpers/application_helper_spec.rb b/spec/helpers/application_helper_spec.rb index 8d6e71a..43b82c3 100644 --- a/spec/helpers/application_helper_spec.rb +++ b/spec/helpers/application_helper_spec.rb @@ -10,7 +10,7 @@ # end # end # end -RSpec.describe ApplicationHelper, :type => :helper do +RSpec.describe ApplicationHelper, type: :helper do describe "nl2br" do it "replace line break to br tag" do str = "hoge\nhoge" diff --git a/spec/models/diagnosis_log_spec.rb b/spec/models/diagnosis_log_spec.rb index addad07..804db4c 100644 --- a/spec/models/diagnosis_log_spec.rb +++ b/spec/models/diagnosis_log_spec.rb @@ -122,7 +122,7 @@ before(:each) do @ignore_error_result = FactoryBot.create(:ignore_error_result, ssid: 'SSID', - ignore_log_types: ["v4http_srv", "v6trans_aaaa_namesrv"], + ignore_log_types: [ "v4http_srv", "v6trans_aaaa_namesrv" ], ) @log_campaign = FactoryBot.create(:log_campaign, ssid: 'SSID') end diff --git a/spec/models/ignore_error_result_spec.rb b/spec/models/ignore_error_result_spec.rb index 1dafc06..306413f 100644 --- a/spec/models/ignore_error_result_spec.rb +++ b/spec/models/ignore_error_result_spec.rb @@ -29,7 +29,7 @@ before(:each) do @ignore_error_result = IgnoreErrorResult.create( ssid: 'SSID', - ignore_log_types: ["v4http_srv", "v6trans_aaaa_namesrv"], + ignore_log_types: [ "v4http_srv", "v6trans_aaaa_namesrv" ], ) end diff --git a/spec/models/log_campaign_spec.rb b/spec/models/log_campaign_spec.rb index 0270148..92f5a87 100644 --- a/spec/models/log_campaign_spec.rb +++ b/spec/models/log_campaign_spec.rb @@ -56,7 +56,7 @@ before(:each) do @ignore_error_result = FactoryBot.create(:ignore_error_result, ssid: 'SSID', - ignore_log_types: ["v4http_srv", "v6trans_aaaa_namesrv"], + ignore_log_types: [ "v4http_srv", "v6trans_aaaa_namesrv" ], ) @log_campaign = FactoryBot.create(:log_campaign, ssid: 'SSID') end diff --git a/spec/routing/diagnosis_logs_routing_spec.rb b/spec/routing/diagnosis_logs_routing_spec.rb index 2a427fd..ab56e8d 100644 --- a/spec/routing/diagnosis_logs_routing_spec.rb +++ b/spec/routing/diagnosis_logs_routing_spec.rb @@ -2,38 +2,36 @@ RSpec.describe DiagnosisLogsController, type: :routing do describe "routing" do - it "routes to #index" do - expect(:get => "/diagnosis_logs").to route_to("diagnosis_logs#index") + expect(get: "/diagnosis_logs").to route_to("diagnosis_logs#index") end it "routes to #new" do - expect(:get => "/diagnosis_logs/new").to route_to("diagnosis_logs#new") + expect(get: "/diagnosis_logs/new").to route_to("diagnosis_logs#new") end it "routes to #show" do - expect(:get => "/diagnosis_logs/1").to route_to("diagnosis_logs#show", :id => "1") + expect(get: "/diagnosis_logs/1").to route_to("diagnosis_logs#show", id: "1") end it "routes to #edit" do - expect(:get => "/diagnosis_logs/1/edit").to route_to("diagnosis_logs#edit", :id => "1") + expect(get: "/diagnosis_logs/1/edit").to route_to("diagnosis_logs#edit", id: "1") end it "routes to #create" do - expect(:post => "/diagnosis_logs").to route_to("diagnosis_logs#create") + expect(post: "/diagnosis_logs").to route_to("diagnosis_logs#create") end it "routes to #update via PUT" do - expect(:put => "/diagnosis_logs/1").to route_to("diagnosis_logs#update", :id => "1") + expect(put: "/diagnosis_logs/1").to route_to("diagnosis_logs#update", id: "1") end it "routes to #update via PATCH" do - expect(:patch => "/diagnosis_logs/1").to route_to("diagnosis_logs#update", :id => "1") + expect(patch: "/diagnosis_logs/1").to route_to("diagnosis_logs#update", id: "1") end it "routes to #destroy" do - expect(:delete => "/diagnosis_logs/1").to route_to("diagnosis_logs#destroy", :id => "1") + expect(delete: "/diagnosis_logs/1").to route_to("diagnosis_logs#destroy", id: "1") end - end end diff --git a/spec/routing/ignore_error_results_routing_spec.rb b/spec/routing/ignore_error_results_routing_spec.rb index b3bd077..03a42c5 100644 --- a/spec/routing/ignore_error_results_routing_spec.rb +++ b/spec/routing/ignore_error_results_routing_spec.rb @@ -2,38 +2,36 @@ RSpec.describe IgnoreErrorResultsController, type: :routing do describe "routing" do - it "routes to #index" do - expect(:get => "/ignore_error_results").to route_to("ignore_error_results#index") + expect(get: "/ignore_error_results").to route_to("ignore_error_results#index") end it "routes to #new" do - expect(:get => "/ignore_error_results/new").to route_to("ignore_error_results#new") + expect(get: "/ignore_error_results/new").to route_to("ignore_error_results#new") end it "routes to #show" do - expect(:get => "/ignore_error_results/1").to route_to("ignore_error_results#show", :id => "1") + expect(get: "/ignore_error_results/1").to route_to("ignore_error_results#show", id: "1") end it "routes to #edit" do - expect(:get => "/ignore_error_results/1/edit").to route_to("ignore_error_results#edit", :id => "1") + expect(get: "/ignore_error_results/1/edit").to route_to("ignore_error_results#edit", id: "1") end it "routes to #create" do - expect(:post => "/ignore_error_results").to route_to("ignore_error_results#create") + expect(post: "/ignore_error_results").to route_to("ignore_error_results#create") end it "routes to #update via PUT" do - expect(:put => "/ignore_error_results/1").to route_to("ignore_error_results#update", :id => "1") + expect(put: "/ignore_error_results/1").to route_to("ignore_error_results#update", id: "1") end it "routes to #update via PATCH" do - expect(:patch => "/ignore_error_results/1").to route_to("ignore_error_results#update", :id => "1") + expect(patch: "/ignore_error_results/1").to route_to("ignore_error_results#update", id: "1") end it "routes to #destroy" do - expect(:delete => "/ignore_error_results/1").to route_to("ignore_error_results#destroy", :id => "1") + expect(delete: "/ignore_error_results/1").to route_to("ignore_error_results#destroy", id: "1") end - end end diff --git a/spec/routing/log_campaigns_routing_spec.rb b/spec/routing/log_campaigns_routing_spec.rb index d168326..d3f0d0f 100644 --- a/spec/routing/log_campaigns_routing_spec.rb +++ b/spec/routing/log_campaigns_routing_spec.rb @@ -2,54 +2,52 @@ RSpec.describe LogCampaignsController, type: :routing do describe "routing" do - it "routes to #index" do - expect(:get => "/log_campaigns").to route_to("log_campaigns#index") + expect(get: "/log_campaigns").to route_to("log_campaigns#index") end it "routes to #search" do - expect(:get => "/log_campaigns/search").to route_to("log_campaigns#search") + expect(get: "/log_campaigns/search").to route_to("log_campaigns#search") end it "routes to #new" do - expect(:get => "/log_campaigns/new").to route_to("log_campaigns#new") + expect(get: "/log_campaigns/new").to route_to("log_campaigns#new") end it "routes to #show" do - expect(:get => "/log_campaigns/1").to route_to("log_campaigns#show", :id => "1") + expect(get: "/log_campaigns/1").to route_to("log_campaigns#show", id: "1") end it "routes to #all" do - expect(:get => "/log_campaigns/1/all").to route_to("log_campaigns#all", :id => "1") + expect(get: "/log_campaigns/1/all").to route_to("log_campaigns#all", id: "1") end it "routes to #log" do - expect(:get => "/log_campaigns/1/log").to route_to("log_campaigns#log", :id => "1") + expect(get: "/log_campaigns/1/log").to route_to("log_campaigns#log", id: "1") end it "routes to #error" do - expect(:get => "/log_campaigns/1/error").to route_to("log_campaigns#error", :id => "1") + expect(get: "/log_campaigns/1/error").to route_to("log_campaigns#error", id: "1") end it "routes to #edit" do - expect(:get => "/log_campaigns/1/edit").to route_to("log_campaigns#edit", :id => "1") + expect(get: "/log_campaigns/1/edit").to route_to("log_campaigns#edit", id: "1") end it "routes to #create" do - expect(:post => "/log_campaigns").to route_to("log_campaigns#create") + expect(post: "/log_campaigns").to route_to("log_campaigns#create") end it "routes to #update via PUT" do - expect(:put => "/log_campaigns/1").to route_to("log_campaigns#update", :id => "1") + expect(put: "/log_campaigns/1").to route_to("log_campaigns#update", id: "1") end it "routes to #update via PATCH" do - expect(:patch => "/log_campaigns/1").to route_to("log_campaigns#update", :id => "1") + expect(patch: "/log_campaigns/1").to route_to("log_campaigns#update", id: "1") end it "routes to #destroy" do - expect(:delete => "/log_campaigns/1").to route_to("log_campaigns#destroy", :id => "1") + expect(delete: "/log_campaigns/1").to route_to("log_campaigns#destroy", id: "1") end - end end diff --git a/spec/routing/static_pages_routing_spec.rb b/spec/routing/static_pages_routing_spec.rb index 5f4ff64..a1b9846 100644 --- a/spec/routing/static_pages_routing_spec.rb +++ b/spec/routing/static_pages_routing_spec.rb @@ -2,10 +2,8 @@ RSpec.describe StaticPagesController, type: :routing do describe "routing" do - it "routes to #about" do - expect(:get => "/about").to route_to("static_pages#about") + expect(get: "/about").to route_to("static_pages#about") end - end end diff --git a/spec/routing/status_pages_routing_spec.rb b/spec/routing/status_pages_routing_spec.rb index 9e84eff..b31394d 100644 --- a/spec/routing/status_pages_routing_spec.rb +++ b/spec/routing/status_pages_routing_spec.rb @@ -2,10 +2,8 @@ RSpec.describe StatusesController, type: :routing do describe "routing" do - it "routes to #index" do - expect(:get => "/status").to route_to("statuses#index") + expect(get: "/status").to route_to("statuses#index") end - end end diff --git a/spec/spec_helper.rb b/spec/spec_helper.rb index 089dd29..bf34f28 100644 --- a/spec/spec_helper.rb +++ b/spec/spec_helper.rb @@ -44,8 +44,8 @@ # triggering implicit auto-inclusion in groups with matching metadata. config.shared_context_metadata_behavior = :apply_to_host_groups -# The settings below are suggested to provide a good initial experience -# with RSpec, but feel free to customize to your heart's content. + # The settings below are suggested to provide a good initial experience + # with RSpec, but feel free to customize to your heart's content. # This allows you to limit a spec run to individual examples or groups # you care about by tagging them with `:focus` metadata. When nothing @@ -57,7 +57,7 @@ # Allows RSpec to persist some state between runs in order to support # the `--only-failures` and `--next-failure` CLI options. We recommend # you configure your source control system to ignore this file. -# config.example_status_persistence_file_path = "spec/examples.txt" + # config.example_status_persistence_file_path = "spec/examples.txt" # Limits the available syntax to the non-monkey patched syntax that is # recommended. For more details, see: @@ -77,7 +77,7 @@ # Print the 10 slowest examples and example groups at the # end of the spec run, to help surface which specs are running # particularly slow. -# config.profile_examples = 10 + # config.profile_examples = 10 # Run specs in random order to surface order dependencies. If you find an # order dependency and want to debug it, you can fix the order by providing diff --git a/spec/support/controller_macros.rb b/spec/support/controller_macros.rb index 5c3a88a..6a090ec 100644 --- a/spec/support/controller_macros.rb +++ b/spec/support/controller_macros.rb @@ -3,7 +3,7 @@ def login_user before(:each) do @request.env["devise.mapping"] = Devise.mappings[:user] @loginuser = FactoryBot.create(:login_user) - #user.confirm! # or set a confirmed_at inside the factory. Only necessary if you are using the confirmable module + # user.confirm! # or set a confirmed_at inside the factory. Only necessary if you are using the confirmable module sign_in @loginuser end diff --git a/spec/views/diagnosis_logs/edit.html.slim_spec.rb b/spec/views/diagnosis_logs/edit.html.slim_spec.rb index a7bc4b6..6854766 100644 --- a/spec/views/diagnosis_logs/edit.html.slim_spec.rb +++ b/spec/views/diagnosis_logs/edit.html.slim_spec.rb @@ -3,13 +3,13 @@ RSpec.describe "diagnosis_logs/edit", type: :view do before(:each) do @diagnosis_log = assign(:diagnosis_log, DiagnosisLog.create!( - :layer => "web", - :log_group => "Log Group", - :log_type => "Log Type", - :target => "Target", - :result => :fail, - :detail => "Detail", - :occurred_at => "2015-07-24 19:24:42", + layer: "web", + log_group: "Log Group", + log_type: "Log Type", + target: "Target", + result: :fail, + detail: "Detail", + occurred_at: "2015-07-24 19:24:42", )) end @@ -17,7 +17,6 @@ render assert_select "form[action=?][method=?]", diagnosis_log_path(@diagnosis_log), "post" do - assert_select "select#diagnosis_log_layer[name=?]", "diagnosis_log[layer]" assert_select "input#diagnosis_log_log_group[name=?]", "diagnosis_log[log_group]" assert_select "input#diagnosis_log_log_type[name=?]", "diagnosis_log[log_type]" diff --git a/spec/views/diagnosis_logs/index.html.slim_spec.rb b/spec/views/diagnosis_logs/index.html.slim_spec.rb index 7d200f7..0decc5b 100644 --- a/spec/views/diagnosis_logs/index.html.slim_spec.rb +++ b/spec/views/diagnosis_logs/index.html.slim_spec.rb @@ -4,37 +4,37 @@ before(:each) do assign(:diagnosis_logs, Kaminari.paginate_array([ DiagnosisLog.create!( - :layer => "Layer", - :log_group => "Log Group", - :log_type => "Log Type", - :target => "Target", - :result => :success, - :detail => "Detail", - :occurred_at => "2015-07-24 19:24:42", + layer: "Layer", + log_group: "Log Group", + log_type: "Log Type", + target: "Target", + result: :success, + detail: "Detail", + occurred_at: "2015-07-24 19:24:42", ), DiagnosisLog.create!( - :layer => "Layer", - :log_group => "Log Group", - :log_type => "Log Type", - :target => "Target", - :result => :fail, - :detail => "Detail", - :occurred_at => "2015-07-24 19:24:42", + layer: "Layer", + log_group: "Log Group", + log_type: "Log Type", + target: "Target", + result: :fail, + detail: "Detail", + occurred_at: "2015-07-24 19:24:42", ) ]).page(1)) end it "renders a list of diagnosis_logs" do render - assert_select "tr>td", :text => "Layer".to_s, :count => 2 - assert_select "tr>td", :text => "Log Group".to_s, :count => 2 - assert_select "tr>td", :text => "Log Type".to_s, :count => 2 - assert_select "tr>td", :text => "Target".to_s, :count => 2 + assert_select "tr>td", text: "Layer".to_s, count: 2 + assert_select "tr>td", text: "Log Group".to_s, count: 2 + assert_select "tr>td", text: "Log Type".to_s, count: 2 + assert_select "tr>td", text: "Target".to_s, count: 2 end it "renders a class of diagnosis_log result" do render - assert_select "tr.table-success", :count => 1 - assert_select "tr.table-danger", :count => 1 + assert_select "tr.table-success", count: 1 + assert_select "tr.table-danger", count: 1 end end diff --git a/spec/views/diagnosis_logs/new.html.slim_spec.rb b/spec/views/diagnosis_logs/new.html.slim_spec.rb index 1e0e2b7..fc506e8 100644 --- a/spec/views/diagnosis_logs/new.html.slim_spec.rb +++ b/spec/views/diagnosis_logs/new.html.slim_spec.rb @@ -3,13 +3,13 @@ RSpec.describe "diagnosis_logs/new", type: :view do before(:each) do assign(:diagnosis_log, DiagnosisLog.new( - :layer => "web", - :log_group => "Log Group", - :log_type => "Log Type", - :target => "Target", - :result => :fail, - :detail => "Detail", - :occurred_at => "2015-07-24 19:24:42", + layer: "web", + log_group: "Log Group", + log_type: "Log Type", + target: "Target", + result: :fail, + detail: "Detail", + occurred_at: "2015-07-24 19:24:42", )) end @@ -17,7 +17,6 @@ render assert_select "form[action=?][method=?]", diagnosis_logs_path, "post" do - assert_select "select#diagnosis_log_layer[name=?]", "diagnosis_log[layer]" assert_select "input#diagnosis_log_log_group[name=?]", "diagnosis_log[log_group]" assert_select "input#diagnosis_log_log_type[name=?]", "diagnosis_log[log_type]" diff --git a/spec/views/diagnosis_logs/show.html.slim_spec.rb b/spec/views/diagnosis_logs/show.html.slim_spec.rb index 4f04d80..1872441 100644 --- a/spec/views/diagnosis_logs/show.html.slim_spec.rb +++ b/spec/views/diagnosis_logs/show.html.slim_spec.rb @@ -3,13 +3,13 @@ RSpec.describe "diagnosis_logs/show", type: :view do before(:each) do @diagnosis_log = assign(:diagnosis_log, DiagnosisLog.create!( - :layer => "Layer", - :log_group => "Log Group", - :log_type => "Log Type", - :target => "Target", - :result => :fail, - :detail => "Detail", - :occurred_at => "2015-07-24 19:24:42", + layer: "Layer", + log_group: "Log Group", + log_type: "Log Type", + target: "Target", + result: :fail, + detail: "Detail", + occurred_at: "2015-07-24 19:24:42", )) end diff --git a/spec/views/ignore_error_results/index.html.slim_spec.rb b/spec/views/ignore_error_results/index.html.slim_spec.rb index 59a6bdd..658c01c 100644 --- a/spec/views/ignore_error_results/index.html.slim_spec.rb +++ b/spec/views/ignore_error_results/index.html.slim_spec.rb @@ -8,14 +8,14 @@ ), IgnoreErrorResult.create!( ssid: "SSID2", - ), + ) ]) end it "renders a list of ignore_error_results" do render - assert_select "tr>td", :text => "SSID1".to_s, :count => 1 - assert_select "tr>td", :text => "SSID2".to_s, :count => 1 + assert_select "tr>td", text: "SSID1".to_s, count: 1 + assert_select "tr>td", text: "SSID2".to_s, count: 1 end end diff --git a/spec/views/log_campaigns/edit.html.slim_spec.rb b/spec/views/log_campaigns/edit.html.slim_spec.rb index 0370eb5..23f052f 100644 --- a/spec/views/log_campaigns/edit.html.slim_spec.rb +++ b/spec/views/log_campaigns/edit.html.slim_spec.rb @@ -3,12 +3,12 @@ RSpec.describe "log_campaigns/edit", type: :view do before(:each) do @log_campaign = assign(:log_campaign, LogCampaign.create!( - :log_campaign_uuid => "MyString", - :ssid => "Ssid", - :network_type => "NetworkType", - :mac_addr => "MyString", - :os => "MyString", - :occurred_at => "2015-07-24 19:24:42", + log_campaign_uuid: "MyString", + ssid: "Ssid", + network_type: "NetworkType", + mac_addr: "MyString", + os: "MyString", + occurred_at: "2015-07-24 19:24:42", )) end @@ -16,7 +16,6 @@ render assert_select "form[action=?][method=?]", log_campaign_path(@log_campaign), "post" do - assert_select "input#log_campaign_log_campaign_uuid[name=?]", "log_campaign[log_campaign_uuid]" assert_select "input#log_campaign_ssid[name=?]", "log_campaign[ssid]" diff --git a/spec/views/log_campaigns/index.html.slim_spec.rb b/spec/views/log_campaigns/index.html.slim_spec.rb index 231b5a3..8c00d7a 100644 --- a/spec/views/log_campaigns/index.html.slim_spec.rb +++ b/spec/views/log_campaigns/index.html.slim_spec.rb @@ -4,30 +4,30 @@ before(:each) do assign(:log_campaigns, Kaminari.paginate_array([ LogCampaign.create!( - :log_campaign_uuid => "Log Campaign Uuid 1", - :ssid => "SSID", - :network_type => "NetworkType", - :mac_addr => "Mac Addr", - :os => "Os", - :occurred_at => "2015-07-24 19:24:42", + log_campaign_uuid: "Log Campaign Uuid 1", + ssid: "SSID", + network_type: "NetworkType", + mac_addr: "Mac Addr", + os: "Os", + occurred_at: "2015-07-24 19:24:42", ), LogCampaign.create!( - :log_campaign_uuid => "Log Campaign Uuid 2", - :ssid => "SSID", - :network_type => "NetworkType", - :mac_addr => "Mac Addr", - :os => "Os", - :occurred_at => "2015-07-24 19:24:42", + log_campaign_uuid: "Log Campaign Uuid 2", + ssid: "SSID", + network_type: "NetworkType", + mac_addr: "Mac Addr", + os: "Os", + occurred_at: "2015-07-24 19:24:42", ) ]).page(1)) end it "renders a list of log_campaigns" do render - assert_select "tr>td", :text => "SSID".to_s, :count => 2 - assert_select "tr>td", :text => "Log Campaign Uuid 1".to_s, :count => 1 - assert_select "tr>td", :text => "Log Campaign Uuid 2".to_s, :count => 1 - assert_select "tr>td", :text => "Mac Addr".to_s, :count => 2 - assert_select "tr>td", :text => "Os".to_s, :count => 2 + assert_select "tr>td", text: "SSID".to_s, count: 2 + assert_select "tr>td", text: "Log Campaign Uuid 1".to_s, count: 1 + assert_select "tr>td", text: "Log Campaign Uuid 2".to_s, count: 1 + assert_select "tr>td", text: "Mac Addr".to_s, count: 2 + assert_select "tr>td", text: "Os".to_s, count: 2 end end diff --git a/spec/views/log_campaigns/new.html.slim_spec.rb b/spec/views/log_campaigns/new.html.slim_spec.rb index 1b68b0e..5b07c50 100644 --- a/spec/views/log_campaigns/new.html.slim_spec.rb +++ b/spec/views/log_campaigns/new.html.slim_spec.rb @@ -3,12 +3,12 @@ RSpec.describe "log_campaigns/new", type: :view do before(:each) do assign(:log_campaign, LogCampaign.new( - :log_campaign_uuid => "MyString", - :ssid => "Ssid", - :network_type => "NetworkType", - :mac_addr => "MyString", - :os => "MyString", - :occurred_at => "2015-07-24 19:24:42", + log_campaign_uuid: "MyString", + ssid: "Ssid", + network_type: "NetworkType", + mac_addr: "MyString", + os: "MyString", + occurred_at: "2015-07-24 19:24:42", )) end @@ -16,7 +16,6 @@ render assert_select "form[action=?][method=?]", log_campaigns_path, "post" do - assert_select "input#log_campaign_log_campaign_uuid[name=?]", "log_campaign[log_campaign_uuid]" assert_select "input#log_campaign_ssid[name=?]", "log_campaign[ssid]" diff --git a/spec/views/log_campaigns/search.html.slim_spec.rb b/spec/views/log_campaigns/search.html.slim_spec.rb index 2240895..633b302 100644 --- a/spec/views/log_campaigns/search.html.slim_spec.rb +++ b/spec/views/log_campaigns/search.html.slim_spec.rb @@ -4,30 +4,30 @@ before(:each) do assign(:log_campaigns, Kaminari.paginate_array([ LogCampaign.create!( - :log_campaign_uuid => "Log Campaign Uuid 1", - :ssid => "SSID", - :network_type => "NetworkType", - :mac_addr => "Mac Addr", - :os => "Os", - :occurred_at => "2015-07-24 19:24:42", + log_campaign_uuid: "Log Campaign Uuid 1", + ssid: "SSID", + network_type: "NetworkType", + mac_addr: "Mac Addr", + os: "Os", + occurred_at: "2015-07-24 19:24:42", ), LogCampaign.create!( - :log_campaign_uuid => "Log Campaign Uuid 2", - :ssid => "SSID", - :network_type => "NetworkType", - :mac_addr => "Mac Addr", - :os => "Os", - :occurred_at => "2015-07-24 19:24:42", + log_campaign_uuid: "Log Campaign Uuid 2", + ssid: "SSID", + network_type: "NetworkType", + mac_addr: "Mac Addr", + os: "Os", + occurred_at: "2015-07-24 19:24:42", ) ]).page(1)) end it "renders a list of log_campaigns" do render - assert_select "tr>td", :text => "SSID".to_s, :count => 2 - assert_select "tr>td", :text => "Log Campaign Uuid 1".to_s, :count => 1 - assert_select "tr>td", :text => "Log Campaign Uuid 2".to_s, :count => 1 - assert_select "tr>td", :text => "Mac Addr".to_s, :count => 2 - assert_select "tr>td", :text => "Os".to_s, :count => 2 + assert_select "tr>td", text: "SSID".to_s, count: 2 + assert_select "tr>td", text: "Log Campaign Uuid 1".to_s, count: 1 + assert_select "tr>td", text: "Log Campaign Uuid 2".to_s, count: 1 + assert_select "tr>td", text: "Mac Addr".to_s, count: 2 + assert_select "tr>td", text: "Os".to_s, count: 2 end end diff --git a/spec/views/log_campaigns/show.html.slim_spec.rb b/spec/views/log_campaigns/show.html.slim_spec.rb index f67a7dd..63af024 100644 --- a/spec/views/log_campaigns/show.html.slim_spec.rb +++ b/spec/views/log_campaigns/show.html.slim_spec.rb @@ -3,33 +3,33 @@ RSpec.describe "log_campaigns/show", type: :view do before(:each) do @log_campaign = assign(:log_campaign, LogCampaign.create!( - :log_campaign_uuid => "Log Campaign Uuid", - :ssid => "SSID", - :network_type => "NetworkType", - :mac_addr => "Mac Addr", - :os => "Os", - :version => "Version", - :occurred_at => "2015-07-24 19:24:42", + log_campaign_uuid: "Log Campaign Uuid", + ssid: "SSID", + network_type: "NetworkType", + mac_addr: "Mac Addr", + os: "Os", + version: "Version", + occurred_at: "2015-07-24 19:24:42", )) assign(:diagnosis_logs, [ DiagnosisLog.create!( - :layer => "Layer", - :log_group => "Log Group", - :log_type => "Log Type", - :target => "Target", - :result => :success, - :detail => "Detail", - :occurred_at => "2015-07-24 19:24:42", + layer: "Layer", + log_group: "Log Group", + log_type: "Log Type", + target: "Target", + result: :success, + detail: "Detail", + occurred_at: "2015-07-24 19:24:42", ), DiagnosisLog.create!( - :layer => "Layer", - :log_group => "Log Group", - :log_type => "Log Type", - :target => "Target", - :result => :fail, - :detail => "Detail", - :occurred_at => "2015-07-24 19:24:42", + layer: "Layer", + log_group: "Log Group", + log_type: "Log Type", + target: "Target", + result: :fail, + detail: "Detail", + occurred_at: "2015-07-24 19:24:42", ) ]) end