capybara-reloads 0.1.2 → 0.2.0

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: 17cc6bae28a813ca712083ba0cd70db286b915da074d39d8017ea31e64f22901
4
- data.tar.gz: 99ac04e58b47530a4f0e096b7940525ac70770400e74757aac53813cf52bdba5
3
+ metadata.gz: ca574edf64e50af0ff0ba6f59eee344bdd645e2879840b0699e98f911f481644
4
+ data.tar.gz: bb8790ec884c160cefad30146f0f89c0786efed1537615c4a9cba855800bb4a8
5
5
  SHA512:
6
- metadata.gz: 7f18d11ff7473992377e85be9ab47244bfa107f4f3c9d5e8da303b6534c85a343e7579a186bfb358d1a42150b0072d444fa11fa2271d574952ea4e4e6aceaf1a
7
- data.tar.gz: 750619d9639f21383d28b913efbf0958766636f46f9920522a01c95b8e3f7db5cc7049e1c759ad220293c81818e267a58ed81e7a6c26d43ae876cbfb934ae5e7
6
+ metadata.gz: 43ef9babe505b02e1cc7b365bb302c608f6d792ba74577c653d762f4bdd6db1d1be95afbd58070e58fb4b2ca5b0d51608dbb1f7360600f4f6285e7fea148bc2c
7
+ data.tar.gz: 6ec27817f684afee2f5787916e0e7de04ce3223bc524c680498e9373636d0da2cac3de08ca8b72da362c5e9dfad64194d64c04ddffcfd9c1335cbe06ac8872a6
data/CHANGELOG.md CHANGED
@@ -1,7 +1,15 @@
1
1
  ## [Unreleased]
2
2
 
3
+ ## [0.2.0] - 2022-12-30
4
+
5
+ ### Added
6
+
7
+ - The state contains the exception backtrace along with the instance. This makes it easier to see which selector exactly has filed
8
+
3
9
  ## [0.1.2] - 2022-12-25
4
10
 
11
+ ### Added
12
+
5
13
  - Changing homepage and changelog uri for rubygems.org
6
14
 
7
15
  ## [0.1.1] - 2022-12-25
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- capybara-reloads (0.1.2)
4
+ capybara-reloads (0.2.0)
5
5
  capybara (~> 3.0)
6
6
  capybara-screenshot (~> 1.0)
7
7
 
data/LICENSE.txt CHANGED
@@ -1,6 +1,6 @@
1
1
  The MIT License (MIT)
2
2
 
3
- Copyright (c) 2022 TODO: Write your name
3
+ Copyright (c) 2022 Kiril Mitov
4
4
 
5
5
  Permission is hereby granted, free of charge, to any person obtaining a copy
6
6
  of this software and associated documentation files (the "Software"), to deal
@@ -33,7 +33,7 @@ module Capybara
33
33
  raise e
34
34
  end
35
35
  reloads_made+=1
36
- args = {base: self, exception: e}
36
+ args = { base: self, exception: e }
37
37
  # Allows us to change the way we report that a refresh should happend
38
38
  if Capybara::Reloads.before_reload_callback != nil
39
39
  Capybara::Reloads.before_reload_callback.call(args)
@@ -61,7 +61,16 @@ module Capybara
61
61
  html_and_image = Capybara::Screenshot.screenshot_and_save_page
62
62
  # html_and_image is of the form
63
63
  # {:html=>"...screenshot_2022-12-25-17-42-37.712.html", :image=>"...screenshot_2022-12-25-17-42-37.712.png"}
64
- @previous_states << html_and_image.merge({exception: exception, reloads_made: reloads_made})
64
+ exception_hash = exception ?
65
+ {
66
+ instance: exception,
67
+ backtrace: exception.backtrace
68
+ } : nil
69
+
70
+ @previous_states << html_and_image.merge({
71
+ exception: exception_hash,
72
+ reloads_made: reloads_made
73
+ })
65
74
  end
66
75
 
67
76
  end
@@ -2,6 +2,6 @@
2
2
 
3
3
  module Capybara
4
4
  module Reloads
5
- VERSION = "0.1.2"
5
+ VERSION = "0.2.0"
6
6
  end
7
7
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: capybara-reloads
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.2
4
+ version: 0.2.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Kiril Mitov
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2022-12-25 00:00:00.000000000 Z
11
+ date: 2022-12-30 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: capybara