clearance 2.9.1 → 2.9.3

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: b3164482da14d878bfca32632ebbabf81635add8143adaca1be3baa7ec41cd83
4
- data.tar.gz: 037f0f5a5c30f3022b0d29a9c100e40538c0b176b4935c061ec96c469d8c3ca9
3
+ metadata.gz: 63e1102563fe30d25f825d35b7b9cfb97e9c7a63966350d249550786301aef68
4
+ data.tar.gz: 0445a9f0883f00671b612e6bddb07adcba4f5d1ba0b42946ecd5aee9eac3cb1f
5
5
  SHA512:
6
- metadata.gz: 5b889666cb2a46f6bfdcf41b9aaf9c7f0414b986f07ab4f31bb4846d3b4ef900f3d6076d50d9f8463657033488b118472d9e8dace8c4786aadd0f2999f5b2bed
7
- data.tar.gz: 0fbc755f11f689843852ef18201963d0d56be06b8bf22326e82d2c83162d092ade4af85dfff3469867e0cf3937f545351a84b83425094cfb064d3466c361dd7c
6
+ metadata.gz: 90f4330cc836c066594314824eb212bdf463ce7187803bc99123d30bf59b5223298d390af5bea1891199d126692c679682382b59e320ea7e1ad27d979e03a90f
7
+ data.tar.gz: 23f8e1faebcadf721cfd2434b4ef61f05fc3d17b4374ea6830ae612905c730d6939bb87a495ff9fd191a9a5d84143d0a74f42b23bf064b7fc5d954a58cbfc0f1
@@ -19,10 +19,14 @@ jobs:
19
19
  - "7.0"
20
20
  - "7.1"
21
21
  - "7.2"
22
+ - "8.0"
22
23
  ruby:
23
24
  - "3.1.6"
24
25
  - "3.2.5"
25
26
  - "3.3.5"
27
+ exclude:
28
+ - ruby: "3.1.6"
29
+ gemfile: "8.0"
26
30
 
27
31
  env:
28
32
  BUNDLE_GEMFILE: gemfiles/rails_${{ matrix.gemfile }}.gemfile
data/Appraisals CHANGED
@@ -14,3 +14,8 @@ end
14
14
  appraise "rails_7.2" do
15
15
  gem "railties", "~> 7.2.0"
16
16
  end
17
+
18
+ appraise "rails_8.0" do
19
+ gem "railties", "~> 8.0.0"
20
+ gem 'sqlite3', '>= 2.1'
21
+ end
data/CHANGELOG.md CHANGED
@@ -5,11 +5,23 @@ complete changelog, see the git history for each version via the version links.
5
5
 
6
6
  ## [Unreleased]
7
7
 
8
- [Unreleased]: https://github.com/thoughtbot/clearance/compare/v2.9.1...main
8
+ [Unreleased]: https://github.com/thoughtbot/clearance/compare/v2.9.3...main
9
+
10
+ ## [2.9.3] - November 26, 2024
11
+ - Add Rails 8 to testing matrix (#1038) Hamed Asghari
12
+
13
+ [2.9.3]: https://github.com/thoughtbot/clearance/compare/v2.9.2...v2.9.3
14
+
15
+ ## [2.9.2] - November 14, 2024
16
+ - Fix query params being clobbered by Clearance::BackDoor (#1041) Frederick Cheung
17
+
18
+ [2.9.2]: https://github.com/thoughtbot/clearance/compare/v2.9.1...v2.9.2
9
19
 
10
20
  ## [2.9.1] - October 29, 2024
11
21
  - Update gemspec
12
22
 
23
+ [2.9.1]: https://github.com/thoughtbot/clearance/compare/v2.9.0...v2.9.1
24
+
13
25
  ## [2.9.0] - October 29, 2024
14
26
  - Added Rails 7.2 and Ruby 3.3 to testing matrix
15
27
  and overhauled dummy app (#1032) Hamed Asghari
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- clearance (2.9.1)
4
+ clearance (2.9.3)
5
5
  actionmailer (>= 5.0)
6
6
  activemodel (>= 5.0)
7
7
  activerecord (>= 5.0)
@@ -101,7 +101,7 @@ GEM
101
101
  activerecord (>= 5.a)
102
102
  database_cleaner-core (~> 2.0.0)
103
103
  database_cleaner-core (2.0.1)
104
- date (3.3.4)
104
+ date (3.4.0)
105
105
  diff-lcs (1.5.1)
106
106
  drb (2.2.1)
107
107
  email_validator (2.2.4)
@@ -147,7 +147,7 @@ GEM
147
147
  mini_mime (1.1.5)
148
148
  mini_portile2 (2.8.7)
149
149
  minitest (5.25.1)
150
- net-imap (0.5.0)
150
+ net-imap (0.5.1)
151
151
  date
152
152
  net-protocol
153
153
  net-pop (0.1.2)
data/Rakefile CHANGED
@@ -21,7 +21,7 @@ end
21
21
 
22
22
  desc "Lint ERB templates"
23
23
  task :erb_lint do
24
- sh("bundle", "exec", "erblint", "app/views/**/*.erb")
24
+ sh("bundle", "exec", "erb_lint", "app/views/**/*.erb")
25
25
  end
26
26
 
27
27
  desc "Run the specs and acceptance tests"
@@ -0,0 +1,20 @@
1
+ # This file was generated by Appraisal
2
+
3
+ source "https://rubygems.org"
4
+
5
+ gem "addressable"
6
+ gem "ammeter"
7
+ gem "appraisal"
8
+ gem "capybara"
9
+ gem "database_cleaner"
10
+ gem "erb_lint", require: false
11
+ gem "factory_bot_rails"
12
+ gem "nokogiri"
13
+ gem "pry", require: false
14
+ gem "rails-controller-testing"
15
+ gem "rspec-rails"
16
+ gem "shoulda-matchers"
17
+ gem "sqlite3", ">= 2.1"
18
+ gem "railties", "~> 8.0.0"
19
+
20
+ gemspec path: "../"
@@ -54,7 +54,6 @@ module Clearance
54
54
  if user_param.present?
55
55
  query_string = Rack::Utils.build_query(params)
56
56
  env[Rack::QUERY_STRING] = query_string
57
- env[Rack::RACK_REQUEST_QUERY_STRING] = query_string
58
57
  user = find_user(user_param)
59
58
  env[:clearance].sign_in(user)
60
59
  end
@@ -1,3 +1,3 @@
1
1
  module Clearance
2
- VERSION = "2.9.1".freeze
2
+ VERSION = "2.9.3".freeze
3
3
  end
@@ -2,6 +2,6 @@ class ApplicationController < ActionController::Base
2
2
  include Clearance::Controller
3
3
 
4
4
  def show
5
- render inline: "Hello user #<%= current_user.id %>", layout: false
5
+ render inline: "Hello user #<%= current_user.id %> #{params.to_json}", layout: false
6
6
  end
7
7
  end
@@ -8,4 +8,12 @@ describe "Backdoor Middleware" do
8
8
 
9
9
  expect(cookies["remember_token"]).to eq user.remember_token
10
10
  end
11
+
12
+ it "removes the `as` param but leaves other parameters unchanged" do
13
+ user = create(:user)
14
+
15
+ get root_path(as: user.to_param, foo: 'bar')
16
+
17
+ expect(response.body).to include('{"foo":"bar","controller":"application","action":"show"}')
18
+ end
11
19
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: clearance
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.9.1
4
+ version: 2.9.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Dan Croak
@@ -27,7 +27,7 @@ authors:
27
27
  autorequire:
28
28
  bindir: bin
29
29
  cert_chain: []
30
- date: 2024-10-29 00:00:00.000000000 Z
30
+ date: 2024-11-26 00:00:00.000000000 Z
31
31
  dependencies:
32
32
  - !ruby/object:Gem::Dependency
33
33
  name: bcrypt
@@ -146,7 +146,7 @@ extra_rdoc_files:
146
146
  - LICENSE
147
147
  - README.md
148
148
  files:
149
- - ".erb-lint.yml"
149
+ - ".erb_lint.yml"
150
150
  - ".github/dependabot.yml"
151
151
  - ".github/workflows/dynamic-readme.yml"
152
152
  - ".github/workflows/dynamic-security.yml"
@@ -188,6 +188,7 @@ files:
188
188
  - gemfiles/rails_7.0.gemfile
189
189
  - gemfiles/rails_7.1.gemfile
190
190
  - gemfiles/rails_7.2.gemfile
191
+ - gemfiles/rails_8.0.gemfile
191
192
  - lib/clearance.rb
192
193
  - lib/clearance/authentication.rb
193
194
  - lib/clearance/authorization.rb
@@ -324,7 +325,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
324
325
  - !ruby/object:Gem::Version
325
326
  version: '0'
326
327
  requirements: []
327
- rubygems_version: 3.5.16
328
+ rubygems_version: 3.5.22
328
329
  signing_key:
329
330
  specification_version: 4
330
331
  summary: Rails authentication & authorization with email & password.
File without changes