booth 0.1.1 → 0.1.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: dcf27bfc6c4f636766ee1764457f067d7a5c55d081f192735514ba2580e7a5db
4
- data.tar.gz: 67b1e4f7bb2dbebfca56ffdea115eb1b035bb894f8a2b49ef3afd55312c79211
3
+ metadata.gz: b70ea613b3d742d06eb3d72d55ee00f8594b0660414180950d55c917f3689ce8
4
+ data.tar.gz: 2628fae3b7d5661c47f3a1845a55ad39075d243337026a0cd46f967c12503fa8
5
5
  SHA512:
6
- metadata.gz: 65900f930895224c41eb582731d43b7faad4780a92e4bd319d6a692e4148c6a733620406fa3f295d059e0661c44304a45b87f695e623e48230ef5af3b89c6e4b
7
- data.tar.gz: c9301b3babf34c6e40b2dc23e2501d2fc0c3d543872fc37614771b0c7fbd75f2d6905fab4a0a4a07d88dc01590fc83083409bf4e070f76326f5ff98f6995ca52
6
+ metadata.gz: fbf30a4604a7dfbb69c93af8391be069a682f5cf97f5c23b8a358ba83b87ba826016e2e6a6c3f577f6f2719c8da770c783d5251e26e748b64923e5e97c411589
7
+ data.tar.gz: 3bdef8e026ceb62f9835e85c0ad38a57cb2aa0f102ae030f4e748b670a1dd70ecfa9981f0a40e14f0411085c940b530c08fa786a45f4b032c9ba38635a707a43
data/CHANGELOG.md CHANGED
@@ -1,5 +1,13 @@
1
1
  # main
2
2
 
3
+ # 0.1.3
4
+
5
+ - Fix `AssertPartial` screenshot path missing a `.png` extension (breaks with playwright-ruby-client >= 1.62.0, which validates the mime type)
6
+
7
+ # 0.1.2
8
+
9
+ - Idempodent impersonation (now respecting unique DB constraints)
10
+
3
11
  # 0.1.1
4
12
 
5
13
  - Replace `Booth::Adminland.issue_incognito_token` with `generate_incognito_secret_key`
@@ -43,12 +43,11 @@ module Booth
43
43
  Tron.success :target_credential_found
44
44
  end
45
45
 
46
- # incognito_credential_id has a unique index only one active incognito
47
- # per impersonator. Revoke any existing one before creating a new session.
46
+ # incognito_credential_id has a unique index (only one session per impersonator).
47
+ # Clear the stale reference on any prior session before creating a new one.
48
48
  def do_revoke_existing_incognito
49
49
  existing = ::Booth::Models::Session.find_by(
50
50
  incognito_credential_id: impersonator_credential_id,
51
- revoked_at: nil,
52
51
  )
53
52
 
54
53
  return Tron.success(:no_existing_incognito) unless existing
@@ -55,7 +55,11 @@ module Booth
55
55
  end
56
56
 
57
57
  def do_revoke_incognito
58
- current_session.update!(revoked_at: Time.current, revoke_reason: :incognito_stopped)
58
+ current_session.update!(
59
+ revoked_at: Time.current,
60
+ revoke_reason: :incognito_stopped,
61
+ incognito_credential_id: nil,
62
+ )
59
63
  Tron.success :incognito_revoked
60
64
  end
61
65
 
@@ -54,7 +54,7 @@ module Booth
54
54
  # Because doing this manually is very hard (would have to play through every scenario).
55
55
  def take_screenshot
56
56
  screenshot_dir.mkpath
57
- path = screenshot_dir.join(partial.gsub(/[^a-zA-Z0-9._-]/, '_'))
57
+ path = screenshot_dir.join("#{partial.gsub(/[^a-zA-Z0-9._-]/, '_')}.png")
58
58
  page.save_screenshot(path.to_s) # rubocop:disable Lint/Debugger
59
59
  log { "Screenshot saved to `#{path}`" }
60
60
  end
data/lib/booth/version.rb CHANGED
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Booth
4
- VERSION = '0.1.1'
4
+ VERSION = '0.1.3'
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: booth
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.1
4
+ version: 0.1.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - halo