Skip to content

Commit 97e0030

Browse files
committed
🐛 Fixed Rails 8 compat
1 parent c71afbc commit 97e0030

File tree

133 files changed

+2610
-1513
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

133 files changed

+2610
-1513
lines changed

.envrc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,8 @@ export K_SOUP_COV_DO=true # Means you want code coverage
1919
# Available formats are html, xml, rcov, lcov, json, tty
2020
export K_SOUP_COV_COMMAND_NAME="RSpec Coverage"
2121
export K_SOUP_COV_FORMATTERS="html,tty"
22-
export K_SOUP_COV_MIN_BRANCH=100 # Means you want to enforce X% branch coverage
23-
export K_SOUP_COV_MIN_LINE=100 # Means you want to enforce X% line coverage
22+
export K_SOUP_COV_MIN_BRANCH=2 # Means you want to enforce X% branch coverage
23+
export K_SOUP_COV_MIN_LINE=46 # Means you want to enforce X% line coverage
2424
export K_SOUP_COV_MIN_HARD=true # Means you want the build to fail if the coverage thresholds are not met
2525
export K_SOUP_COV_MULTI_FORMATTERS=true
2626
export MAX_ROWS=1 # Setting for simplecov-console gem for tty output, limits to the worst N rows of bad coverage

.rubocop_gradual.lock

Lines changed: 65 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,65 @@
1+
{
2+
"app/controllers/masq/info_controller.rb:3069306562": [
3+
[13, 65, 2, "Style/AndOr: Use `||` instead of `or`.", 5861240]
4+
],
5+
"app/controllers/masq/passwords_controller.rb:4013562638": [
6+
[8, 18, 1, "Lint/AssignmentInCondition: Wrap assignment in parentheses if intentional", 177560]
7+
],
8+
"app/controllers/masq/server_controller.rb:4249946322": [
9+
[47, 16, 1, "Lint/AssignmentInCondition: Wrap assignment in parentheses if intentional", 177560],
10+
[89, 25, 1, "Lint/AssignmentInCondition: Wrap assignment in parentheses if intentional", 177560]
11+
],
12+
"app/controllers/masq/sessions_controller.rb:2546607075": [
13+
[39, 21, 3, "Style/AndOr: Use `&&` instead of `and`.", 193409806],
14+
[49, 20, 1, "Lint/AssignmentInCondition: Wrap assignment in parentheses if intentional", 177560]
15+
],
16+
"app/models/masq/account.rb:3431296046": [
17+
[43, 5, 298, "Style/ClassMethodsDefinitions: Use `class << self` to define a class method.", 2464945722],
18+
[80, 5, 1035, "Style/ClassMethodsDefinitions: Use `class << self` to define a class method.", 2286399262],
19+
[82, 17, 3, "Style/AndOr: Use `&&` instead of `and`.", 193409806],
20+
[98, 18, 3, "Style/AndOr: Use `&&` instead of `and`.", 193409806],
21+
[98, 32, 3, "Style/AndOr: Use `&&` instead of `and`.", 193409806],
22+
[99, 39, 2, "Style/AndOr: Use `||` instead of `or`.", 5861240],
23+
[99, 88, 3, "Style/AndOr: Use `&&` instead of `and`.", 193409806],
24+
[108, 5, 97, "Style/ClassMethodsDefinitions: Use `class << self` to define a class method.", 4218748683],
25+
[220, 5, 3, "Lint/IneffectiveAccessModifier: `private` (on line 216) does not make singleton methods private. Use `private_class_method` or `private` inside a `class << self` block instead.", 193404514],
26+
[220, 5, 85, "Style/ClassMethodsDefinitions: Use `class << self` to define a class method.", 115756650],
27+
[226, 5, 3, "Lint/IneffectiveAccessModifier: `private` (on line 216) does not make singleton methods private. Use `private_class_method` or `private` inside a `class << self` block instead.", 193404514],
28+
[226, 5, 181, "Style/ClassMethodsDefinitions: Use `class << self` to define a class method.", 3702657420],
29+
[234, 5, 3, "Lint/IneffectiveAccessModifier: `private` (on line 216) does not make singleton methods private. Use `private_class_method` or `private` inside a `class << self` block instead.", 193404514],
30+
[234, 5, 135, "Style/ClassMethodsDefinitions: Use `class << self` to define a class method.", 4139970307]
31+
],
32+
"app/models/masq/open_id_request.rb:3145306176": [
33+
[27, 7, 159, "Style/SafeNavigation: Use safe navigation (`&.`) instead of checking if an object exists before calling the method.", 474907089]
34+
],
35+
"app/models/masq/persona.rb:3585878101": [
36+
[14, 5, 55, "Style/ClassMethodsDefinitions: Use `class << self` to define a class method.", 1041090622],
37+
[18, 5, 142, "Style/ClassMethodsDefinitions: Use `class << self` to define a class method.", 3038409932],
38+
[55, 5, 3, "Lint/IneffectiveAccessModifier: `private` (on line 52) does not make singleton methods private. Use `private_class_method` or `private` inside a `class << self` block instead.", 193404514],
39+
[55, 5, 78, "Style/ClassMethodsDefinitions: Use `class << self` to define a class method.", 2563415249]
40+
],
41+
"app/models/masq/signup.rb:1186383472": [
42+
[7, 5, 126, "Style/ClassMethodsDefinitions: Use `class << self` to define a class method.", 1071524745]
43+
],
44+
"lib/masq/authenticated_system.rb:2956957840": [
45+
[95, 5, 3, "Lint/IneffectiveAccessModifier: `protected` (on line 3) does not make singleton methods protected. Use `protected` inside a `class << self` block instead.", 193404514],
46+
[95, 5, 111, "Style/ClassMethodsDefinitions: Use `class << self` to define a class method.", 4258707989],
47+
[127, 10, 34, "Style/SafeNavigation: Use safe navigation (`&.`) instead of checking if an object exists before calling the method.", 631550519]
48+
],
49+
"lib/masq/openid_server_system.rb:2879462441": [
50+
[106, 26, 41, "Style/SafeNavigation: Use safe navigation (`&.`) instead of checking if an object exists before calling the method.", 3858462676]
51+
],
52+
"lib/tasks/masq_tasks.rake:1483017689": [
53+
[39, 21, 42, "Style/SafeNavigation: Use safe navigation (`&.`) instead of checking if an object exists before calling the method.", 4054527944]
54+
],
55+
"masq.gemspec:1107948888": [
56+
[72, 3, 26, "Gemspec/DependencyVersion: Dependency version specification is required.", 1260806891],
57+
[73, 3, 32, "Gemspec/DependencyVersion: Dependency version specification is required.", 855136127],
58+
[76, 3, 33, "Gemspec/DependencyVersion: Dependency version specification is required.", 3159729161],
59+
[78, 3, 30, "Gemspec/DependencyVersion: Dependency version specification is required.", 2010339150],
60+
[89, 3, 72, "Gemspec/DependencyVersion: Dependency version specification is required.", 2491072344]
61+
],
62+
"test/test_helper.rb:2707756256": [
63+
[194, 45, 1, "Lint/AssignmentInCondition: Wrap assignment in parentheses if intentional", 177560]
64+
]
65+
}

.tool-versions

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
ruby 2.7.8
1+
ruby 3.4.2

Appraisal.root.gemfile

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
# frozen_string_literal: true
2+
3+
git_source(:github) { |repo_name| "https://github.com/#{repo_name}" }
4+
5+
source "https://rubygems.org"
6+
7+
# Appraisal Root Gemfile is for running appraisal to generate the Appraisal Gemfiles
8+
# in gemfiles/*gemfile.
9+
# On CI, we use it for the Appraisal-based builds.
10+
# We do not load the standard Gemfile, as it is tailored for local development.
11+
12+
gemspec
13+
14+
gem "appraisal", github: "pboling/appraisal", branch: "galtzo"

Appraisals

Lines changed: 66 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,66 @@
1+
# frozen_string_literal: true
2+
3+
# Compat: Ruby >= 2.2.2
4+
# Test Matrix:
5+
# - Ruby 2.3
6+
# - Ruby 2.4
7+
# - Ruby 2.5
8+
# - Ruby 2.6
9+
# - Ruby 2.7
10+
appraise "rails-5-2" do
11+
# Load order is very important with combustion!
12+
gem "combustion", "~> 1.5"
13+
14+
gem "rails", "~> 5.2.8.1"
15+
gem "nokogiri"
16+
end
17+
18+
# Compat: Ruby >= 2.5
19+
# Test Matrix:
20+
# - Ruby 2.5
21+
# - Ruby 2.6
22+
# - Ruby 2.7
23+
appraise "rails-6-0" do
24+
# Load order is very important with combustion!
25+
gem "combustion", "~> 1.5"
26+
27+
gem "rails", "~> 6.0.6.1"
28+
end
29+
30+
# Compat: Ruby >= 2.5
31+
# Test Matrix:
32+
# - Ruby 2.5
33+
# - Ruby 2.6
34+
# - Ruby 2.7
35+
# - Ruby 3.0
36+
appraise "rails-6-1" do
37+
# Load order is very important with combustion!
38+
gem "combustion", "~> 1.5"
39+
40+
gem "rails", "~> 6.1.7.7"
41+
end
42+
43+
# Compat: Ruby >= 2.7
44+
# Test Matrix:
45+
# - Ruby 2.7
46+
# - Ruby 3.0
47+
# - Ruby 3.1
48+
appraise "rails-7-0" do
49+
# Load order is very important with combustion!
50+
gem "combustion", "~> 1.5"
51+
52+
gem "rails", "~> 7.0.8.1"
53+
end
54+
55+
# Compat: Ruby >= 2.7
56+
# Test Matrix:
57+
# - Ruby 2.7
58+
# - Ruby 3.0
59+
# - Ruby 3.1
60+
# - Ruby 3.2
61+
appraise "rails-7-1" do
62+
# Load order is very important with combustion!
63+
gem "combustion", "~> 1.5"
64+
65+
gem "rails", "~> 7.1.3.2"
66+
end

CHANGELOG.md

Lines changed: 38 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,37 @@
1-
# CHANGELOG
1+
# Changelog
2+
3+
[![SemVer 2.0.0][📌semver-img]][📌semver] [![Keep-A-Changelog 1.0.0][📗keep-changelog-img]][📗keep-changelog]
4+
5+
All notable changes to this project will be documented in this file.
6+
7+
Since version 1.0, the format is based on [Keep a Changelog][📗keep-changelog],
8+
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html),
9+
and [yes][📌major-versions-not-sacred], platform and engine support are part of the [public API][📌semver-breaking].
10+
Please file a bug if you notice a violation of semantic versioning.
11+
12+
[📌semver]: https://semver.org/spec/v2.0.0.html
13+
[📌semver-img]: https://img.shields.io/badge/semver-2.0.0-FFDD67.svg?style=flat
14+
[📌semver-breaking]: https://github.com/semver/semver/issues/716#issuecomment-869336139
15+
[📌major-versions-not-sacred]: https://tom.preston-werner.com/2022/05/23/major-version-numbers-are-not-sacred.html
16+
[📗keep-changelog]: https://keepachangelog.com/en/1.0.0/
17+
[📗keep-changelog-img]: https://img.shields.io/badge/keep--a--changelog-1.0.0-FFDD67.svg?style=flat
18+
19+
## [Unreleased]
20+
### Added
21+
### Changed
22+
### Fixed
23+
### Removed
24+
25+
## [1.0.0] - 2025-02-25 ([tag][1.0.0t])
26+
- COVERAGE: 98.44% -- 63/64 lines in 6 files
27+
- BRANCH COVERAGE: 94.44% -- 17/18 branches in 6 files
28+
- 63.64% documented
29+
### Added
30+
- Compatibility with Rails v5.2, v6.x, 7.x, 8.0
31+
- Compatibility with Ruby 2.7.8, 3.x
32+
### Removed
33+
- Dropped compatibility with Rails < 5.2
34+
- Dropped compatibility with Ruby < 2.7.8
235

336
## v0.3.4
437

@@ -42,3 +75,7 @@
4275
## v0.2.5
4376

4477
* [Security] Updated Rails to version 3.2.11
78+
79+
[Unreleased]: https://github.com/oauth-xx/masq2/compare/v0.1.7...HEAD
80+
[0.1.7]: https://github.com/oauth-xx/masq2/compare/v0.1.16...v0.1.7
81+
[0.1.7t]: https://github.com/oauth-xx/masq2/tags/v0.1.6

Gemfile

Lines changed: 40 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,44 @@
11
source "https://rubygems.org"
22

3-
group :development, :test do
4-
platforms :ruby, :mswin, :mingw do
5-
gem 'sqlite3'
6-
gem 'mysql2'
7-
gem 'pg'
8-
gem 'byebug'
9-
#gem 'activerecord-oracle_enhanced-adapter'
10-
#gem 'ruby-plsql'
11-
#gem 'ruby-oci8'
12-
end
13-
gem 'minitest'
14-
gem 'rails-controller-testing'
15-
gem 'test-unit', '~> 3.0'
16-
gem 'mocha'
17-
gem 'ruby_gntp'
18-
gem 'guard-minitest'
19-
gem 'rb-fsevent', :require => false
20-
end
3+
git_source(:github) { |repo_name| "https://github.com/#{repo_name}" }
4+
git_source(:gitlab) { |repo_name| "https://gitlab.com/#{repo_name}" }
215

6+
#### IMPORTANT #######################################################
7+
# Gemfile is for local development ONLY; Gemfile is NOT loaded in CI #
8+
####################################################### IMPORTANT ####
9+
10+
# Load order it important for combustion, so make sure it loads first!
11+
gem "combustion", "~> 1.5"
12+
13+
# Include dependencies from <gem name>.gemspec
2214
gemspec
15+
16+
# Security Audit
17+
eval_gemfile "gemfiles/modular/audit.gemfile"
18+
19+
# Debugging
20+
eval_gemfile "gemfiles/modular/debug.gemfile"
21+
22+
# Code Coverage
23+
eval_gemfile "gemfiles/modular/coverage.gemfile"
24+
25+
# Linting
26+
eval_gemfile "gemfiles/modular/style.gemfile"
27+
28+
# Documentation
29+
eval_gemfile "gemfiles/modular/documentation.gemfile"
30+
31+
# DB Adapters
32+
eval_gemfile "gemfiles/modular/db_adapters.gemfile"
33+
34+
# Testing
35+
eval_gemfile "gemfiles/modular/mini_testing.gemfile"
36+
37+
# Local Testing (not applicable to CI)
38+
# gem "guard-minitest"
39+
40+
gem "appraisal", github: "pboling/appraisal", branch: "galtzo"
41+
42+
# For local testing we'll use Rails v8.0
43+
# In CI we'll use `combustion` and `appraisal` to test other versions
44+
gem "rails", "~> 8.0", ">= 8.0.1"

0 commit comments

Comments
 (0)