Skip to content

Commit 0d48e1a

Browse files
committed
💚 More fixes
1 parent cd73903 commit 0d48e1a

File tree

4 files changed

+12
-7
lines changed

4 files changed

+12
-7
lines changed

Appraisals

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ end
4848
appraise "rails-7-0" do
4949
# Load order is very important with combustion!
5050
gem "combustion", "~> 1.5"
51-
gem "sqlite3", "~> 2.0"
51+
gem "sqlite3", "~> 1.4"
5252

5353
gem "rails", "~> 7.0.8.7"
5454
eval_gemfile "modular/mini_testing.gemfile"

app/models/masq/open_id_request.rb

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -15,18 +15,18 @@ def parameters=(params)
1515
case params
1616
# arbitrary params passed as Hash
1717
when Hash
18-
params.delete_if { |k, v| k.index("openid.") != 0 }
18+
params.delete_if { |k, _v| k.index("openid.") != 0 }
1919
# params from ActionController (does not inherit directly from HashWithIndifferentAccess after Rails 4.2)
2020
when ActionController::Parameters
21-
params.to_unsafe_h.delete_if { |k, v| k.index("openid.") != 0 }
21+
params.to_unsafe_h.delete_if { |k, _v| k.index("openid.") != 0 }
2222
end
2323
end
2424

2525
def from_trusted_domain?
2626
host = URI.parse(parameters["openid.realm"] || parameters["openid.trust_root"]).host
27-
unless Masq::Engine.config.masq["trusted_domains"].nil?
28-
Masq::Engine.config.masq["trusted_domains"].find { |domain| host.ends_with?(domain) }
29-
end
27+
return false if Masq::Engine.config.masq["trusted_domains"].nil?
28+
29+
Masq::Engine.config.masq["trusted_domains"].find { |domain| host.to_s.ends_with?(domain) }
3030
end
3131

3232
protected

gemfiles/rails_7_0.gemfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ gem "rexml"
77
gem "mutex_m", "~> 0.2"
88
gem "stringio", "~> 3.0"
99
gem "combustion", "~> 1.5"
10-
gem "sqlite3", "~> 2.0"
10+
gem "sqlite3", "~> 1.4"
1111
gem "rails", "~> 7.0.8.7"
1212

1313
gemspec path: "../"

lib/masq/engine.rb

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,11 @@
22

33
module Masq
44
class Engine < ::Rails::Engine
5+
# An isolated engine will set its name according to namespace,
6+
# so Masq::Engine.engine_name will be “masq”.
7+
# It will also set Masq.table_name_prefix to “masq_”,
8+
# changing the MyEngine::Persona model to use the masq_personas table
9+
# See: http://edgeapi.rubyonrails.org/classes/Rails/Engine.html#label-Isolated+Engine
510
isolate_namespace Masq
611
end
712
end

0 commit comments

Comments
 (0)